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

Socket.IO and Windows Chrome Stuck #351

Closed
pyrostrex opened this issue Jul 7, 2011 · 49 comments
Closed

Socket.IO and Windows Chrome Stuck #351

pyrostrex opened this issue Jul 7, 2011 · 49 comments
Labels
bug Something isn't working unable to reproduce We were unable to reproduce the issue

Comments

@pyrostrex
Copy link

It stucks at "client Authorized for"

@3rd-Eden
Copy link
Contributor

3rd-Eden commented Jul 9, 2011

Please provide us with more information, like a reproduceable test case, version numbers etc

@pyrostrex
Copy link
Author

Chrome Version, 12.xx.xxx.xxx (Latest). I don't have any test case sorry. Will try to test again. Maybe there is something wrong with my code :P.

Edit : Socket.io git cloned from master.

@3rd-Eden
Copy link
Contributor

Is it still reproducible with the current master?

@pyrostrex
Copy link
Author

Yep.

@3rd-Eden
Copy link
Contributor

How can we reproduce it? As I tried to do so, but I'm unable.

@pyrostrex
Copy link
Author

Maybe there's some problem with my javascript coding. But weird thing is mac chrome, firefox doesn't have any problem. only with Windows chrome this problem raised.

@pyrostrex
Copy link
Author

So... I tried with the chat example. It doesn't work either. Socket.io only problematic when using windows 7 chrome. I tried to use mac os x chrome and it works just fine. I think it's just chrome? Btw, I'm using the latest chrome. Updated before testing the chat example.

@emilingerslev
Copy link

I also have the problem with chrome on windows 7. Any news on this?

@Fauntleroy
Copy link

Is it safe to assume we're all using the latest developer version of Chrome here? 14.0.835.8 (dev-m) fails to connect properly. The error server side is "warn - websocket connection invalid"

@jaypeeZero
Copy link

@Fauntleroy : Are you running this locally or on a server? If on a server, which server is it? I have found problems with Heroku and some of the sockets, for example they don't even allow WebSockets to be used.

Try adding other transports like flashsocket and xhr-polling and remove websocket and see if that fixes your problem.

@luksm
Copy link

luksm commented Jul 31, 2011

This is happening here also, i'm using the last stable version available (12.0.742.122) and I'm getting the same error on the server side as Fauntleroy. Tried running it locally and on 2 different servers (both managed by me - Debian & Ubuntu) and it fails....

@andreabat
Copy link

Hello after chrome update to 14.0.835.8 dev on linux, I get "warn - websocket connection invalid". It worked perfectly before the update.
Running on same box ( server and chrome).

@Fauntleroy
Copy link

For those of you having a problem like mine, the newest version of Chrome is using a new version of websockets and will be fixed in due time: #429

@pyrostrex
Copy link
Author

@3rd-Eden, I do some tests today, and found out that when I use a (windows 2008 r2 US server) and use chrome to try connecting to socket.io. It turned out that it works (this I think is the reason you unable to reproduce). I think it had to do with the connection speed? or the IPs group? our connection speed in malaysia is only 128kbps maximum (using accelerator). so I think by using google chrome we can only get up to 20kbps? Chrome version is 13.xx.xx.xx (latest).

@pyrostrex
Copy link
Author

@guille, @3rd-Eden, I think that this problem will not be fixed in a long time so as for that. I will be closing it as I found out that removing websocket from the list of transports solve my problem. Thus, thank you for trying to help me.

@rauchg rauchg reopened this Sep 4, 2011
@rauchg
Copy link
Contributor

rauchg commented Sep 4, 2011

Is this still actually happening ?

@rauchg
Copy link
Contributor

rauchg commented Sep 4, 2011

I can't reproduce at all - need more details.

@pyrostrex
Copy link
Author

@guille, Yes, with the latest version. It still happens. 0.8.3. The weird thing about this is, only some part of users having this problem. Got one of them said the same thing as you. He said that he don't have any problem regarding this.

In the client side, I see that the websocket successfully switching protocol. But in the server side, the last thing it said is "authorized for". I'm using a room called "/requestorz". so It should said something like "authorized for /requestorz" because this is what the server did when i used mac.

@Charuru
Copy link

Charuru commented Sep 5, 2011

Could this be the firewall issue? Some firewalls block websockets.

@einaros
Copy link
Contributor

einaros commented Sep 5, 2011

I got the WireShark dump from @pyrostrex, but I haven't had time to read through it yet. Hopefully there's something in there.

Generally speaking, I can see this happening if you're either behind a very restrictive firewall, or in a corporate setup with forced proxy servers. I suppose some ISPs could enforce similar strict traffic shaping, but I'd think we would have heard more about that by now if that was the case.

@Charuru
Copy link

Charuru commented Sep 5, 2011

#412

@pyrostrex
Copy link
Author

@guille, I learnt that in 0.8.4, it was actually stuck at writing for 1:: . In Mac, after the "writing for 1::" the client will send back "1::/requestorz" but in windows, the client doesn't send anything.

@Charuru, I didn't have any firewall enabled. I don't have antivirus either. So maybe it was because of my ISP?

@einaros
Copy link
Contributor

einaros commented Sep 7, 2011

@pyrostrex, Just to confirm - you're having this issue with socket.io hosted on your local machine too, right? Otherwise your ISP or even router (I've seen reports about e.g. Cisco routers having trouble with websockets) could be interfering somehow.

@ghost
Copy link

ghost commented Sep 8, 2011

I set up a simple test case and in my case turning off Avast antivirus fixes the issue. What's weird is that only Chrome PC does not want to open the socket... Internet Explorer and Firefox can open the connection without any problems. But Chrome stays stuck at "client Authorized for" unless I turn off Avast.

I really don't know what to do about this.

@pyrostrex
Copy link
Author

@einaros, still checking.. Need some time to test it. Never test it before.

@Hydrozen, good for you. At least for you, turning antivirus will stop the problem. for me. I don't have any antivirus. But all of em doesn't work for me.I even disable windows 7 firewall completely but still. chrome, firefox, and safari doesn't work for me. weird stuff.

@Yoshiy
Copy link

Yoshiy commented Sep 9, 2011

I also suffered it, it happens when use firefox or chrome on windows7. Only some computers effected, some can connect normally.

Here's some thing I invested:

  • websocket and flashsocket don't work at all but there aint any log.
  • fallback to xhr-polling on client because of timeout but server don't fallback so client'll use xhr-polling but server still defined this client as websocket. That's why user can not connect at all. it can be fixed by force new connection with new session id while fallback on client? But I'm not sure about close the unsuccessful connections.

Hope this'll be useful. I have one computer here that never connect success here. So if you guys need anything(about logs or debug ...), you can message me. Regards.

@einaros
Copy link
Contributor

einaros commented Sep 9, 2011

@Yoshiy, For the box that cannot connect, would you say that its setup is pretty much identical to other boxes running websockets (successfully) from the same physical internet connection?

@Yoshiy
Copy link

Yoshiy commented Sep 10, 2011

Which setups you want to know? Not sure all of them are same. The firefox and chrome using same version(ff 6.0.1 and chrome 13.0.782.220) with default config. Also I turn off all firewall/antivirus. With same physical internet connection, it's stuck while other running normally.

@pyrostrex
Copy link
Author

@guille, @einaros, @3rd-Eden, another weird thing I found out today. When I tried Windows XP, it works flawlessly! Everything works!. I think this is only a problem for people using Windows 7 Ultimate and Windows 7 Thin PC Edition? Gonna try some more testing with different OS with Socket.IO. @guille, are you using Windows 7 Ultimate too?

Edit: I had talked to my user (the one that can use windows 7) and he said that he was using Windows 7 Home Premium. So now I really think that Socket.IO doesn't work only with Windows 7 Ultimate & Thin PC Edition.

@rauchg
Copy link
Contributor

rauchg commented Sep 23, 2011

I test with 7 (will confirm the version soon), and XP Professional.

@pyrostrex
Copy link
Author

@guille, @einaros, @3rd-Eden, Today, i tried to re-install my Windows 7 Thin PC Edition, right after i finished installed the OS, I then installed Google Chrome to test the Socket.IO's chat example. It works right out the box. I then tried everything to reproduce such as updating the OS to the latest, installing everything I've ever installed. But it still works. I still can connect to my Socket.IO's Server. On the other hand, my friend who is using the same Windows 7 Thin PC Edition as me still cannot connect to the server. Is this Windows 7's problem? Will investigate it further.

@ghost
Copy link

ghost commented Oct 7, 2011

When I had issues on my end with Windows, it was always because of an antivirus of some kind which didnt like socket connections and blocked them.

Patrick Paul-Hus
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, 7 October, 2011 at 1:03 PM, pyrostrex wrote:

@guille, @einaros, @3rd-Eden, Today, i tried to re-install my Windows 7 Thin PC Edition, right after i finished installed the OS, I then installed Google Chrome to test the Socket.IO's chat example. It works right out the box. I then tried everything to reproduce such as updating the OS to the latest, installing everything I've ever installed. But it still works. I still can connect to my Socket.IO's Server. On the other hand, my friend who is using the same Windows 7 Thin PC Edition as me still cannot connect to the server. Is this Windows 7's problem? Will investigate it further.

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

