"code":1,"message":"Session ID unknown" - 400 (Bad Request)
See original GitHub issueI’m running a single Socket.io server ( 2.0.3 ) .
In the client side i’m trying to allow only polling mode.
io.connect(url, {
"transports": ['polling']
})
The problem is that polling fails and throws:
"code":1,"message":"Session ID unknown"
response. And the client get disconnected.
i have tried to place node-http-proxy server in front of the socket.io server. So the client connect to node-http-proxy server. This solved the problem, but i don’t understand why…
Can someone please explain why this is happening and how to fix it ???
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Node.js with Socket.io - Long Polling fails and throws "code":1 ...
When I click on the GET or the XMLHttpRequest I can see that the response is "code":1,"message":"Session ID unknown" , which I don't...
Read more >How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The 400 (Bad Request) status code indicates that the server cannot or will not process the request due to something that is perceived...
Read more >Troubleshooting connection issues | Socket.IO
400 Bad Request : when something went wrong. In case of an HTTP 400 response, the response payload will be one of the...
Read more >How to connect Socket.io to App Platform - DigitalOcean
... url the page returns {“code”:1,“message”:“Session ID unknown”}. ... /questions/socket-io-call-throwing-400-bad-request-for-some-users.
Read more >How to Scale Node.js Socket Server with Nginx and Redis
This article will explain one of the most popular ways of scaling Node.js ... The Server will return an error with a Session...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I run into this issue as well, my server is executed in docker containers behind a load balancer. I assume this happens because the request polling request do not arrive in the same container everytime.
For future readers: please see the documentation here.