Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help for Adobe UXP #214

Open
fire1 opened this issue Feb 9, 2023 · 4 comments
Open

Need help for Adobe UXP #214

fire1 opened this issue Feb 9, 2023 · 4 comments

Comments

@fire1
Copy link

fire1 commented Feb 9, 2023

Hi!

I'm trying to add a connection to the Mercure hub from the Adobe UXP plugin, it seems to connect, but cannot receive any message from the hub. (Topic is same)

2023-02-09T09:51:45.218+0200    INFO    mercure/subscribe.go:137        New subscriber  {"subscriber": {"id": "urn:uuid:7f783236-c799-4118-8cb3-1aeadc0d5b66", "last_event_id": "", "remote_addr": "127.0.0.1:57685", "topics": ["test"]}}
2023-02-09T09:51:50.554+0200    INFO    mercure/publish.go:79   Update published        {"update": {"id": "urn:uuid:ce15199e-aa76-486e-8a8c-a533ec5b1019", "type": "", "retry": 0, "topics": ["test"], "private": false, "data": "{\"hello\":\"there\"}"}, "remote_addr": "127.0.0.1:57692"}
127.0.0.1 - - [09/Feb/2023:09:51:50 +0200] "POST /.well-known/mercure HTTP/1.1" 200 45 "" "Symfony HttpClient/Curl"
2023-02-09T09:51:50.554+0200    INFO    mercure/subscribe.go:86 Update sent     {"subscriber": {"id": "urn:uuid:7f783236-c799-4118-8cb3-1aeadc0d5b66", "last_event_id": "", "remote_addr": "127.0.0.1:57685", "topics": ["test"]}, "update": {"id": "urn:uuid:ce15199e-aa76-486e-8a8c-a533ec5b1019", "type": "", "retry": 0, "topics": ["test"], "private": false, "data": "{\"hello\":\"there\"}"}}
2023-02-09T09:52:30.556+0200    DEBUG   mercure/subscribe.go:53 connection closed by the client {"subscriber": {"id": "urn:uuid:7f783236-c799-4118-8cb3-1aeadc0d5b66", "last_event_id": "", "remote_addr": "127.0.0.1:57685", "topics": ["test"]}}
2023-02-09T09:52:30.556+0200    INFO    mercure/subscribe.go:234        Subscriber disconnected {"subscriber": {"id": "urn:uuid:7f783236-c799-4118-8cb3-1aeadc0d5b66", "last_event_id": "", "remote_addr": "127.0.0.1:57685", "topics": ["test"]}}
127.0.0.1 - - [09/Feb/2023:09:51:45 +0200] "GET /.well-known/mercure?topic=test HTTP/1.1" 200 79 "" "UXP:XMLHttpRequest"
2023-02-09T09:52:31.262+0200    INFO    mercure/subscribe.go:137        New subscriber  {"subscriber": {"id": "urn:uuid:261c5462-a14c-4878-97c5-24ffe3755971", "last_event_id": "", "remote_addr": "127.0.0.1:57727", "topics": ["test"]}}

It should work since they have some internal class that provides socket connection WebSocket

Any suggestions on how to proceed, or just to scrap this plugin for a later time?

@Yaffle
Copy link
Owner

Yaffle commented Feb 9, 2023

@fire1 , you could try to use WebSocket as a transport like at #87 (comment)

@fire1
Copy link
Author

fire1 commented Feb 9, 2023

@fire1 , you could try to use WebSocket as a transport like at #87 (comment)

I'll give it a try, but with little hope...
Аll I see currently working in UXP is from a timeout, even a socket content is there, (even heartbeat). For me, UXP request does not support "stream-like" responses.
Thanks for the suggestion, will report back after the tests

EDIT: WebSocketTransport not defined

@fire1
Copy link
Author

fire1 commented Feb 9, 2023

Hi again, what is the minim version to support this polyfill, from what I check, UXP is based on javascript ES3, (or maybe even older...)
but also running on Chromium ...???
I can't even begin to imagine what a mess Adobe has made and how this is possible!

Besides, great work! Your polyfill is best working so far...

@Yaffle
Copy link
Owner

Yaffle commented Feb 9, 2023

@fire1 ES5, may be ES3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants