Can't access webcam in Whatsapp Web
Description
I'm trying to use the webcam in a webapp, specifically inside web.whatsapp.com. I receive a negative answer: it seems that the webcam is not found, but I often use it in the main Firefox installation.
Steps to Reproduce
- Open web.whatsapp.com
- In any chat, try to open the webcam
Additional Information
Affected Websites
- web.whatsapp.com
Environment
- Operating system: Fedora 40
- System architecture: x86-64?
- Desktop environment: KDE Plasma 6.1
- Installation method: RPM
- PWAsForFirefox extension version: 2.12.1
- PWAsForFirefox native version: 2.12.1
- PWAsForFirefox runtime version: 128.0.3
- Firefox version: 128.0.3
Can you download Firefox directly from Mozilla and check if webcam works there? Also, did you see any permissions popups?
Downloading Firefox directly from Mozilla works:
I didn't see any permission popup: may it be that I accidentally disabled them?
Can you check if there are any errors when loading PWA or trying to use the camera in runtime logs? Maybe something broke the permissions handling in PWAs (although it works fine for me for notifications permission, haven't tested camera yet)...
You can check in the settings of the PWA browser if you have maybe blocked camera permission. You can also try to install WhatsApp in a new profile, as permission popups aren't blocked by default, so you should see one.
It seems the permissions in the PWA browser are okay. I'll check the logs.
I found an hint: I had hidden the icon bar changing the "firefoxpwa.enableHidingIconBar" option in about:config; now, when trying to use send a voice message or take a picture, the popups which appear asking to grand access to microphone and webcam appear only briefly, and even when I succeed in putting my mouse there, they are not clickable.
I solved showing the icon bar, granting access and then hiding again the icon bar.
But I still can't use them: upon closing and reopening the app, it asks again for permissions and again I can't use them. It seems that when I hide again the iconBar the problem reappears.
You will probably have to show the icon bar every time before the permissions popup is supposed to appear. This is known issue (and is documented here), but fixing it would require quite a lot of work. I plan to do it at some point while rewriting the UserChrome modifications, but that probably won't be ready anytime soon.
Thank you very much!