Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"websocket connection invalid" happens nondeterministically #535

Closed
dominiek opened this issue Sep 23, 2011 · 16 comments
Closed

"websocket connection invalid" happens nondeterministically #535

dominiek opened this issue Sep 23, 2011 · 16 comments
Labels
bug Something isn't working

Comments

@dominiek
Copy link

In both 0.7.9 and 0.8.4 this error seems to occur. I haven't been able to recreate the situation, because only some of my users have this problem (definitely happening on Chrome 14.0.835.186)

A temporary fix is to turn off websockets.

@frank06
Copy link

frank06 commented Sep 23, 2011

subscribing

@databyte
Copy link

subscribing as well

@saschagehlich
Copy link

+1

@3rd-Eden
Copy link
Contributor

Would love to have moar information about this

Node version

Socket.io client & socket.io server version numbers (please confirm them by checking out your node_modules folder and checking out the package.json)

Platform, windows, mac etc & version
Is it reproducible or is it happening sometimes
are you behind a proxy, or using anti virus software on the machine where you are testing this.

@3rd-Eden
Copy link
Contributor

@einaros any indication on why something like this would occur? (as you wrote the parsers :P)

@saschagehlich
Copy link

Actually it was my fault. Had socket.io-client 0.7.3 as a submodule - so i was at client 0.7.3, server 0.8.4. Fail. Removed the submodule, now everything works fine.

@3rd-Eden
Copy link
Contributor

Well I'm glad you got it solved :)

On Sun, Sep 25, 2011 at 12:07 PM, Sascha Gehlich <
reply@reply.github.com>wrote:

Actually it was my fault. Had socket.io-client 0.7.3 as a submodule - so i
was at client 0.7.3, server 0.8.4. Fail. Removed the submodule, now
everything works fine.

Reply to this email directly or view it on GitHub:
#535 (comment)

@3rd-Eden
Copy link
Contributor

@dominiek @frank06 @databyte could it be that you have simular issues?

@databyte
Copy link

Unfortunately I've encountered either machines or specific Internet connections that hate websockets whether via issues with firewalls or some undetermined local machine problem. We see an issue roughly 1 out of 150 clients.

Here are my two cases which left me with no choice but to disable websockets.

Case 1: Mac, Lion, Firefox 6.02, could not connect via websockets from work, home, or Internet cafe. Logs showed no connection.

Solution: disable websocket. Immediately connected once disabled. Have not determined what on that machine besides running a Cisco VPN Client would cause it to fail. I have not placed hands on the machine since it's a customer.

Case 2: Single user. Multiple computers (Mac and PC) and multiple new browsers (Fx 6 / Safari) - all websocket connected. Logs showed either two issues:

i, 9/22 20:18:12.847;  handshake authorized 69622656052978708
w, 9/22 20:18:12.959;  websocket connection invalid
i, 9/22 20:18:12.960;  transport end
i, 9/22 20:18:12.960;  [Connection] 69622656052978708: connected
w, 9/22 20:18:12.974;  websocket connection invalid
i, 9/22 20:18:12.974;  transport end
w, 9/22 20:18:12.999;  websocket connection invalid
i, 9/22 20:18:13.000;  transport end
i, 9/22 20:18:15.837;  transport end
i, 9/22 20:18:16.250;  handshake authorized 21026743801772718905

or

w, 9/23 14:24:11.761;  websocket parser error: continuation frame cannot follow current opcode
w, 9/23 14:36:36.274;  websocket parser error: continuation frame cannot follow current opcode
w, 9/23 14:45:18.181;  websocket parser error: continuation frame cannot follow current opcode
w, 9/23 14:52:57.615;  websocket parser error: continuation frame cannot follow current opcode

We tried for many (many) hours to reproduce the scenario in which either connection could be fouled but could only come up with setting up a proxy server that eats the upgrade notice. As we were building the proxy option, we also discovered disabling websockets as a workaround - so we haven't worked much on the issue since. Once we get past an end-of-month deadline, we'll look back into it.

Unlike @saschagehlich, Socket.io versions matched client and server, switched over to pulling client js directly from node - no change.

Lots of clients work just fine - tons - including our own. Something either proxy or locally causes the communication on websockets to fail. The ultimate solution would be for the protocol to fallback to another option even after the connection is established under websockets. Right now, it seems to just throw an error and the client stays disconnected or never connects at all.

And my team's more than willing to check deeper... next month... :-(

@dominiek
Copy link
Author

I can also confirm that this is not a client and server version mismatch problem. Both versions are the same.

Server: Socket.io 0.7.9 / Node v0.4.10 / Ubuntu Linux
Client: Socket.io 0.7.9 / Firefox 4 / Chrome 14

(Also tried 0.8.4 on both client and server to no avail)

@3rd-Eden
Copy link
Contributor

Socket.io 0.8 only has support for the latest websockets that ff 6.0 and chrome 14 are using so you should upgrade to the latest version anyways

~ Arnout Kazemier

On Sep 25, 2011, at 5:36 PM, Dominiek ter Heidereply@reply.github.com wrote:

I can also confirm that this is not a client and server version mismatch problem. Both versions are the same.

Server: Socket.io 0.7.9 / Node v0.4.10 / Ubuntu Linux
Client: Socket.io 0.7.9 / Firefox 4 / Chrome 14

(Also tried 0.8.4 on both client and server to no avail)

Reply to this email directly or view it on GitHub:
#535 (comment)

@einaros
Copy link
Contributor

einaros commented Sep 26, 2011

@databyte, I noticed an issue which could have caused websocket continuation packets to fail with some websocket implementations.

Pending verification and incorporation into the main source tree, could you clone my repo (https://github.com/einaros/socket.io) and see if that at least improves the "continuation frame cannot follow current opcode" issue you reported?

@tjsingleton
Copy link

@einaros, @databyte is enjoying a vacation. I saw your pull request got merged and I deployed from git today.

@einaros
Copy link
Contributor

einaros commented Oct 1, 2011

@tjsingleton, the fixes I commented on above haven't been merged into the main tree yet. They are coming along with the hybi-16 parsers, though, which I'm opening a pull for now.

@3rd-Eden
Copy link
Contributor

This has been merged in 0.8.5, if this same issue still occurs feel free to poke me so i can reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants