bugtracker icon indicating copy to clipboard operation
bugtracker copied to clipboard

IceGatheringDoneEvent gets triggered before ICE candidate gathering is finished

Open jbabob opened this issue 5 years ago • 1 comments

Prerequisites

  • [x] I have read the SUPPORT document

  • [x] I have checked the Troubleshooting Guide

  • [x] I have tested with the latest version

Issue description

I created a WebRtcEndpoint with even listeners for IceCandidateFoundEvent and IceGatheringDoneEvent. IceCandidateFoundEvent was triggered multiple times after IceGatheringDoneEvent was triggered.

Context

I'd like to start a video streaming without the use of Trickle ICE. My program waits for IceGatheringDoneEvent to be triggered before responding with the SDP answer. IceGatheringDoneEvent is the first event to be triggered, and then IceCandidateFoundEvent gets triggered multiple times. NewCandidatePairSelectedEvent never gets triggered and video stream does not start.

How to reproduce?

Expected & current behavior

All ICE candidates should be found before IceGatheringDoneEvent is triggered.

(Optional) Possible solution

Environment info

INFO: Kurento Media Server

  • Kurento version:
  • Server OS:
  • Installation method:
    • [ ] apt-get
    • [x] Docker
    • [ ] AWS
    • [ ] Built from sources

INFO: Application Server

  • Language:
  • Kurento Client version:

INFO: End-user clients

  • Device(s):
  • OS(es):
  • Browser(s):

Version details

kurento-media-server -v

lsb_release -a

dpkg -l | grep -Pi 'kurento|kms-|gst.*1.5|nice'

jbabob avatar Mar 09 '20 20:03 jbabob

IceGatheringDoneEvent is just a forwarded emission of libnice's candidate-gathering-done signal.

Video and audio tracks are their own independent components, so make sure you are not seeing e.g. IceGatheringDoneEvent from the video component, and then some IceCandidateFoundEvent from the audio component.

NewCandidatePairSelectedEvent never gets triggered

This, however, is a more serious problem, as it indicates that ICE wasn't able to find a connectivity path between Kurento and the remote peer. Review all ICE candidates found and see if any of them is able to reach a common network that connects Kurento with the other side. You should probably configure STUN and/or TURN servers in both Kurento and the other peer.

j1elo avatar Mar 11 '20 15:03 j1elo