"xhr-multipart" instead of "flashsocket" (intermittent behavior)
Hello,
Tested on: Firefox 3.6 (Windows) Epiphany (Ubuntu) Firefox 4.0 (Ubuntu) Firefox 3.6 (Mac)
All these browsers are supposed to use "flashsocket". They did the first time I opened the page but soon all started to fall back to "xhr-multipart". Sometimes I'm able to get them using "flashsocket" again (clearing cookies, rebooting services and browsers, etc), but it's never permanent... they'll just fall back to "xhr-multipart" again.
I thought this problem was application-specific so I've built a minimal scaffold for testing and the behavior is the same. I can also reproduce this with juggernaut's example page (though it works more consistently).
Might this be a bug with Socket.IO? I've tried debugging this but I'm not really sure what's going on.
I think it might have something to do with serving up the flash policy file.
I've updated juggernaut with the latest socket.io - can you pull from git and see if your problem's been resolved.
Thanks, Alex
On Fri, Apr 29, 2011 at 5:39 AM, goncalossilva < [email protected]>wrote:
Hello,
Tested on: Firefox 3.6 (Windows) Epiphany (Ubuntu) Firefox 4.0 (Ubuntu) Firefox 3.6 (Mac)
All these browsers are supposed to use "flashsocket". They did, the first time I've opened the page but soon all started to fall back to "xhr-multipart". Sometimes I'm able to get them using "flashsocket" again (clearing cookies, rebooting services and browsers, etc), but it's never permanent... they'll just fall back to "xhr-multipart" again.
I thought this problem was application-specific so I've built a minimal scaffold for testing and the behavior is the same. I can also reproduce this with juggernaut's example page (though it works more consistently).
Might this be a bug with Socket.IO? I've tried debugging this but I'm not really sure what's going on.
Reply to this email directly or view it on GitHub: https://github.com/maccman/juggernaut/issues/63
Alex MacCaw
(415) 513-0975 @maccman
http://alexmaccaw.co.uk | http://www.leadthinking.com | http://socialmod.com
Hello,
Unfortunately the issue is still present. I've tried following the code and everything seems fine: it selects the "flashsocket" transport and tries to connect. The problem is that it times out and moves to xhr-multipart (https://github.com/maccman/juggernaut/blob/master/public/socket_io.js#L852). Juggernaut is running as root and the policy file is available on port 843.
I'm not really sure of what to do next... :|
I too ran into this issue with Firefox 3.6. I recalled fighting this battle before about a month ago and ended up figuring out that my WebSocketMain.swf wasn't in sync with the one Juggernaut provided -- updated that file and everything worked swimmingly.
When I saw this issue creep up again today, I was a bit confused; WebSocketMain.swf was matching up with what juggernaut had in the vaults. On a hunch, I checked out socket.io's swf file to verify that they were the same. They were not. I copied in the latest from socket.io and still had the same issue (d77379ced07157771fd4e3ed290572ff3184b7cf). On another hunch, I decided to revert one version prior (d0189b0dc0e23b5fff98664066119cab1cd99bc3). It now appears to be functioning properly.
I'm not sure why the swf file was different to begin with, so I won't call this a "fix" of any sort, but I thought I'd share it in case it sheds any light on why things were broken.
*Note: The hashes in this post auto-link to Juggernaut, but were intended for Socket.io https://github.com/LearnBoost/Socket.IO/commits/master/lib/vendor/web-socket-js/WebSocketMain.swf
Ah nicholas, interesting - I'll look into that.
I've been struggling with this too. It'll use websockets every once and awhile, but then degrade and not try again for awhile. Super mysterious.
I disabled remember_transport and it tries it again more often, but still frequently degrades to json_p, when I'm only using browsers either websocket or flash socket capable.
Also if I comment out all but websocket + flashsocket, it frequently cant' connect at all.
hmm, I'm hoping the upgrade to the latest Socket.IO will solve these issues.
On Tue, Jun 28, 2011 at 2:33 PM, inspire22 < [email protected]>wrote:
Also if I comment out all but websocket + flashsocket, it frequently cant' connect at all.
Reply to this email directly or view it on GitHub: https://github.com/maccman/juggernaut/issues/63#issuecomment-1458804
Alex MacCaw
+12147175129 @maccman
http://alexmaccaw.co.uk | http://www.leadthinking.com | http://socialmod.com
I had exactly the same problem...couldn't get flashsocket to work. The suggestion here to make sure the front-end uses a WebSocketMain.swf FROM the socket.io-client (am using npm) was a critical piece of information. Apparently, not all WebSocketMain.swf are alike.
Still not work. Tried to set corrent link to the WebSocketMain.swf, and nothing happens. Still uses xhr-multipart.
After working on this for awhile, I decided I wasn't a huge fan of the io-socket library. I've since switched to Faye, which has been working really well.