chrome and client disconnection #102

Closed
robj opened this Issue Mar 9, 2013 · 1 comment

Projects

None yet

2 participants

@robj
robj commented Mar 9, 2013

In Chrome (but not Safari) after a period of time passes my client becomes disconnected

If I restart either chrome or slanger the client connects again.

Chrome 25 / OSX
Slanger master branch

Is it possible to get a hint in the right direction of what is going wrong here?

WebSocket is closed before the connection is established

{
"type":"WebSocketError",
"error":{
"cancelBubble":false,
"returnValue":true,
"srcElement":{
"binaryType":"blob",
"extensions":"",
"protocol":"",
"onmessage":null,
"onopen":null,
"bufferedAmount":0,
"readyState":2,
"url":"ws://pusher.dev.stud.net:8080/app/ab30c65b248c95f8e360?protocol=5&client=js&version=1.12.5&flash=false",
"URL":"ws://pusher.dev.stud.net:8080/app/ab30c65b248c95f8e360?protocol=5&client=js&version=1.12.5&flash=false"
},
"defaultPrevented":false,
"timeStamp":1362796519655,
"cancelable":false,
"bubbles":false,
"eventPhase":2,
"currentTarget":{
"binaryType":"blob",
"extensions":"",
"protocol":"",
"onmessage":null,
"onopen":null,
"bufferedAmount":0,
"readyState":2,
"url":"ws://pusher.dev.stud.net:8080/app/ab30c65b248c95f8e360?protocol=5&client=js&version=1.12.5&flash=false",
"URL":"ws://pusher.dev.stud.net:8080/app/ab30c65b248c95f8e360?protocol=5&client=js&version=1.12.5&flash=false"
},
"target":{
"binaryType":"blob",
"extensions":"",
"protocol":"",
"onmessage":null,
"onopen":null,
"bufferedAmount":0,
"readyState":2,
"url":"ws://pusher.dev.stud.net:8080/app/ab30c65b248c95f8e360?protocol=5&client=js&version=1.12.5&flash=false",
"URL":"ws://pusher.dev.stud.net:8080/app/ab30c65b248c95f8e360?protocol=5&client=js&version=1.12.5&flash=false"
},
"type":"error"
}
}

@robj
robj commented May 3, 2013

I believe this relates to, https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-html5/4G_XqPQQFX8

This error occurred in Chrome most cases when the server was restarted, or the client was failed over to a different slanger instance. (multiple slangers behind a HAProxy frontend)

I am not getting this error now using pusher 2.0.4, instead the library seems to deal with it gracefully:

Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":1006}}}

@stevegraham stevegraham self-assigned this Dec 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment