Socket.io appears not to be working in Firefox 8 on Linux
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
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.
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.
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. :(
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);
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.
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?
Hmmm... but I wasn't using https anywhere in the process.
I have this exact problem and I'm not using https, either. any movement on this? it works fine in everything else.
@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.
okay, no problem. i can get this sorted out for you on monday.
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);
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.
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
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
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.
Ok found it, I had to start an https server and connect using https://website.com:8080 for the handshake.