SignalR WebSocket Connectivity Issue in FireFox
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
I am getting "Error: Failed to start the transport 'WebSockets': Error: WebSocket failed to connect" while using SignalR in an Angular application with .NET 6.0. The issue occurs specifically in **Mozilla Firefox** and it's random. Despite attempting to refresh the page, the problem persists. However, closing and reopening the browser resolves the issue.
After approximately 1-2 minutes of being stuck in the "connecting" state, SignalR throws an error and automatically switches its transport protocol to Server-Sent Events (SSE), following which the connection successfully establishes.
The WebSocket connection is working fine in Chrome
### Expected Behavior
Like Chrome a websocket connection should be established in Firefox as well.
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version
.Net Version: 6.0.3 Signalr Version: 6.0.3
### Anything else?

Contributor guide
Assessment
This issue has not been assessed yet.