How to fix Error sending ICE candidate error?

Hello everyone, we often get an error:
Error sending ICE candidate: {" request ":" {\ "jsonrpc \": \ "2.0 \", \ "method \": \ "onIceCandidate \", \ "params \": {\ "endpointName \": \ "qhrjys9qozm4t2ep \", \ "candidate \": \ "candidate: 216027983 1 udp 2122260223 192.168.3.33 49558 typ host generation 0 ufrag W0H5 network-id 1 \", \ "sdpMid \": \ "0 \", \ "sdpMLineIndex \": 0}, \ "id \": 5} "," requestTime ": 1587984483042}

We use the latest version of Google Chrome
access to the camera and microphone we provide
to work with OpenVidu we use the openvidu-browser library

Please tell me what could be the reason?

We checked the operation of the STUN / TURN server here https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/, it works correctly

Please can you check if the problem also happen in Firefox?

Is there more information about the error in the console?

Can you share OpenVidu logs when the problem happen?

Yes, the problem arises both in FireFox and Google Chrome, most likely it does not depend on the browser

The full error text is as follows:

  1. Error sending ICE candidate: {“request”:"{“jsonrpc”:“2.0”,“method”:“onIceCandidate”,“params”:{“endpointName”:“jk2xk1xuephbxsqs”,“candidate”:“candidate:1567007887 1 udp 2122260223 192.168.1.247 63278 typ host generation 0 ufrag Z95b network-id 1 network-cost 10”,“sdpMid”:“0”,“sdpMLineIndex”:0},“id”:4}",“requestTime”:1588935801319}

  2. Error sending ICE candidate: {“request”:"{“jsonrpc”:“2.0”,“method”:“onIceCandidate”,“params”:{“endpointName”:“wibxwm1ljc3zzmht”,“candidate”:“candidate:2360025012 1 udp 2122255103 2001::2851:782c:2882:2818:43a1:ded6 58249 typ host generation 0 ufrag ZZ05 network-id 1 network-cost 50”,“sdpMid”:“0”,“sdpMLineIndex”:0},“id”:4}",“requestTime”:1588935745626}

  3. Error adding candidate for undefined stream of endpoint lyi1fjtnxbacpdtg_CAMERA_CPFZF: Error: PeerConnection object is closed

Regarding the logs of OpenVidu and KMS server, today I will attach them

Please describe where do you see the error? on browser? on OpenVidu server logs?

Also, please describe how have you deployed OpenVidu platform? What versions are you using?

Please share with us browser console, OpenVidu server logs and KMS logs when problems appear.

Regards

Hi Micael,

We are facing an issue in the Openvidu.

Actually As per the openvidu Docs we have to open the mentioned below Ports.

  • 40000 - 57000 TCP+UDP: used by Kurento Media Server to establish media connections.
  • 57001 - 65535 TCP+UDP: used by TURN server to establish relayed media connections.
    But our Company is providing only below mentioned ports and we have enabled only the ports in yml file
  • 40000 - 40010 TCP+UDP: used by Kurento Media Server to establish media connections.
  • 57001 - 57011 TCP+UDP: used by TURN server to establish relayed media connections.

Using these ports only our application is running .1000 of users are recording at same time most of the videos getting blank. I want to know because of the ports the video is getting blank or some other issue is there?
Incase port is the issue can you help me ,how to restrict other users who are not using the above mentioned Ports.

Kind Regards,
Jagadeesan

Hi Micael

I am getting the same error sometimes but not all times
ERROR:Request has timed out in Request: method:onIceCandidate params:{“endpointName”:“ipc_IPCAM_rtsp_BGXY_10_19_32_13_554_stream”,“candidate”:“candidate:425164710 1 udp 33562623 172.21.0.2 59435 typ relay raddr 10.19.32.50 rport 47546 generation 0 ufrag 2but network-cost 999”,“sdpMid”:“1”,“sdpMLineIndex”:1} request:{“jsonrpc”:“2.0”,“method”:“onIceCandidate”,“params”:{“endpointName”:“ipc_IPCAM_rtsp_BGXY_10_19_32_13_554_stream”,“candidate”:“candidate:425164710 1 udp 33562623 172.21.0.2 59435 typ relay raddr 10.19.32.50 rport 47546 generation 0 ufrag 2but network-cost 999”,“sdpMid”:“1”,“sdpMLineIndex”:1},“id”:10}