WebRTC setRemoteDescription errors out if OPUS is codec in SDP

RESOLVED FIXED in Firefox 38.0.5

Status

()

Core
WebRTC: Signaling
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: Amit, Assigned: bwc)

Tracking

37 Branch
mozilla40
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox38 wontfix, firefox38.0.5 fixed, firefox39 fixed, firefox40 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150402191859

Steps to reproduce:

I have an application which does setRemoteDescription using RTCSessionDescription.
If the codec used is OPUS, the error from Browser is -

error = DOMError { name="InvalidSessionDescriptionError", message="Failed to negotiate codec details for all codecs"}

If I offer G711, this problem is not seen.

OPUS was working fine till 36.0.4.


Actual results:

Received an error for -
error = DOMError { name="InvalidSessionDescriptionError", message="Failed to negotiate codec details for all codecs"}

SDP answer that was provided was to browser which gave error was -
v=0                                                                                                                                                             
o=AMS 1 2 IN IP4 127.0.0.1                                                                                                                                      
s=c9725914-07bb-36cd-8386-0e602a0a5d4c                                                                                                                          
e=unknown@invalid.net                                                                                                                                           
c=IN IP4 10.129.x.x                                                                                                                                         
t=0 0                                                                                                                                                           
m=audio 6212 RTP/SAVPF 109                                                                                                                                      
c=IN IP4 10.129.x.x                                                                                                                                       
a=ice-ufrag:/LbBm2Io                                                                                                                                            
a=ice-pwd:v/R9Q3hkBClq4jrsrQdQ2wEL                                                                                                                              
a=candidate:33 1 udp 2130706431 10.129.x.x 6212 typ host                                                            
a=candidate:146 1 udp 16777215 10.129.x.x 49084 typ relay raddr 10.129.x.x rport 6212                          
a=fingerprint:sha-256 48:56:C2:56:DE:54:0E:50:F3:99:E1:C2:AA:FD:A1:B5:D6:E8:74:86:64:57:5D:53:79:83:D5:AA:1E:91:81:48  
a=rtpmap:109 OPUS/48000/2                                                                                              
a=fmtp:109 maxplaybackrate=16000; sprop-maxcapturerate=16000; maxaveragebitrate=18000; stereo=0; useinbandfec=0; usedtx=0; cbr=0; sprop-stereo=0                |
a=maxptime:20                                                                                                          
a=ptime:20                                                                                                             
a=minptime:20                                                                                                          
a=mid:sdparta_0                                                                                                         
a=rtcp-mux                                                                                                              
a=ssrc:3962656838 cname:c9725914-07bb-36cd-8386-0e602a0a5d4c                                                           
a=ssrc:3962656838 msid:c9725914-07bb-36cd-8386-0e602a0a5d4c c9725914-07bb-36cd-8386-0e602a0a5d4c-audio                 
a=sendrecv       

IP addresses are hidden here.


Expected results:

I should not have received -
error = DOMError { name="InvalidSessionDescriptionError", message="Failed to negotiate codec details for all codecs"}

Again, this issue is not seen on Firefox 36.0.4
(Reporter)

Comment 1

3 years ago
We found that Firefox is checking for opus in lower case and if upper case is passed, firefox is not able to parse this. we feel this is a bug which should be fixed and the check should be case insensitive.
(Assignee)

Comment 2

3 years ago
It could not hurt to make this case-insensitive, but emitting "OPUS" isn't correct.
(Assignee)

Comment 3

3 years ago
Created attachment 8590525 [details]
MozReview Request: bz://1152093/bwc

/r/6807 - Bug 1152093: Perform case-insensitive comparisons for codec types.

Pull down this commit:

hg pull -r f7ae5d86843b33d47f1bd978e367c9e06555e35a https://reviewboard-hg.mozilla.org/gecko/
(Assignee)

Comment 4

3 years ago
Comment on attachment 8590525 [details]
MozReview Request: bz://1152093/bwc

https://treeherder.mozilla.org/#/jobs?repo=try&revision=2565f0e851d5
Attachment #8590525 - Flags: review?(rjesup)
Comment on attachment 8590525 [details]
MozReview Request: bz://1152093/bwc

https://reviewboard.mozilla.org/r/6805/#review5711

Ship It!
Attachment #8590525 - Flags: review?(rjesup) → review+
(In reply to Byron Campen [:bwc] (PTO Apr 10-19) from comment #2)
> It could not hurt to make this case-insensitive, but emitting "OPUS" isn't
> correct.

See RFC4855 section 3:

   Note that the payload format (encoding) names defined in the RTP
   Profile [4] are commonly shown in upper case.  Media subtype names
   are commonly shown in lower case.  These names are case-insensitive
   in both places.  Similarly, parameter names are case-insensitive both
   in media type strings and in the default mapping to the SDP a=fmtp
   attribute.
(Assignee)

Comment 7

3 years ago
Comment on attachment 8590525 [details]
MozReview Request: bz://1152093/bwc

/r/6807 - Bug 1152093: Perform case-insensitive comparisons for codec types.

Pull down this commit:

hg pull -r 57ce0d8d1c1a45b260236574fdb1df4df123fa87 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8590525 - Flags: review+
(Assignee)

Comment 8

3 years ago
Trying to unbust windows builds.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=9906a25bcdf7
Flags: needinfo?(docfaraday)
(Assignee)

Comment 9

3 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=16e1a2edf9db
(Assignee)

Comment 10

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/a83c90ceb41f
Flags: needinfo?(docfaraday)
https://hg.mozilla.org/mozilla-central/rev/a83c90ceb41f
Assignee: nobody → docfaraday
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Comment on attachment 8590525 [details]
MozReview Request: bz://1152093/bwc

Approval Request Comment
[Feature/regressing bug #]: JSEP rewrite in 37 (may have predated that)

[User impact if declined]: Valid SDP (offers/answers) with lowercase codec names will be rejected.

[Describe test coverage new/current, TreeHerder]: manual/3rd-party-app testing

[Risks and why]: extremely low risk (case-insensitive comparisons)

[String/UUID change made/needed]: none
Attachment #8590525 - Flags: approval-mozilla-aurora?

Updated

3 years ago
Attachment #8590525 - Flags: approval-mozilla-beta?
status-firefox38: --- → affected
status-firefox39: --- → affected
Comment on attachment 8590525 [details]
MozReview Request: bz://1152093/bwc

Taking it for 38.0.5
Attachment #8590525 - Flags: approval-mozilla-beta?
Attachment #8590525 - Flags: approval-mozilla-beta+
Attachment #8590525 - Flags: approval-mozilla-aurora?
Attachment #8590525 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/5c890ed2dc6c
status-firefox39: affected → fixed
https://hg.mozilla.org/releases/mozilla-beta/rev/8f3aa39f5952
status-firefox38: affected → wontfix
status-firefox38.0.5: --- → fixed
(Assignee)

Comment 16

2 years ago
Comment on attachment 8590525 [details]
MozReview Request: bz://1152093/bwc
Attachment #8590525 - Attachment is obsolete: true
(Assignee)

Comment 17

2 years ago
Created attachment 8619983 [details]
MozReview Request: Bug 1152093: Perform case-insensitive comparisons for codec types.
You need to log in before you can comment on or make changes to this bug.