Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

socket.io throws NS_ERROR_NOT_CONNECTED in firefox

Some of our windows users are experiencing trouble with socket.io while using Firefox 12. One person was using XP, the other Vista. Firefox 13 is fine.

uncaught exception: [
  Exception... "Component returned failure code: 0x804b000c (NS_ERROR_NOT_CONNECTED)" 
  nsresult: "0x804b000c (NS_ERROR_NOT_CONNECTED)"
  location: "JS frame :: ...socket.io.js :: :: line 2" data: no
]

The error is occurring on the second line of the socket.io client js file. I am not sure if this error occurs persistently in FF12 or sporadicly. The person that reported this problem to me is seeing it persistently.

The closest thing I found was: https://bugzilla.mozilla.org/show_bug.cgi?id=732363. Which leads me to believe it is a fug in FF. But I'm not sure.

Is this a bug in FF? Or could it be in my code? If the latter, what type of code might be causing this?

like image 272
Dave Lee Avatar asked Jun 14 '12 00:06

Dave Lee


1 Answers

If you try forcing another transport protocol, such as xhr-polling by changing transports on the node server where you initiate socket.io.

io.set('transports', ['websocket','xhr-polling','jsonp-polling']);

Try with one at a time. Begin from the bottom and work yourself up.

I am not being sure, by far, just suggesting to test because I have had many strange browser/socket issues related to transport.

The worst problems has been with clients thinking they can do flashsocket and it ultimately fails, hence my transports look like the above rather than the "default".

like image 160
David Rinnan Avatar answered Sep 21 '22 15:09

David Rinnan