@pyrostrex
Copy link
Author

This has been solved by using HTTPS. The only difference between my OS and my friend OS is that I don't have Windows Defender but he does.

@einaros
Copy link
Contributor

einaros commented Oct 11, 2011

Hm. So Windows Defender blocks your websocket traffic? I'll have to test that.

@3rd-Eden 3rd-Eden reopened this Oct 11, 2011
@3rd-Eden
Copy link
Contributor

Reopened this thing.

@Charuru
Copy link

Charuru commented Oct 11, 2011

What do you mean by using https?

@einaros
Copy link
Contributor

einaros commented Oct 11, 2011

@Charuru, I assume he means that by connecting over https, whatever otherwise blocks the websocket connection is no longer able to process the stream and thus block it / modify it.

@pyrostrex
Copy link
Author

@Charuru, yeah, @einaros is right. Since I'm using express, I just open up a https server rather than opening a http server. To help guiding my users, I also opened up a http server to redirect every http request to my https server.

@einaros, yep, I think Windows Defender blocks the outbound of the websocket traffic. But the problem is, disabling Windows Defender will not fix this problem. But I don't know if I mistaken anything because I didn't use the restart-after-changing method :P.

@markwk
Copy link

markwk commented Oct 12, 2011

I'm having a connection problem (= websocket connection invalid) with Chrome 14.x on Mac OS X. Works fine with Safari, Opera and Firefox on Mac and fine with Windows 7 with Firefox and IE. I'm using version 0.7.8 of socket.io. Chrome 13.x seems to work fine.

@3rd-Eden
Copy link
Contributor

@markwk update to socket.io 0.8.5 as you socket.io version is out of date.

@markwk
Copy link

markwk commented Oct 13, 2011

@3rd-Eden updated but still some issue with Chrome. Funny business. I suspect it's a browser issue now.

@rootrau
Copy link

rootrau commented Oct 13, 2011

i can't using socket.io8.5 with window.

@polotek
Copy link

polotek commented Dec 26, 2011

We also have a few users reporting a problem with Win7 and Chrome. We're on 0.8.7 of socket.io. I'm gonna get set up to reproduce after vacation. Also our setup is only xhr-polling or jsonp-polling over https. Will try to provide more info as I get it.

@milani
Copy link

milani commented Jan 26, 2012

I have this problem using win 7, but everything is fine in Linux and Mac ( I used Chrome 16.0.912.77 in all platforms ).

This is repository: https://github.com/milani/awesome

UPDATE: Windows 7 that I used had kaspersky 2012 internet security installed. But according to wiki page ( Socket.io and firewalls ) it should not be a problem.

@einaros
Copy link
Contributor

einaros commented Jan 26, 2012

@milani, which version of socket.io?

In either case, this should no longer be an issue when engine.io replaces the current core of socket.io. Starting off with a plain polling request, then upgrading as better alternatives are detected to work is a much better way to go about things, than hitting the most advanced transport first.

@milani
Copy link

milani commented Jan 26, 2012

I'm using 0.8.7 with nowjs module.

I think handling which protocol to use should be decided by socket.io. Or should I handle it manually?

@einaros
Copy link
Contributor

einaros commented Jan 26, 2012

Well you have both options. In the future socket.io will by default try using xhr- or jsonp-polling for starters, and then transparently upgrade to a better transport if it's available. You can disable / override / limit this behavior as you please, as you can with the present day socket.io.

In terms of your problem, it may be a firewall, antivirus, proxy, misbehaving isp or any number of other issues -- and that emphasizes why it's a better idea to start with what probably works (polling), and then probing for available upgrades. When websockets are attempted used up front, there will be a timeout of some seconds before it eventually fails and is degraded to polling.

@milani
Copy link

milani commented Jan 26, 2012

@einaros You know, if it was network problems, isp misbehavior or anything like this, it should be the same in all platforms. Maybe it's firewall but I'm not sure. I should check it out.
Using proxy or VPN cause any issue? Then it makes websockets useless.

I provided the link to repository. if anyone can try it on a fresh Win 7, please let me know:)

@einaros
Copy link
Contributor

einaros commented Jan 26, 2012

WebSockets are still early-wave, and have varying support across browsers and devices. While it would be convenient to say that they are useless in lieu of uniform and solid support, I find it better to regard them a commodity you may have the pleasure of using.

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

No branches or pull requests