Open Bug 1882866 Opened 4 months ago Updated 1 month ago

Server Sent Events fails to reconnect (reports CORS error)

Categories

(Core :: DOM: Networking, defect, P2)

Firefox 123
defect
Points:
3

Tracking

()

UNCONFIRMED

People

(Reporter: sandro.p.dallo, Unassigned)

References

Details

(Whiteboard: [necko-triaged][necko-priority-next])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0

Steps to reproduce:

This seems similar to me as in Bug 1706003.

  1. Implemented an api which sends events to browsers and informs user about some stuff.
  2. Connected with several browser (Firefox, Chrome, Safari) to the api and receiving messages from the backend server.
  3. Shutdown backend server and wait until browsers logs following errors:
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3000/events. (Reason: CORS request did not succeed). Status code: (null).

Firefox can’t establish a connection to the server at http://localhost:3000/events. localhost:3001:90:24

  1. Restart backend server

A runnable demo application (Node) can be found under: https://github.com/snmed/sse-firefox-bug

I'm glad to be of assistance if needed.

Best regards,
Sandro

Actual results:

Chrome: Automatically reconnects with backend server and receives events.
Safari: Automatically reconnects with backend server and receives events.
Firefox: Does not receive any events at all.

Expected results:

Firefox reconnects automatically and receives events from backend server.

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking
Product: Firefox → Core
Flags: needinfo?(smayya)

I will check this as I am working on a similar bug and revert back.

Flags: needinfo?(smayya)
Flags: needinfo?(smayya)
See Also: → 1706003, 1872413, 814144, 1251117

Hello Sandro,
Thank you for filing the bug report and steps for reproduction.
I failed to reproduce this issue locally with my latest nightly build. We had made some changes in this handling recently and may be that fixes this issue.
Could you please try this in the latest nightly/release and confirm?

Regards
Sunil

Flags: needinfo?(smayya) → needinfo?(sandro.p.dallo)

Hi Sunil

I used the actual nightly build 127.0a1 (Windows 64-bit, Linux 64-bit, Mac Intel 64-bit) and can still reproduce it. Did you follow the "README.md" file?

Best regards,
Sandro

Flags: needinfo?(sandro.p.dallo)

I think I am able to reproduce and I'll put this in our queue to get this fixed soon.

Severity: -- → S3
Component: Networking → DOM: Networking
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-next]
Points: --- → 3
You need to log in before you can comment on or make changes to this bug.