Skip to content

WebSocket live subscriptions are not working in Firefox #4196

Closed
@ihardyslide

Description

@ihardyslide

Hi,

I am experiencing a WebSocket issue in Firefox.

Wherever a subscription is tried to be established (does not matter if in Admin Dashboard or in Comment Stream), Firefox fails to do so. Every other Browser seems to work properly.

Example:
Go to any page where the comment stream is embed and live updates are enabled in Coral, check the console:

Firefox can’t establish a connection to the server at wss://<domain>/api/graphql/live. [client.ts:545:18](<domain>/src/client.ts)
The connection to wss://<domain>/api/graphql/live was interrupted while the page was loading.

I did some analysis and digging and found quite some similar issues, see related issues section.

There is no real solution and somehow everybody is blaming eachother.

This problem produces other ugly side effects while using Coral.
For example:

  • User1 writes a comment on a story and submits it
  • User2 is writing a reply to that comment, using Firefox (a long one, takes some time to write it)
  • User1 is editing his comment and submits the edited comment
  • User2 finishes writing his comment and submits it
  • User2 will be in a broken state, because he did not get the live update from the parent comment and is now trying to reply to an outdated comment.
    Also he does not get any CallOut/ErrorMessage/Anything.
    He would have to either:
    • refresh the page (and then be on top of the story again, instead of the comment he just wanted to reply to. With >10000 comments on a story this can be very exhausting)
    • Click on "share comment" and open the single comment view

Additionally I noticed that Coral is using a deprecated (since 2018!) package to implement the WebSocket subscriptions, which is subscriptions-transport-ws
It tells that it should be replaced with graphql-ws
Is this migration already considered/planned?

Expected behavior:
WebSocket subscriptions for Live Updates work also in Firefox

Actual behavior:
WebSocket subscriptions for Live Updates do not work in Firefox

Related Issues:

Versions:

  • Coral: 7.3.0
  • NodeJS: coming from Coral Dockerfile
  • NPM: coming from Coral Dockerfile
  • MongoDB: 4.2 Docker image
  • Redis: 3.2 Docker image
  • Browser: Firefox 102.1.0esr (64-bit)
  • OS: Windows 10 (Client)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions