'Websocket wss connection does not work in Firefox 89 on localhost

Websocket wss connection does not work in Firefox 89 on localhost.

When I use my https://client.com and I try to connect to https://server.com websocket connection from the production server, it works.

When I try to start the connection from localhost:4200(client) to localhost:5001(server), it does not work.

Firefox can’t establish a connection to the server at wss://localhost:5001/hub Error: Failed to start the connection: null

I allowed the connection in firefox config, but it did not fix the issue.

Firefox Config for websockets image



Solution 1:[1]

The fix was that the I had to reach the https://localhost:5001/hub from the browser window and accept the certificate. After that when it tried to establish WS connection it worked.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dimitri