Bug 274730

Summary: [GTK] WebRTC: getUserMedia fails with missing camera access in bubblewrap sandbox
Product: WebKit Reporter: Byoungchan Lee <byoungchan.lee>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bugs-noreply, mcatanzaro, philn
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Linux   
Bug Depends on:    
Bug Blocks: 235885    

Description Byoungchan Lee 2024-05-26 12:05:22 PDT
Steps to reproduce:
1. Build WebKitGTK from source with ENABLE_BUBBLEWRAP_SANDBOX=ON.
2. Run the built WebKitGTK application.
3. Connect a webcam to your system.
4. Open this URL: https://webrtc.github.io/samples/src/content/getusermedia/resolution/
5. Click on 'VGA' or 'HD' button.

Expected result:
A permission request dialog is displayed to grant camera access to the application.

Actual result:
The application doesn't request camera access. On standard output, the following message is printed: "Video capture was requested but no device was found amongst 0 devices".

Additional information:
Disabling bubblewrap sandbox (ENABLE_BUBBLEWRAP_SANDBOX=OFF) during WebKitGTK build resolves the issue. However, this might introduce other problems, but it's a different story.

Version:
$ git rev-parse --short HEAD
92bcd775f93e
Comment 1 Michael Catanzaro 2024-05-27 05:17:51 PDT
It probably tries to access the device directly (not allowed) rather than going through the camera portal (which is mandatory).

(Be aware you're going to run into a lot more problems than this if trying to use WebRTC. E.g. the sandbox will block network access, bug #244002.)
Comment 2 Philippe Normand 2024-05-27 06:30:25 PDT

*** This bug has been marked as a duplicate of bug 244004 ***