socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Socket.io appears not to be working in Firefox 8 on Linux

Open KyleAMathews opened this issue 15 years ago • 16 comments

I downloaded today's Firefox update and tested a previously working socket.io application and got the following error in the Firebug console:

Security error
http://mywebsite.com:8080/socket.io/socket.io.js
Line 2293

KyleAMathews avatar Sep 30 '11 23:09 KyleAMathews

It works fine on firefox 9 for windows :< .. maybe a linux firefox bug instead. >.< btw there is an old netscape security override possible but that will require user to allow the event.

darkyen avatar Oct 01 '11 16:10 darkyen

the same error FF8, Ubuntu.

But I see the "solution". If for main(client) app you use HTTPS and for Socket.IO call HTTP, you get this error.

tapin13 avatar Oct 24 '11 17:10 tapin13

Having a similar problem here too. My app is served over HTTPS and socket.io is served via HTTP.

FF7 (Ubuntu) works, Epiphany 3.0.4 works, Chrome (Windows) works, FF8 (Windows) broken. :(

ghost avatar Nov 10 '11 01:11 ghost

Same issue in windows with FF8 served over https, to http socket.io server. I am running Node.JS v0.4.12 Socket.IO v0.8.7

Security error Line: 2294 in: socket.io.js

this.websocket = new Socket(this.prepareUrl() + query);

danielburhans avatar Nov 16 '11 20:11 danielburhans

That's expected in FF8.

https://developer.mozilla.org/en/Firefox_8_for_developers

Mixed content is not allowed with WebSockets; that is, you can no longer open a connection to a non-secure WebSocket server from secure content.

Nibbler999 avatar Nov 17 '11 10:11 Nibbler999

I was about post the same thing: https://bugzilla.mozilla.org/show_bug.cgi?id=662692

I was thinking about closing this as you are deliberately breaching security https -> http. I don't think we should do a fallback for that and just let it die... @guille opinions?

3rd-Eden avatar Nov 17 '11 13:11 3rd-Eden

Hmmm... but I wasn't using https anywhere in the process.

KyleAMathews avatar Nov 18 '11 07:11 KyleAMathews

I have this exact problem and I'm not using https, either. any movement on this? it works fine in everything else.

rayui avatar Nov 30 '11 13:11 rayui

@KyleAMathews and @rayui, it would be much easier to debug this issue, if you provide next information:

  • Version of node.js and Socket.IO
  • Relation between main-site and comet-site: domain-name and ports for both
  • Which kinds of transport are enabled?
  • Source code around "Line 2293" (even better link in github to the file with line) where exception thrown
  • Version of transport your FF8 use. I guess it's websocket. But maybe it's something different(maybe Flash or XHR-polling). (you can observe this activity via FireBug and see which kind of connection is active)
  • Do you use "authenticaion" callback?
  • If you use authentication, how exactly does it work? Via cookies? Something different?

Ideal case would be to provide also WireShark(or tcpdump) dump of network activity between your browser and Socket.IO. You can do it via: sudo tcpdump -iany -s 65535 -w sio-packets.pcap tcp port 8080 and host mywebsite.com It creates file sio-packets.pcap. You can check it's content via: tcpdump -r sio-packets.pcap or via WireShark. Than upload this file somewhere and post link to it here.

Only after you put this information, it's possible to start investigation and reproduce. Socket.IO can behave very different depending on many items and it's just not enough information to reason about your issue.

cris avatar Dec 01 '11 20:12 cris

okay, no problem. i can get this sorted out for you on monday.

rayui avatar Dec 03 '11 12:12 rayui

I can confirm the bug on Firefox 9.0.1 on Mac OSX 10.6.8, using socket.io 0.8.7.

Security error socket.io.js (line 2294): this.websocket = new Socket(this.prepareUrl() + query);

puelocesar avatar Jan 17 '12 11:01 puelocesar

I can confirm this bug on Firefox 10.0 on Windows 7.

env: node = 0.6.7, socket.io = 0.8.7

host: Linux running as a virtual machine on Windows 7. client: Windows 7 with Firefox 10.0. port = 3000

I'm not running https at all. and I've even set network.websocket.allowInsecureFromHTTPS to true.

Request:

[11:50:09.122] Firefox can't establish a connection to the server at ws://127.0.0.1:3000/socket.io/1/websocket/3621827891205209268. @ http://127.0.0.1:3000/socket.io/socket.io.js:2294

socket.io.js: 2294 this.websocket = new Socket(this.prepareUrl() + query);

I uploaded a partial wireshark dump(containing only the socket.io request) to http://blog.xiaket.org/socket.io.dump.pcap for a full dump, visit: http://blog.xiaket.org/all.pcap

hope some of you guys would take a look. thanks.

xiaket avatar Feb 03 '12 04:02 xiaket

Same Error with Firefox 12 (Windows & MacOS).

GET http://website.com:8080/socket.io/1/?t=1337678192826
Security error
this.websocket = new Socket(this.prepareUrl() + query); socket.io.js (ligne 2322)

node = 0.6.17, socket.io = 0.9.6

Page is served with HTTPS, WS is called on port 8080

mgcrea avatar May 22 '12 09:05 mgcrea

it's not a bug it's the way it's designed in FF. Just make sure you connect to a secure page and it's fine. Closing this issue based on https://bugzilla.mozilla.org/show_bug.cgi?id=662692 and https://developer.mozilla.org/en/Firefox_8_for_developers

3rd-Eden avatar May 22 '12 09:05 3rd-Eden

How can i connect to a secure page since i'm using websockets on an HTTP 8080 port? Do I need to proxy somehow? My main website is 100% using HTTPS

Edit: I tried using wss:// scheme but it does not work either.

mgcrea avatar May 22 '12 09:05 mgcrea

Ok found it, I had to start an https server and connect using https://website.com:8080 for the handshake.

mgcrea avatar May 22 '12 10:05 mgcrea