Websocket connection failures to localhost, resolved by changing profiles
Categories
(Core :: Networking: WebSockets, defect)
Tracking
()
People
(Reporter: him, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0
Steps to reproduce:
Loaded a web socket-enabled web page on localhost (specifically, one backed by Phoenix Channels)
Actual results:
Got the following console errors
Firefox can’t establish a connection to the server at ws://localhost:4000/live/websocket?vsn=2.0.0. app.js line 81 > eval:501:203Firefox can’t establish a connection to the server at ws://localhost:4000/phoenix/live_reload/socket/websocket?vsn=2.0.0. frame:3:11906The connection to ws://localhost:4000/live/websocket?vsn=2.0.0 was interrupted while the page was loading. app.js line 81 > eval:501:203The connection to ws://localhost:4000/phoenix/live_reload/socket/websocket?vsn=2.0.0 was interrupted while the page was loading.
Expected results:
Successful web socket connections with no errors in the console.
Additional notes:
- I've had this problem repeatedly on separate projects. I can't tell when it will start, but once it happens, it happens on every request.
- I only saw this problem on
localhost. If I load the deployed version of the site (non-localhost) in Firefox Developer Edition, this problem did not occur. - Alternately, if I loaded the
localhostsite in standard Firefox, the problem also did not occur. So the problem is not with the server. - However, if I opened history, find
localhost, and told FF to "forget about this site", the problem persisted. - Deleting the original default profile in
about:profiles(which was not the one I was using) seemed to fix the issue; it's not currently happening.
So it seems there was some faulty state in Firefox, specific to localhost, perhaps bleeding over from a profile not in use, which causes websocket connections to fail.
Comment 1•6 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Sorry I can't give better reproduction steps, but I thought it would be useful for this issue to show up in search engines in case others have the same problem, since I at least found a workaround. And maybe others can reproduce reliably.
Comment 3•6 years ago
|
||
Can you run https://mozilla.github.io/mozregression/
Thanks.
Oh neat. I don't currently see the bug after the profile change, but if I see it again I will try to do this.
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Feel free to reopen if we have more information to move forward. Thanks!
Description
•