Skip to content
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

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

Closed
KyleAMathews opened this issue Sep 30, 2011 · 16 comments
Closed

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

KyleAMathews opened this issue Sep 30, 2011 · 16 comments

Comments

@KyleAMathews
Copy link

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
@darkyen
Copy link

darkyen commented Oct 1, 2011

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.

@tapin13
Copy link

tapin13 commented Oct 24, 2011

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.

@ghost
Copy link

ghost commented Nov 10, 2011

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. :(

@danielburhans
Copy link

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);

@Nibbler999
Copy link

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.

@3rd-Eden
Copy link
Contributor

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?

@KyleAMathews
Copy link
Author

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

@rayui
Copy link

rayui commented Nov 30, 2011

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

@cris
Copy link

cris commented Dec 1, 2011

@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.

@rayui
Copy link

rayui commented Dec 3, 2011

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

@puelocesar
Copy link

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);

@xiaket
Copy link

xiaket commented Feb 3, 2012

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.

@mgcrea
Copy link

mgcrea commented May 22, 2012

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

@3rd-Eden
Copy link
Contributor

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

@mgcrea
Copy link

mgcrea commented May 22, 2012

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
Copy link

mgcrea commented May 22, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests