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

Cannot upgrade from polling to websocket transport (Nestjs + Socket IO protocol) #760

Closed
lunard opened this issue Jul 2, 2022 · 1 comment

Comments

@lunard
Copy link

lunard commented Jul 2, 2022

Hello to all.
First thanks for this useful library!
I'm using Nestjs with the Socket IO Gateway.
No problem to open and use the Websocket using Postman.

The problem is that the WS Arduino library start a handshake using the polling transport and try then to switch to the websocket transport, but the server (socket io Node library) claims errors:

Someone was able to use Nestjs and SocketIO as backend ?

_Nginx:
46.18.28.242 - - [02/Jul/2022:09:13:48 +0000] "GET /api/ws/?EIO=3&transport=polling HTTP/1.1" 200 100 "-" "arduino-WebSocket-Client"
46.18.28.242 - - [02/Jul/2022:09:13:59 +0000] "GET /api/ws/?EIO=3&transport=websocket&sid=qose5r1T7totaQZHAAAp HTTP/1.1" 101 2 "-" "arduino-WebSocket-Client"

Node log:
engine:socket client did not complete upgrade - closing transport +1s
engine:transport readyState updated from open to closing (websocket) +1s_

@lunard
Copy link
Author

lunard commented Jul 2, 2022

My fault: I had to use the SocketIOclient

@lunard lunard closed this as completed Jul 2, 2022
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

1 participant