WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
296007
REGRESSION(
292932@main
): [GTK][WPE] Output audio device enumeration does not work
https://bugs.webkit.org/show_bug.cgi?id=296007
Summary
REGRESSION(292932@main): [GTK][WPE] Output audio device enumeration does not ...
Adrian Perez
Reported
2025-07-15 14:00:29 PDT
Using navigator.mediaDevices.enumerateDevices() no longer works in ToT. Bisecting from a good commit landed on
292932@main
being the culprit. Steps to reproduce % run-minibrowser --wpe -- \ --features='ExposeSpeakers,ExposeSpeakersWithoutMicrophone,PerElementSpeakerSelection,-SpeakerSelectionRequiresUserGesture,LogsPageMessag esToSystemConsole' \
https://people.igalia.com/aperez/joplin.html
Expected outcome: Audio output devices are enumerated, logged accordingly, and a checkbox is added to the page for each of them. Actual outcome: The promise returned by enumerateDevices() never gets resolved.
Attachments
GStreamer log with GST_DEBUG='3,webkit*:6'
(352.66 KB, text/plain)
2025-07-17 08:11 PDT
,
Adrian Perez
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2025-07-16 02:52:44 PDT
Works fine here: Accepting WebKitUserMediaPermissionRequest request
https://people.igalia.com/aperez/joplin.html:24:14
: CONSOLE LOG getUserMedia success, fetching devices, stream: [object MediaStream]
https://people.igalia.com/aperez/joplin.html:32:14
: CONSOLE LOG Audio device enumeration started...
https://people.igalia.com/aperez/joplin.html:32:14
: CONSOLE LOG stopping audio track "934ed5fc-549e-444c-a299-47a02ec0a2ca" (Built-in Audio Analog Stereo)
https://people.igalia.com/aperez/joplin.html:32:14
: CONSOLE LOG Device "6F63BCAE32663CBF0A043CAFD1B013139CE7534C" skipped, type is "audioinput"
https://people.igalia.com/aperez/joplin.html:32:14
: CONSOLE LOG Device "default" added: "Default - Built-in Audio Analog Stereo"
https://people.igalia.com/aperez/joplin.html:32:14
: CONSOLE LOG Device "A94CCA91C199013F31E1F1FA0267CAF86870F53B" added: "Built-in Audio Analog Stereo" Can you share a GST_DEBUG="3,webkit*:6" log please?
Philippe Normand
Comment 2
2025-07-16 03:03:37 PDT
I guess you don't have desktop portals on the device, right?
Adrian Perez
Comment 3
2025-07-17 03:42:25 PDT
(In reply to Philippe Normand from
comment #2
)
> I guess you don't have desktop portals on the device, right?
That's right, the device for which I first implemented device enumeration/setSinkId does not have portals; and not even PipeWire -- it uses ALSA directly. I forgot to mention above in the issue description that the command used to reproduce needs to be used with the Flatpak SDK. When I noticed that using Flatpak would hit the issue then I continued using it to do the bisection faster.
Adrian Perez
Comment 4
2025-07-17 08:11:03 PDT
Created
attachment 476071
[details]
GStreamer log with GST_DEBUG='3,webkit*:6' Here's the log, running with the following command using the Flatpak SDK, with a build done on commit
297517@main
: GST_DEBUG_FILE="$(pwd)/gstreamer.log" \ GST_DEBUG='3,webkit*:6' run-minibrowser --wpe -- \ --features='ExposeSpeakers,ExposeSpeakersWithoutMicrophone,PerElementSpeakerSelection,-SpeakerSelectionRequiresUserGesture,LogsPageMessagesToSystemConsole' \
https://people.igalia.com/aperez/joplin.html
The console output is: SDK origin: webkit Using default MiniBrowser Mesa: The provided filesystem timestamp for the cache is bogus! Disabling On-disk cache. Accepting WebKitUserMediaPermissionRequest request
https://people.igalia.com/aperez/joplin.html:24:14
: CONSOLE LOG getUserMedia success, fetching devices, stream: [object MediaStream]
https://people.igalia.com/aperez/joplin.html:32:14
: CONSOLE LOG Audio device enumeration started...
https://people.igalia.com/aperez/joplin.html:32:14
: CONSOLE LOG stopping audio track "0f1105c5-d663-435f-9f26-75066da9c890" (Jabra Link 380 Mono) ^C
Adrian Perez
Comment 5
2025-07-17 08:17:27 PDT
Checking quickly the log, it seems that at least the capture device manager picks the outputs (the mono devices are inputs, the stereo ones are two outputs that should be enumerated as spekers): 0:00:01.846763888 37 0x5a27678d8290 INFO webkitcapturedevicemanager GStreamerCaptureDeviceManager.cpp:248:addDevice:<pipewiredevice1> Registering non-default device Jabra Link 380 Analog Stereo 0:00:01.846798102 37 0x5a27678d8290 INFO webkitcapturedevicemanager GStreamerCaptureDeviceManager.cpp:248:addDevice:<pipewiredevice2> Registering non-default device Jabra Link 380 Mono 0:00:01.846817389 37 0x5a27678d8290 INFO webkitcapturedevicemanager GStreamerCaptureDeviceManager.cpp:248:addDevice:<pipewiredevice3> Registering non-default device KM_B2 Digital Audio Analog Stereo 0:00:01.846835182 37 0x5a27678d8290 INFO webkitcapturedevicemanager GStreamerCaptureDeviceManager.cpp:248:addDevice:<pipewiredevice4> Registering non-default device KM_B2 Digital Audio Mono The bulk of the log seems to be related to the autoplayed audio element from the test page. I could remove the “autoplay” and get another log with different options if that would be helpful =]
Philippe Normand
Comment 6
2025-07-17 10:47:23 PDT
> PipeWireCaptureDeviceManager.cpp:65:computeCaptureDevices: Checking with Camera portal
Somehow the DesktopPortal is created and is valid, there's no "Portal not present or has no camera" log message... So portal->accessCamera() is called and hangs there, apparently... I don't understand that you have no portal running, but still the dbus proxy seems created and connected to /org/freedesktop/portal/desktop? Maybe we're mis-using g_dbus_proxy_new_sync()... Can you capture a dbus log with dbus-monitor?
Philippe Normand
Comment 7
2025-07-17 10:49:58 PDT
Also it's worth testing with an early return from PipeWireCaptureDeviceManager::computeCaptureDevices() (call `callback()` before returning).
Philippe Normand
Comment 8
2025-07-18 05:40:48 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/48241
Adrian Perez
Comment 9
2025-07-18 05:59:03 PDT
(In reply to Philippe Normand from
comment #8
)
> Pull request:
https://github.com/WebKit/WebKit/pull/48241
Indeed, with this applied I get device enumeration working again as expected.
EWS
Comment 10
2025-07-21 00:43:06 PDT
Committed
297669@main
(04d2f39a0b79): <
https://commits.webkit.org/297669@main
> Reviewed commits have been landed. Closing PR #48241 and removing active labels.
Radar WebKit Bug Importer
Comment 11
2025-07-21 00:44:14 PDT
<
rdar://problem/156295253
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug