Closed Bug 2034722 Opened 13 days ago Closed 8 days ago

Regression between 149.0.2-1 and 150.0-1 cannot use v4l2loopback based webcam: USER_FORBIDDED_CAPTURE_VIDEO Error: Video loadedmetadata timeout 3 with canon EOS as webcam

Categories

(Core :: WebRTC: Audio/Video, defect, P2)

Firefox 150
defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
relnote-firefox --- 150+
firefox-esr140 --- unaffected
firefox150 --- fixed
firefox151 --- fixed
firefox152 --- fixed

People

(Reporter: sam, Assigned: pehrsons)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files)

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

Steps to reproduce:

Start canon EOS webcam with: gphoto2 --stdout --set-config liveviewsize=0 --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 -s:v 1366x768 -r 25 /dev/video0
Loaded firefox snap on ubuntu 26.04 after update to 150.0-1, joined a zoom meeting in the web app. Tried to turn on my webcam.

Actual results:

I was unable to connect to camera. The console reported: USER_FORBIDDED_CAPTURE_VIDEO Error: Video loadedmetadata timeout 3 with canon EOS as webcam

Expected results:

Webcam should have started up, as it did in 149.0.2-1

I've confirmed that a) the camera device still works (I get a stream with ffplay), and b) the issue is not on the zoom webapp side. I can't get a preview in the firefox permission popup window, and can't get the camera to work on other webcam testing sites.

The Bugbug bot thinks this bug should belong to the 'Core::WebRTC: Audio/Video' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core

Hi Samuel, thanks for the report. Does it reproduce (i.e. also not starting and/or showing frames) with the camera option on https://mozilla.github.io/webrtc-landing/gum_test.html? Would you be able to reproduce this with debug logging enabled?
If so, the instructions are:

  • Startup the browser in a fresh profile, i.e. no extensions and no existing tabs.
  • Go to about:logging, select the WebRTC preset and click Start Logging.
  • Open a new tab where you reproduce the issue, ideally on gum_test.html if it reproduces there, otherwise Zoom web works.
  • Once reproduced, go back to about:logging, click Stop Logging.
  • A new tab will appear with the Firefox Profiler. In the top right corner click to upload the profile. Make sure to include hidden threads! Do as you wish with the other options, as long as the timeline contains the getUserMedia request and response.
  • When uploaded, share the link here.

Thank you!

Flags: needinfo?(sam)

FWIW USER_FORBIDDED_CAPTURE_VIDEO seems to be a Zoom error. Unclear if it's specific to gUM rejecting with NotAllowedError or all gUM rejection. The profile will tell.

Yup, it is replicated on the gum_test. I've taken logs which are available here: https://share.firefox.dev/4e7ef2W
I also ran Mozregression:

 7:16.57 INFO: Narrowed integration regression window from [6de5bbf9, 81adc19b] (3 builds) to [7a02c406, 81adc19b] (2 builds) (~1 steps left)
 7:16.57 INFO: No more integration revisions, bisection finished.
 7:16.57 INFO: Last good revision: 7a02c40691b27da758d8070e3ae925e65da0a555
 7:16.57 INFO: First bad revision: 81adc19b420f055dd9e5b1ef30962829b403437d
 7:16.57 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7a02c40691b27da758d8070e3ae925e65da0a555&tochange=81adc19b420f055dd9e5b1ef30962829b403437d
Flags: needinfo?(sam)

Hi all,
any more information that I can provide on this?

Brilliant, thanks. I see this in the log, but not either of these, meaning we returned early here.

Likely regressor is https://hg-edge.mozilla.org/mozilla-central/rev/d35564be296062a87d5fbd94d9ba7df60fb81e5e.

I also see from the logs (in the parent process getUserMedia request for the prompt preview) that we are using hardcoded capabilities. That only happens when the device reports none:

Start Duration Name Details
16.876s LogMessages (D/MediaManager) Hardcoded capability: 854 x 640 x 30 maxFps, unknown. Distance = 0
16.876s LogMessages (D/MediaManager) Hardcoded capability: 854 x 480 x 30 maxFps, unknown. Distance = 0
16.876s LogMessages (D/MediaManager) Capability: 854 x 640 x 30 maxFps, unknown. Distance = 250
16.876s LogMessages (D/MediaManager) Capability: 854 x 480 x 30 maxFps, unknown. Distance = 0
16.876s LogMessages (D/MediaManager) Chosen capability: 854 x 480 x 30 maxFps, unknown. Distance = 0
16.876s LogMessages (D/MediaManager) ChooseCapability(kFeasibility) for mCapability (Allocate) --
16.876s LogMessages (D/MediaManager) Video device 0 allocated
16.876s LogMessages (D/MediaManager) virtual void mozilla::MediaEngineRemoteVideoSource::SetTrack(const RefPtr<MediaTrack> &, const PrincipalHandle &)
16.876s LogMessages (D/MediaManager) virtual nsresult mozilla::MediaEngineRemoteVideoSource::Start()
16.876s LogMessages (D/MediaManager) nsresult mozilla::MediaEngineRemoteVideoSource::StartCapture(const NormalizedConstraints &, const dom::VideoResizeModeEnum &)
16.877s LogMessages (D/MediaManager) started videoinput device 7ef768d83100

S3 because capability-less devices are not particularly common.

Assignee: nobody → apehrson
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: regression
Priority: -- → P2
Regressed by: 2012483

Set release status flags based on info from the regressing bug 2012483

Some legit devices report no capabilities. In such cases we want to
start them with the requested capability and wait to see what we get.

Perfect. I can confirm that applying D296943 to the FIREFOX_150_0_1_BUILD1 tag fixes the problem for me.

Great! Thanks for checking. Let's uplift it as far as we can, and with the gtest we should avoid similar regressions in the future.

Pushed by pehrsons@gmail.com: https://github.com/mozilla-firefox/firefox/commit/a92521f7d65c https://hg.mozilla.org/integration/autoland/rev/52139df4e29c Add DeviceInfo backend without capabilities, for testing. r=webrtc-reviewers,mjf https://github.com/mozilla-firefox/firefox/commit/3e1f32dc4097 https://hg.mozilla.org/integration/autoland/rev/29ad72dea30d Add gtest for StartStream with capability-less DeviceInfo. r=webrtc-reviewers,mjf https://github.com/mozilla-firefox/firefox/commit/6868ade819ba https://hg.mozilla.org/integration/autoland/rev/b506d048711b Return a combined capability even when device reports no capabilities. r=webrtc-reviewers,mjf
Flags: in-testsuite+

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Camera capture broken since 150 for a tiny subset of devices
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Trivial change
  • String changes made/needed?: None
  • Is Android affected?: unknown
Attachment #9574956 - Flags: approval-mozilla-beta?

Some legit devices report no capabilities. In such cases we want to
start them with the requested capability and wait to see what we get.

Original Revision: https://phabricator.services.mozilla.com/D296943

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: Camera capture broken since 150 for a tiny subset of devices
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Trivial change
  • String changes made/needed?: None
  • Is Android affected?: unknown
Attachment #9574957 - Flags: approval-mozilla-release?

Some legit devices report no capabilities. In such cases we want to
start them with the requested capability and wait to see what we get.

Original Revision: https://phabricator.services.mozilla.com/D296943

Attachment #9574956 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9574957 - Flags: approval-mozilla-release? → approval-mozilla-release+
QA Whiteboard: [uplift] [qa-triage-done-c152/b151]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: