Closed
Bug 856425
Opened 13 years ago
Closed 13 years ago
onicecandidate fails to fire in simple local to remote peer handshake with custom STUN server (see testcase)
Categories
(Core :: WebRTC, defect, P2)
Core
WebRTC
Tracking
()
VERIFIED
FIXED
mozilla22
| Tracking | Status | |
|---|---|---|
| firefox22 | --- | fixed |
People
(Reporter: jsmith, Assigned: abr)
References
Details
(Keywords: testcase, Whiteboard: [webrtc][blocking-webrtc+][parity-chrome][spec-issue])
Attachments
(2 files, 2 obsolete files)
|
2.67 KB,
text/html
|
Details | |
|
1.42 KB,
patch
|
ekr
:
review+
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Steps:
1. Load the attached test case in Firefox
2. Watch the alert dialogs that fire
3. Run the same test case in Chrome
Expected:
We should get the same behavior in Chrome and Firefox. On Firefox's side, I would have expected onicecandidate to fire upon setLocalDescription being called on the local peer.
Actual:
onicecandidate never fires in Firefox after calling setLocalDescription, but it will fire in Chrome doing that same test case.
In general, the behavior Firefox does here is almost completely different than Chrome. Firefox basically does:
1. local pc createOffer
2. local pc setLocalDescription
3. remote pc setRemoteDescription
4. remote pc createAnswer
5. remote pc setLocalDescription
6. local pc setRemoteDescription
With each onicecandiate event handler never firing. Chrome's behavior however is entirely different:
1. local pc create offer
2. local pc setLocalDescription
3. local pc onicecandidate fired
console logs:
a=candidate:505434299 1 udp 2113937151 192.168.1.6 62237 typ host generation 0
audio
0
4. local pc onicecandidate fired
console logs:
a=candidate:505434299 1 udp 2113937151 192.168.1.6 62237 typ host generation 0
audio
0
5. local pc onicecandidate fired
console logs:
a=candidate:3078610798 1 udp 1845501695 98.248.43.172 62237 typ srflx raddr 192.168.1.6 rport 62237 generation 0
audio
0
6. local pc onicecandidate fired
console logs:
a=candidate:3078610798 1 udp 1845501695 98.248.43.172 62237 typ srflx raddr 192.168.1.6 rport 62237 generation 0
audio
0
7. local pc onicecandidate fired
console logs:
a=candidate:505434299 1 udp 2113937151 192.168.1.6 62237 typ host generation 0
audio
0
8. local pc onicecandidate fired
console logs:
a=candidate:505434299 1 udp 2113937151 192.168.1.6 62237 typ host generation 0
audio
0
9. local pc onicecandidate fired
candidate is null in this case
| Reporter | ||
Updated•13 years ago
|
Whiteboard: [parity-chrome]
Comment 1•13 years ago
|
||
ekr (or abr): how big an issue is this?
Flags: needinfo?(ekr)
Whiteboard: [parity-chrome] → [webrtc][blocking-webrtc?][parity-chrome][spec-issue]
Comment 2•13 years ago
|
||
We need to generate an end of candidates indication, but not individual candidates.
abr: isn't this a dupe of something else.
Flags: needinfo?(ekr)
Updated•13 years ago
|
Assignee: nobody → adam
Whiteboard: [webrtc][blocking-webrtc?][parity-chrome][spec-issue] → [webrtc][blocking-webrtc+][parity-chrome][spec-issue]
Updated•13 years ago
|
Priority: -- → P2
| Assignee | ||
Comment 3•13 years ago
|
||
To be clear, the spec does not say anything about onicecandidate being called with a null candidate once gathering is done; this is just something Chrome has decided to do, and several scripts rely on the behavior as a consequence.
The generation of trickle candidates is covered by bug 842549. Until that lands, the repeated calls to onicecandidate will not happen. What is important, from a "compatibility with Chrome" perspective, is the null candidate generation.
The current workaround, proposed by EKR, is to simply call onicecandidate with a null candidate every time setLocalDescription succeeds, immediately after the setRemoteDescription success callback. This is an easy fix.
| Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Adam Roach [:abr] from comment #3)
> To be clear, the spec does not say anything about onicecandidate being
> called with a null candidate once gathering is done; this is just something
> Chrome has decided to do, and several scripts rely on the behavior as a
> consequence.
I retract this statement. It appears that the spec *does* document this. It simply does it in such a way that matches none of the search terms I was using.
Comment 5•13 years ago
|
||
Yes, I think it's clear that this is the required behavior.
Comment 6•13 years ago
|
||
(In reply to Adam Roach [:abr] from comment #3)
> To be clear, the spec does not say anything about onicecandidate being
> called with a null candidate once gathering is done; this is just something
> Chrome has decided to do, and several scripts rely on the behavior as a
> consequence.
>
> The generation of trickle candidates is covered by bug 842549. Until that
> lands, the repeated calls to onicecandidate will not happen. What is
> important, from a "compatibility with Chrome" perspective, is the null
> candidate generation.
Note that there is absolutely no requirement that we implement trickle ICE.
The sole requirement is that we generate the final event that signals the
end of gathering.
> The current workaround, proposed by EKR, is to simply call onicecandidate
> with a null candidate every time setLocalDescription succeeds, immediately
> after the setRemoteDescription success callback. This is an easy fix.
Updated•13 years ago
|
Whiteboard: [webrtc][blocking-webrtc+][parity-chrome][spec-issue] → [webrtc][blocking-webrtc+][parity-chrome][spec-issue][webrtc-uplift]
| Assignee | ||
Comment 7•13 years ago
|
||
The test case no longer works on nightly, as generation of an offer without any streams and without any constraints results in a failure. This testcase adds an "OfferToReceiveAudio" constraint to make the call succeed.
Attachment #731652 -
Attachment is obsolete: true
| Assignee | ||
Comment 8•13 years ago
|
||
More fixes to the test. We can't really use alert(), since it hangs processing and perturbs the order of events; this outputs steps in the HTML body. This also fixes some issues where getting a null candidate causes the test to throw exceptions.
Attachment #735176 -
Attachment is obsolete: true
| Assignee | ||
Comment 9•13 years ago
|
||
| Assignee | ||
Updated•13 years ago
|
Attachment #735209 -
Flags: review?(ekr)
Comment 10•13 years ago
|
||
Comment on attachment 735209 [details] [diff] [review]
Call onicecandidate with a null candidate immediately after setLocalDescription succeeds
Review of attachment 735209 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm
Attachment #735209 -
Flags: review?(ekr) → review+
| Assignee | ||
Comment 11•13 years ago
|
||
Comment 12•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Comment 14•13 years ago
|
||
Comment on attachment 735209 [details] [diff] [review]
Call onicecandidate with a null candidate immediately after setLocalDescription succeeds
[Approval Request Comment]
Bug caused by (feature/regressing bug #): n/a
User impact if declined: Various WebRTC applications tested with Chrome assume that an empty ice candidate message will be sent, making it hard to write applications that work with both FF and Chrome without sniffing and alternative flows.
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): no risk
String or IDL/UUID changes made by this patch: none
Attachment #735209 -
Flags: approval-mozilla-aurora?
Updated•13 years ago
|
Attachment #735209 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 15•13 years ago
|
||
status-firefox22:
--- → fixed
Whiteboard: [webrtc][blocking-webrtc+][parity-chrome][spec-issue][webrtc-uplift] → [webrtc][blocking-webrtc+][parity-chrome][spec-issue]
Target Milestone: mozilla23 → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•