socketio / socket.io

Realtime application framework (Node.JS server)
https://socket.io
MIT License
61.2k stars 10.11k forks source link

Firefox (Win) 3.6.13 + socket.io 0.6.10 using XHR Polling + node 0.4.0 = broken #140

Closed franck34 closed 13 years ago

franck34 commented 13 years ago

All is in the title.

The first xhr request is OK (the one to init the session), but after, not possible to send message client -> server. _posting stay to true because readystatechange don't go upper than 1. So readystate 4 is never reached, so _posting stay to true.

mape commented 13 years ago

I'm having the same issue on IE. First works fine, the later ones don't.

jakubpawlowicz commented 13 years ago

Here's the same on Firefox 3.6/4, Chrome 10 & Safari 5. Tested it under various versions of node and it's broken on 0.4.3, 0.4.5 and 0.4.6. Could this be a problem in node itself? I suppose it was working fine at the time of original release (and node 0.2.x).

mjc-gh commented 13 years ago

I've seen this issue as well using socketio 0.6.18 with Node v0.4.7

FF 3.6.17 on Ubuntu for browser explicitly set to use xhr-polling

mhaemmerle commented 13 years ago

Any news on this one? Ran into this issue on FF3.6/OS X while using a server written in Java - so chances are this is not related to node.js.

nightkr commented 13 years ago

Quick question that might be irrelevant, but is anyone using a reverse proxy?

mhaemmerle commented 13 years ago

No, at least not me. Direct connection and neither works when deployed nor when testing locally on my machine.

mjc-gh commented 13 years ago

@dontcare4free, my setup (production env at least) uses a reverse proxy.

jakubpawlowicz commented 13 years ago

I'm using a reverse proxy too.

nightkr commented 13 years ago

I just wondered because nginx, with default settings, doesn't like the AJAX polling if you don't set a session id because then the URL contains two subsequent slashes. I'm sure you already know this though.

jakubpawlowicz commented 13 years ago

I do the reverse proxy through stunnel so it rather does not apply. However I ran into the issue if using a direct connection too.

mhaemmerle commented 13 years ago

Don't know about your cases, but this solved it for me: https://github.com/saschagehlich/Socket.IO-node/commit/51097a79914d822c506ee7aad1f01aefd7e88b3f

jakubpawlowicz commented 13 years ago

@mhaemmerle Did it start working for you on Firefox only or on Chrome/Safari too? I applied that patch and now FF 4 is able to connect and communication works for a moment but it always disconnects after 10-15 seconds.

mhaemmerle commented 13 years ago

@jakubpawlowicz It's working in all three of 'em now and continuously as far as i can tell (tested it for like 5min). The 10-15 seconds you describe sound like a timeout for me; have you checked the requests with a tool like Charles? And just FYI: I'am using https://github.com/ibdknox/socket.io-netty on the server-side and not node. Oh and maybe have a look at the answer by Juha Palomäki, I'am sending those headers with the Options/Post back -> http://stackoverflow.com/questions/1099787/jquery-ajax-post-sending-options-as-request-method-in-firefox.