Open Bug 1863542 Opened 2 years ago Updated 2 years ago

Camera permission issue

Categories

(Firefox for Android :: Browser Engine, defect, P3)

Firefox 122
All
Android
defect

Tracking

()

Tracking Status
firefox120 --- affected
firefox121 --- affected
firefox122 --- affected

People

(Reporter: stef.beys, Unassigned)

Details

(Whiteboard: [qa-triaged])

Attachments

(5 files)

Steps to reproduce:

Device: Samsung Galaxy S20 FE 5G
Android version: 12

  1. go to https://webcamtest.com
  2. press test my cam
  3. when asked for permission press the checkbox to remember the decision for this site
  4. go trough all the camera devices

(codebase logic of my code)

  1. get default camera (which asks for permissions)
    await this.window.navigator.mediaDevices.getUserMedia({video: { facingMode: { ideal: 'environment'}}})

  2. Get camera list using await this.window.navigator.mediaDevices.enumerateDevices();

  3. change selectbox to other camera

  4. cleanup all the existing tracks/streams

  5. use the getUserMedia with the exact deviceId

  6. only 2 camera's work

Actual results:

2 out of 4 camera's don't start and throw the error: Uncaught (in promise) DOMException: Starting videoinput failed

Expected results:

all 4 camera's should be able to start up (in my own codebase it works when accepting the permission one at a time)

Select the checkbox

default camera works

camera back 2 won't work

note* it works when i switch back and forth between the 2 camera's (

Severity: -- → S3
Priority: -- → P3

Note: the test website seems to be https://webcamtests.com/

Thank you for the report!
I was not able to reproduce this issue on the https://webcamtests.com/ on Firefox 119.0.1 with an Oppo Find N2 Flip (Android 12) device.

We need more details:

  • did you had any add-ons enabled?
  • can you provide us a logcat?
  • can you try to test this on Chrome, as well?
Flags: needinfo?(stef.beys)
Whiteboard: [qa-triaged]
Attached file logcat.txt

I don't have any add-ons installed, on chrome it works perfectly.
I only have it on my Samsung phone, not my other phones (Xiaomi).

And added the logcat (don't know if it's too much)

Only when remembering the permission for the site.
(additionally when a camera is on and I close the app (fully) the message of firefox using my camera is still enabled, I need to force quit to remove it)

Flags: needinfo?(stef.beys)

Tested with a Samsung Galaxy S23 Ultra (Android 13) as the closest type of device to the one this issue was reproduced on.

I got through all 4 webcam tests. I had no issues, no errors.

Tested Firefox versions: latest RC 120.0 build 2 and latest Nightly 122.0a1 from 2023-11-22.

Please check the above mentioned versions as well, if you still reproduce your issue.

Thank you!

Flags: needinfo?(stef.beys)

Using RC 120.0 Build 2 and Nightly 122.0a1 the webcamtests site works,
However Sites where you can switch between active camera's don't

sites where i keep having issues:
https://www.kabas.be (the site i have access to the code) (choose "ik ben leerling" followed by "QR")
https://www.cam-recorder.com
https://zoom.us (create meet trough desktop mode)

Flags: needinfo?(stef.beys)
  • small correction on the websites

https://www.kabas.be should be https://www.staging.kabas.be (production still uses the old xzing-ngx-scanner which even had more issues...

Thank you!
Yes, that last link helps, on which I managed to reproduce close to what you described, though on cam-recorder.com and zoom.com, I didn't find anything out of place.

On https://www.staging.kabas.be I had one of the front cameras and one of the back cameras with an error (than as you said, switching back and again the same camera switches the camera with the error) from which with the few words I understand it says that another app uses the camera and I should close that other app to be able to use the camera, that other app being in fact the same, so it thinks the other front or back camera that is active is from another app? Sometimes I get error for both front cameras consecutively.

Also, I tested the same page on Chrome, where as you pointed out, it works as expected.

I'll leave my screenshot with the error message below.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Firefox 119 → Firefox 122
Attached image 1700752195576.JPEG

That message is only shown when the "AbortError" is thrown by the getUserMedia function, just to make debugging easier...

We're still working on the error handling since children have to read them...

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: