New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 15 users
Status: Available
Owner: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Sign in to add a comment
ICE gathering state does not get changed at the right time
Reported by, Jun 3 2013 Back to list
What steps will reproduce the problem?
1. Create a new RTCPeerconnection instance
2. Add a local stream to RTCPeerconnection 
3. Execute createOffer and setLocalDescription

What is the expected result?

During setLocalDescription execution, and before firing onSuccess callback, ice gathering state should be changed from 'new' to 'gathering'.

Such behavior is defined in steps 4 and 5 of the spec if the RTCSessionDescription argument is applied successfully:

What do you see instead?

ice gathering state value is 'new' by the time onSuccess callback is fired

What version of the product are you using? On what operating system?

Version 29.0.1521.3 dev
GNU Linux (Debian)

Please provide any additional information below.

Attached a .html file to reproduce it. Steps are:

1- Start()
2- Call()

Interesting logs are displayed in red in the browser console (console.error)

4.4 KB View Download
Comment 1 by, Jun 3 2013
It can also be seen when using "", accessing "chrome://webrtc-internals/" in chrome.

There can be seen, that before queuing setLocalDescription's onSuccessCallback, signaling state change is made, but not ice gathering state, which should, according to the spec.
Comment 2 by, Jun 4 2013
Labels: Area-PeerConnection
Status: Available
Comment 3 by, Jun 4 2013
This behavior is very desirable for those signaling mechanisms which need to send the ICE candidates within the SDP. On setLocalDescription's onSuccessCallback, if the ice gathering state is not complete, the Offer/Answer sending is postponed until the last candidate is gathered or immediately sent if the description didn't cause an ICE restart.

There is no other way AFAIK, among the createOffer/createAnwser or setLocalDescription callbacks, to know if setLocaDescription caused an ICE restart. 

Project Member Comment 4 by, Jun 5 2013
Comment 5 by, Jun 5 2013
Thanks for the explanation. I will look into what's needed to fix this.
Comment 6 by, Jun 9 2013
Thanks a lot Justin.

Here some additional log from 'chrome://webrtc-internals' while running '':

6/9/2013 5:06:37 PM	setLocalDescription
6/9/2013 5:06:37 PM	signalingStateChange -> SignalingStateHaveLocalOffer
6/9/2013 5:06:37 PM	setLocalDescriptionOnSuccess
6/9/2013 5:06:37 PM	iceGatheringStateChange -> ICEGatheringStateGathering

Ice Gathering State is changed after firing setLocalDescription onSuccess callback, and not before, making impossible to know whether the local description has fired an ICE update or not on the onSuccess callback.
Comment 7 by, Oct 16 2014
Labels: IceBox EngTriaged
Summary: ICE gathering state does not get changed at the right time (was: SetLocalDescription implementation is not complete)
Project Member Comment 8 by, Nov 4 2015
This bug hasn't been modified for more than a year. Is this still a valid open issue?
Project Member Comment 9 by, Nov 8 2016
Labels: Pri-3
Project Member Comment 10 by, Dec 14 2016
Owner: ----
I'm still seeing the issue above, are there any updates?
Sign in to add a comment