cammatch.com - Unable to start chatting, camera and microphone error despite permission being granted
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Webcompat Priority:P2, Webcompat Score:4, firefox138 affected, firefox139 affected, firefox140 affected, firefox158 affected)
People
(Reporter: ctanase, Unassigned)
References
()
Details
(Keywords: webcompat:needs-sitepatch, webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs])
User Story
platform:android impact:site-broken configuration:general affects:all branch:release diagnosis-team:video-conferencing user-impact-score:100
Attachments
(1 file)
|
1008.84 KB,
image/png
|
Details |
Environment:
Operating system: Android 15
Firefox version: Firefox Mobile 137.0/138/140
Steps to reproduce:
- Go to https://www.cammatch.com
- Select gender.
- Confirm the "WELCOME" pop-up.
- Tap on "Start chatting".
- Allow permission for microphone and camera when prompted.
- Observe the behavior.
Expected Behavior:
Camera preview is shown and "Start searching" button is displayed.
Actual Behavior:
Error regarding camera and microphone not being allowed.
Notes:
- Does not reproduce on Desktop
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly, and firefox-release
- Does not reproduce in chrome
Created from https://github.com/webcompat/web-bugs/issues/154311
| Reporter | ||
Comment 1•1 year ago
|
||
| Reporter | ||
Updated•1 year ago
|
Comment 2•1 year ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 3•1 year ago
•
|
||
I see this kind of code:
static async getMediaPermissions() {
const e = await navigator.permissions.query({
name: 'camera'
}),
t = await navigator.permissions.query({
name: 'microphone'
});
return {
camera: e.state,
microphone: t.state
}
}
static async requestMediaPermissions(e, t) {
(await navigator.mediaDevices.getUserMedia({
audio: e,
video: t
})).getTracks().forEach(n => {
n.stop()
})
}
and
static async requestAvailableMediaStream(e, t = !0) {
if (!se.supportsPermissionsAPI()) return se.requestMediaStream(e);
const n = !!e.audio,
i = !!e.video;
let a = await se.getMediaPermissions();
if (t) {
const c = a.microphone === 'prompt' &&
n,
l = a.camera === 'prompt' &&
i;
if (c || l) try {
await se.requestMediaPermissions(c, l)
} catch (v) {
console.error('Failed to prompt for media permissions', v)
}
a = await se.getMediaPermissions()
}
const r = a.microphone === 'granted',
o = a.camera === 'granted';
return r ||
o ? se.requestMediaStream({
audio: r ? e.audio : !1,
video: o ? e.video : !1
}) : new MediaStream
}
On Android per bug 1902460 comment 6 we only return 'prompt' for camera and microphone with temporary permissions. If t in the code above is truthy, requestAvailableMediaStream is going to return an empty MediaStream, which is likely causing the callsite to report an error.
Comment 4•1 year ago
|
||
An intervention could be suitable here just like for bug 1902460.
Updated•1 year ago
|
Updated•7 months ago
|
Comment 5•5 months ago
|
||
Could you please test if this still reproduces with the latest Nightly. The Nightly from today includes Bug 1924572 which should fix this issue.
| Reporter | ||
Comment 6•5 months ago
|
||
Still reproducible on the latest Nightly.
Note: account needed now, it asks to log in
Updated•5 months ago
|
Comment 7•4 months ago
|
||
I don't have time to investigate this currently. If the permissions API is involved Bug 1924572 could help here, but as stated in comment 6 the issue persists.
Comment 8•10 days ago
|
||
Seems to reproduce with and without the intervention active.
Updated•10 days ago
|
Description
•