OpenVidu / openvidu-tutorials

OpenVidu tutorials to get started
http://openvidu.io/tutorials
Apache License 2.0
228 stars 255 forks source link

openvidu-js-java Chrome ok, Firefox cannot connect #142

Closed d01010101 closed 3 years ago

d01010101 commented 3 years ago

I run openvidu-js-java as written at https://docs.openvidu.io/en/2.16.0/tutorials/openvidu-js-java/

I test in Chrome 86.0.4240.193 (Official Build) (64-bit) several times, publisher subscriber etc. All works perfectly. The sound becomes easily garbled/muted but I guess that it is some effect of echo cancellation, even if I wear a headset.

Then I try the same in Firefox 82.0.2 (64-bit). Clicking on "Ok" in join session does not work:

GET wss://localhost:4443/openvidu
Firefox can’t establish a connection to the server at wss://localhost:4443/openvidu. webSocketWithReconnection.js:44:13
Could not connect to wss://localhost:4443/openvidu (invoking onerror if defined) 
error { target: WebSocket, isTrusted: true, srcElement: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, … }
webSocketWithReconnection.js:54:15
--------- ONERROR ----------- jsonrpcclient.js:123:15
Connection closed unexpectecly. Reconnecting... webSocketWithReconnection.js:68:23
reconnect (attempt #1, max=2000) webSocketWithReconnection.js:79:15
--------- ONRECONNECTING ----------- jsonrpcclient.js:77:15
Reconnection attempt #1 webSocketWithReconnection.js:99:15

Going back to Chrome, everything is ok again.

micaelgallego commented 3 years ago

Have you accepted unsecured certificate in Firefox in https://localhost:4443 ?

d01010101 commented 3 years ago

I guess that I only accepted an insecure connection for https://localhost:5000. I had no idea that I need to accept one separately for https://localhost:4443. Why there was no such need in Chrome?

In any case, I have just put https://localhost:4443 in the address bar and accepted the certificate and it works for me now. Thanks a lot.