You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connection fails silently, causing headaches and hours of time spent debugging.
I had a problem in my webpack build, causing connection to fail silently on Node, caused by this websocket issue (which in turn is caused by webpack's broken default build settings).
To be clear: This bug is not caused by engine.io, but it is accidentally silencing it.
Specifically, the problem is in websocket.doOpen's try/catch handler. It will emit the error, but since, the first time around, doOpen is called from the Manager.constructor, it would be impossible to register any event handler at that point, making this error always go unnoticed, no matter what you do.
Here is the callstack:
Steps to reproduce (if the current behaviour is a bug)
Anything that causes websocket.doOpen to fail (such as a default webpack build run on Node) will fail silently.
Discussion
Maybe there should be a default error handler that acts if none was registered? This would alsomake it easier for people to get started and reliably find any potential problem without having to debug the dependency?
As an alternative, I am also thinking, straight up throwing the error when it happens in the constructor (or in general, if no error handler is provided) would still be better than what it is right now?
The text was updated successfully, but these errors were encountered:
You want to:
Problem Description
Connection fails silently, causing headaches and hours of time spent debugging.
I had a problem in my webpack build, causing connection to fail silently on Node, caused by this
websocket
issue (which in turn is caused by webpack's broken default build settings).To be clear: This bug is not caused by
engine.io
, but it is accidentally silencing it.Specifically, the problem is in
websocket.doOpen
'stry/catch
handler. It will emit the error, but since, the first time around,doOpen
is called from theManager.constructor
, it would be impossible to register any event handler at that point, making this error always go unnoticed, no matter what you do.Here is the callstack:
Steps to reproduce (if the current behaviour is a bug)
Anything that causes
websocket.doOpen
to fail (such as a default webpack build run on Node) will fail silently.Discussion
Maybe there should be a default error handler that acts if none was registered? This would alsomake it easier for people to get started and reliably find any potential problem without having to debug the dependency?
As an alternative, I am also thinking, straight up
throw
ing the error when it happens in the constructor (or in general, if no error handler is provided) would still be better than what it is right now?The text was updated successfully, but these errors were encountered: