Closed Bug 1817936 Opened 2 years ago Closed 2 years ago

RTCRtpSender.getParameters + setParameters always results in an invalid call warning

Categories

(Core :: WebRTC: Signaling, defect)

Firefox 110
defect

Tracking

()

VERIFIED FIXED
112 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox110 --- wontfix
firefox111 --- verified
firefox112 --- verified

People

(Reporter: joao, Assigned: bwc)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

Invoking RTCRtpSender.setParameters immediately after RTCRtpSender.getParameters always results in an "Invalid setParameters call detected!" warning with a specific error of: "Cannot change transaction id: call getParameters, modify the result, and then call setParameters", regardless of if the parameters object obtained from RTCRtpSender.getParameters was modified or not.

Minimal repro (thanks to Dag-Inge Aas):

https://codepen.io/daginge/pen/JjaGeRe

The issue seems to have been introduced by the following change: https://phabricator.services.mozilla.com/D156834

Actual results:

The setParameters call resulted in a warning: "Invalid setParameters call detected! The good news? Firefox supports sendEncodings in addTransceiver now, so we ask that you switch over to using the parameters code you use for other browsers. Thank you for your patience and support. The specific error was: Cannot change transaction id: call getParameters, modify the result, and then call setParameters"

Expected results:

The setParameters call done immediately after, and with the result of, getParameters should be valid and no warning emitted.

Flags: needinfo?(docfaraday)

This is a pretty easy fix.

Flags: needinfo?(docfaraday)
Assignee: nobody → docfaraday

I was able to reproduce this issue thanks to the reduced test case and I got a regression range for it, here is the Pushlog:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5a2aac1feb784be71e029497969db1a25f581ec0&tochange=4a8af015edd89e39350a0c2a38796b91a96eb0e4

I'm not sure which of those two issues caused this issue.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Component: Untriaged → WebRTC: Signaling
Ever confirmed: true
Product: Firefox → Core
Pushed by bcampen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00905b30f0f3 When using compat mode, compare against [[LastReturnedParameters]] if set. r=jib
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch

Verified as fixed in our latest Nightly 112.0a1 (2023-03-01).

The patch landed in nightly and beta is affected.
:bwc, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox111 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(docfaraday)

Sure, let's uplift to beta.

Flags: needinfo?(docfaraday)

Comment on attachment 9319322 [details]
Bug 1817936: When using compat mode, compare against [[LastReturnedParameters]] if set. r?jib

Beta/Release Uplift Approval Request

  • User impact if declined: Developers of web conferencing services are going to be confused by these incorrect warnings, and our telemetry is going to be muddied.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Very simple change.
  • String changes made/needed: None.
  • Is Android affected?: Yes
Attachment #9319322 - Flags: approval-mozilla-beta?

Comment on attachment 9319322 [details]
Bug 1817936: When using compat mode, compare against [[LastReturnedParameters]] if set. r?jib

Approved for 111.0b8

Attachment #9319322 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed in our latest Beta Build 111.0b8 .

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: