-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
hybi10 incompatibility #429
Comments
We are aware of the issue, and @guille is working on new WebSocket parsers to supported the latest protocols (hopefully before they become stable) |
Any news on this issue? It's really thrown a wrench into my dev environment... |
Well, the problem is even wider. Newest dev build of chrome doesn't even rollback to any transport and just silently fails. If you need a socket.io log of the serverside, just tell. |
It fall backs perfectly here, It take a while, but it does fallback. (to http-polling)
|
How long does it take? What's your fallback configuration like? On Fri, Aug 5, 2011 at 11:57 AM, 3rd-Eden
|
It's plain default and it takes around 5 secs while it tries xhr and long polling. After that it reports connection but no data is being transmitted. |
My current setup is at https://gist.github.com/1128254 On Aug 5, 2011, at 9:03 PM, Fauntleroy wrote:
|
Actually, that's what happens: info - socket.io started It connects via xhr, gets 3 or 4 mutual exchanges and loses connection permanently. |
@3rd-Eden here is what I get with you testcase on Chrome 14.0.835.8
Server side:
If I am reading these logs correctly socket.io correctly fallbacks to xhr-polling but then looses (or closes) connection for some reason and does not handle reconnection correctly i.e. does not fallback to other transports when trying to reconnect always preferring websocket transport to others. |
Yeah I noticed the same thing. The whole reconnect is currently being refactored and it will not be ready yet for atleast another week. I think the reconnect with xhr is failing because it's not sending or receiving heart beat signals
During that period I would have expected at least one heart beat message, so I guess to tackle this issue we need to
|
Are there plants to backport this fix to 0.6? Having issues on Chrome 14.0.835 |
Just to escalate this issue, Chrome stable is now having the same problem. I (unfortunately) updated to latest and it's falling back to polling. |
Same problem here. Safari + Windows 7 and Chrome (13.0.782.112) + Ubuntu 10.04 are super fast and stable and I'm not having any problems with Firefox too. I'm Running Socket.io with Nowjs on Nodester. When I was running on Heroku (which doesn't have WebSockets) Chrome + Windows 7 always falling back to polling after waiting almost one minute and crashing a couple seconds later. |
Hiby support is gonna land next. On Sat, Aug 13, 2011 at 8:25 AM, scanferla <
Guillermo Rauch |
Thanks! :) |
Actually, "thanks" doesn't represent how grateful I am and many many others must be too. For all your work. |
Great work guys! A big thanks indeed. |
Completely agree with the comments thus far. This project is phenomenal :) |
Yep, awesome work, my favorite project so far! :) |
Socket.io is excellent. I am also experiencing the "warn - websocket connection invalid" when using Chrome and Socket.io 0.7.9 (via the Now.JS package). Thank you for working to support HyBi 10 so quickly -- looking forward to the upcoming commit! |
Not sure if this is directly helpful, but there's some info about ways to implement Hybi10 here: |
+1 |
Any timing info on Hybi 10 support in Socket.io? Would love to get websockets working with Chrome again :) Perhaps implementation help here: https://github.com/Worlize/WebSocket-Node |
Commenting to get myself on the email list for this issue. Thanks for all your hard work on Socket.IO! |
@BinaryMuse there's a "Enable notifications for this Issue" link on the bottom of the page. |
@CvX Aha! Hooray for reading! I swear I looked for such an option before commenting. ;) Thanks. |
Apologies... I posted some lengthy comments on this issue on the bug for socket.io-client when I should have posted them here: I wrote a WebSocket library for node that is a fairly comprehensive implementation of the latest protocol draft with exhaustive documentation. I sent a gist that shows a simplistic initial integration with Socket.IO to @guille about a month ago but I haven't heard anything in response. Must be swamped with work. I'm not at all familiar with the Socket.IO internals, so I mostly just hacked away at the existing websocket backend to get it to work (read: don't use this hack in production.) To try it out, replace lib/transports/websocket.js on the server, add "websocket": ">=0.0.13" to the package.json, and run "npm install" https://gist.github.com/1094399 note: this will only work with the new browsers and will break websocket support on the chrome <14 etc. because I didn't add the new draft implementation as a separate transport. For chrome at least, no changes to the client are required. Firefox 7 will require checking for the prefixed MozWebSocket constructor and using that if its there. Implementing the current draft is an order of magnitude more complex than implementing draft-76 was. It has a stateful binary framing protocol now and support for raw binary messaging, ping/pong, message fragmentation etc., whereas before there were only text messages delimited with sentinel characters. There is a lot more complexity and a lot more places for obscure bugs to creep in. I decided to only implement a singular version of the protocol in my library (the latest draft) because the browsers in the wild that are implementing the new drafts will be quickly updated through their auto-update mechanism and it's not worth the substantial code complication to support 5 simultaneous protocol versions. Firefox 6 that supports draft-07 will only be out for 6 weeks before Firefox 7 that has draft-10 replaces it automatically. Likewise with chrome... in less than 5 weeks almost all chrome users that are currently on draft-76 will automatically update to draft-10. The one straggler will be Safari, unfortunately. So I'm tracking with (and usually several weeks ahead of) the browser releases. Once the protocol is finalized (which should be very soon) it'll stabilize. Thank God for Chrome and Firefox's auto-updating! For something like Socket.IO it would be very easy to keep the existing parser to support Draft-76 and just add a new library like WebSocket-Node for Draft-10 connections (probably use two separate transports "websocket-76" and "websocket-10" with some client-side detection logic.) |
I've made a push to implement hybi10 support as transparently as possible on top of socket.io 0.7.9. My fork can be found at https://github.com/einaros/socket.io. The 'send' framing of the hybi10 implementation was taken from steveWang's io.socket (https://github.com/steveWang/io.socket). The rested was thrown together from reading the websocket draft. I've include tests for hybi10 specific parser cases, in test/transport.websocket.hybi10-parser.test.js. These cases include fragmented messages, ping packets in-between fragments of text packets, tcp fragmentation in addition to message fragmentation etc. Suggestions are more than welcome - I've basically just implemented whatever I had to add to get http://draw.2x.io working with the newest browsers. That said, it seems stable for now :-) |
By the way, a quick heads up -- sending a very long message (I think the cap is 32767) breaks the new websocket implementation (in Chrome, at least) for some reason. What needs to be done is some form of chunking of messages and reassembly by the recipient; I'll probably get on that at some point in the next few weeks. |
@steveWang, I read some comments about that somewhere (possibly yours), but haven't gotten around to testing it. I just pushed a cap+tests for 32 bit packet length, even though the protocol allows 64 bit. Even 32 bit seems ludicrous for javascript, in my humble opinion. If nothing else, it certainly welcomes DoS attacks. |
@ronkorving, Chrome 15.0.865.0 works just fine here. Make sure you aren't actually still running some older socket.io version. |
@ronkorving My Chrome 15.0.865.0 works fine, as well as 14.0.835.109. |
My bad, it does work. But it showed a new bug. I am transferring a relatively large amount of data through Socket.IO (though not beyond say 50KB), and I get the following error in my Chrome console: "WebSocket frame length too large: 13907115651451328556 bytes" I'm pretty sure I am not trying to send 13907115651451328556 bytes :) I guess this may be a known issue? |
@ronkorving Seeing as that message stems from Chrome, it may be an issue there. I've tested my hybi10 implementation against payloads way beyond 50kB, so that shouldn't be an issue. Remember that you're currently running an alpha version of Chrome :) |
Please don't close it yet. I've noticed a "serious" problem with this last Socket.io version. Messages with characters like é, ó, ã, ô etc... are not being delivered anymore (chat). And I don't know why or what happens (sorry). My simple² test: My bet is that it's something related to utf-8 or anything like that. But I really don't know. And thanks, it's working perfectly on Chrome! (except this issue I just mentioned) :) |
Just in case: I'm running Node v0.4.8 |
@scanferla, Looking into it right now. |
@ronkorving, Sending more than 64kB of data from server to client is now fixed in https://github.com/einaros/socket.io. |
@scanferla, I'll have a fix for the utf-8 issue in an hour or two. I see there's something off there, but will have to investigate a little bit further. |
@einaros, thank you so much! :) |
@scanferla, Alright, it should be good now. Check the https://github.com/einaros/socket.io fork. @steveWang, You might want to check my updates and update your send framing in your IO.Socket project. I yanked that code from you, and found a few bugs in both utf-8 handling (string length != byte length of a utf-8 string) and >64kB data length output. |
@einaros, I happily and gratefully confirm that your fork fixes the problem here! |
Fixes problem here too. Thanks! Should be merged with official branch ASAP! :) |
@einaros, thank you! Will wait this commit to be merged. (all others already were) If it takes too long, how can I use your fork with my project? Can I just download / clone your repo and replace my socket.io folder? Thanks again. |
@scanferla, You can clone my fork into whichever node_modules folder socket.io has already been installed to, granted that you remove the previous one. Otherwise wait for a merge :) |
@einaros, cool! :) |
Just to let everyone know: It was merged and it's working perfectly! IMHO we can close this issue |
Working fine here too (Chrome 15 / Ubuntu Natty) |
Closing, fixed in Socket.IO 0.8 |
What an awesome work! Thank you! |
Thanks for the awesome and quick work guys! Just a quick warning for the near future. According to the last sentence in this article ( http://peter.sh/2011/08/fullscreen-api-enhanced-element-highlighting-and-progress-on-flexbox/ ) we'll soon see another update to the WebSocket implementation in Chromium: https://bugs.webkit.org/show_bug.cgi?id=67115 |
@ronkorving, binary transport isn't used by socket.io at present in either On Aug 30, 2011 3:50 AM, "ronkorving" <
|
it's borked again(?)/still(?) in Chrome 16.0.912.63 on Mac OSX at least |
debug - setting request GET /socket.io/1/websocket/13496148131557414773 |
% npm list sez: |
@zzo using the 0.8.7 found here worked to fix this issue for me: |
Please note that the latest dev Chrome has a newer version of the websocket protocol, which is incompatible with the current one.
For more info: http://googlechromereleases.blogspot.com/2011/07/chrome-dev-channel-release.html
The text was updated successfully, but these errors were encountered: