Search code examples
javascriptangularwebsockethttpshttpserver

Secured WebSocket connection not working in FireFox and Chrome in MAC OS?


I am having two applications one in server and another one is client application. In server I am creating webSocket and in client I am creating we webSocket client.

Here I am getting Error (FireFox and Chrome) while creating webSocket client (in safari it is working fine).

I followed HTTPS configuration step which is in the link

 WebSocket connection to 'wss://localhost:8443/ws/v1/user/userId=user1' 

failed: Error in connection establishment: net::ERR_CERT_COMMON_NAME_INVALID

connect @   
web-socket.ts:53
    setTimeout  @   
web-socket.ts:86
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask    @   zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask   @   zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask    @   zone.js:496
ZoneTask.invoke @   zone.js:485
timer   

Solution

  • Firefox and chrome will keep on giving you error until you open up a separate tab and do try hitting URL https://localhost:8443 and Confirm Security Exception. Then try it will work.