Closed Bug 1591402 Opened 6 years ago Closed 6 years ago

Websocket connection failures to localhost, resolved by changing profiles

Categories

(Core :: Networking: WebSockets, defect)

70 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

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:203
  • Firefox can’t establish a connection to the server at ws://localhost:4000/phoenix/live_reload/socket/websocket?vsn=2.0.0. frame:3:11906
  • The connection to ws://localhost:4000/live/websocket?vsn=2.0.0 was interrupted while the page was loading. app.js line 81 > eval:501:203
  • The 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 localhost site 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.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Networking: WebSockets
Product: Firefox → Core

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.

Flags: needinfo?(him)

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.

Flags: needinfo?(him)
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME

Feel free to reopen if we have more information to move forward. Thanks!

You need to log in before you can comment on or make changes to this bug.