Recently, I am getting the following message on chrome console;
WebSocket connection to 'ws://evo15:4008/?stream' failed: Unknown reason
It's getting more and more and it's somehow annoying and I have to open a new tab or restart chrome every time to get back to normal websocket connection. How can I debug it? Unfortunately, I cannot reproduce it yet. My chrome version is Version 77.0.3865.75 (Official Build) (64-bit)
Update 1: I think you could reproduce it by closing the connection for a long time (I don't know the exact time) from server side and then open it and try to connect to it (client trys to connect every 1 sec). Then it will happen. So I guess there is an expire time or a limited number of tries to connect somewhere.
Update 2: It happens after 256 tries of reconnection.
WebSocket connection to 'ws://evo15:4008/?stream' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
After seeing 255 of this error on console, you will see the first error and cannot reconnect. So I think there is a 8 bit limit somewhere that I am missing
The most common cause of Websocket error is when you connect to DSS through a proxy. Websockets is a fairly recent protocol and many enterprise proxies do not support it. The websocket connection will not establish and you will see this message.
Looks like someone just filed this as a Chromium (v77) bug. See issue tracking it here.
Update 1: As noted in the issue tracker and comments below, this should now be fixed in the latest stable release, which is being rolled out now (2019/10/11).
Update 2: Despite the bug being marked as fixed/closed in monorail, canary (80.0.3977.4) still appears to have this behavior. As others have noted there is a global limit of 255. However, the fact that connections opened by JS don't get closed/reset when the page is refreshed still seems like a bug to me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With