Closed EugeneKostrikov closed 3 years ago
Could you perhaps be a bit more specific as to the environment from which you are experiencing this issue? (Browser, Node version, OS, etc.)
I wrote a sample test and was not able to reproduce the issue. Code for the test is here: https://gist.github.com/aly006/cbc84a57d24744b67a32
Let me know if I am misunderstanding anything.
@EugeneKostrikov, maybe you're experience this issue: https://github.com/Automattic/socket.io/issues/1888 Since you're trying to connect to a namespace. What happens when you try to connect to the root namespace? @aly006, maybe you can try to include a namespace in your sample?
Experiencing exactly the same problem that @EugeneKostrikov has mentioned.
setTimeout works only when client has really strong connection, otherwise he won't get error
event.
Tried with throttling - same result, won't receive error
event
Socket.IO - 1.6.0 Chrome - 57.0.2926.0 canary (64-bit) NodeJS - 7.1.0 OS - macOS Sierra 10.12.1
PS. to fix this issue for now, we can replace engine with uWebSockets (e.g.):
https://github.com/uWebSockets/uWebSockets#i-would-stay-away-from-these-projects
See #3089 and #2342. The error is being fired on the default namespace, and not your custom namespace. I don't think it should work this way, but that's the current behavior.
For future readers: this was fixed in Socket.IO v3
Documentation:
Hello,
I'm trying to figure out how to fail authorization correctly. If i callback with error from the middleware the server is getting stuck. Tried both middleware style and
io.set('authorization')
. The code is as follows.Client is the same for both scenarios:
Server with
io.set
Server with middleware
It looks like the problem is
transport
. The state is stillopening
when i fail the auth. However if i use timeouts, it iswritable
. The client does not get any event at all. If i do not fail the auth -connect
event fires. Any idea what is wrong here?