WebCord: Screen Sharing broken 4.7.0

Acknowledgements

  • I have checked that there is no other issue describing the same or similar problem that I currently have, regardless if it has been closed or open.

  • This bug affects Discord website.

  • This issue is confirmed to be reproducible when WebCord is packaged on at least all three latest supported Electron major releases.

  • This issue is reproducible in Chrome, Chromium or any Chromium-based browser, e.g Brave or Edge (please write in Additional Context which browser you have used if it is neither Chrome nor unmodified Chromium).

  • There are no fixes done to master which resolves this issue.

  • My issue describes one of the unstable and/or not fully implemented features.

  • I have found a workaround to mitigate or temporarily fix this issue in affected releases (please write it in Additional context section below).

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

28.2.0

Application version

v4.7.0

Bug description

Screen Sharing not working after upgrade to v4.7.0. I roll back to 4.6.1 and it works fine.

Additional context

No response

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Reactions: 3
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

My experience, without logs unfortunately, Webcord 4.7.0 on Arch Linux with i3 (nvidia proprietary drivers):

  • Screen/window picker shows up
  • Clicking on any window or screen closes the picker and the sharing doesn’t start. Also confirmed on colleagues setup with Webcord 4.7.0 on Arch Linux with Gnome (amd drivers), same behavior.

Downgrading to 4.6.1 solved the issue on both machines.

As of 4.8.0 screen sharing is working properly for me. Thanks for your work on webcord!

I was able to reproduce this by pressing cancel on the GNOME popup which triggers the promise exception. Afterwards screen share button doesn’t do anything and gets fixed with ctrl+r. Screen sharing otherwise works great.

As for me, in a Plasma Wayland session under XWayland, this works well, but leads to various issues when using “ozone”.

For example, starting screenshare from KDE Screen Share portal works well, but If I close Portal window without starting screensharing it will produce:

[24517:0308/204038.586720:ERROR:screencast_portal.cc(367)] Failed to start the screen cast session.
[24517:0308/204038.586743:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 2
(node:24517) UnhandledPromiseRejectionWarning: Failed to get sources.
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:24517) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

Also, successully started screensharing produces:

'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()

I was able to reproduce this by pressing cancel on the GNOME popup which triggers the promise exception. Afterwards screen share button doesn’t do anything and gets fixed with ctrl+r. Screen sharing otherwise works great.

I’m on 4.8.0 rpm and electron 29.0.0 Fedora 39, gnome

❯ webcord --trace-warnings
[UPDATE] Application is up-to-date!
[WebSocket] Listening at port 6463.
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
[117293:0306/123101.388987:ERROR:screencast_portal.cc(367)] Failed to start the screen cast session.
[117293:0306/123101.389041:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 2
(node:117293) UnhandledPromiseRejectionWarning: Failed to get sources.
    at emitUnhandledRejectionWarning (node:internal/process/promises:203:15)
    at processPromiseRejections (node:internal/process/promises:297:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:32)
(node:117293) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

I am experiencing the exact same behavior as @ionspin, rolling back to 4.6.1 fixes the issue. I’m running Q4OS (Debain Linux with KDE Plasma x11), and I’m using the flatpak releases. full system information here:

Operating System: Debian GNU/Linux 12 KDE Plasma Version: 5.27.5 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 6.1.0-17-amd64 (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics Memory: 44.8 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: LENOVO Product Name: 20UD000CUS System Version: ThinkPad T14 Gen 1

I’m not sure what logs to check, but I would like to help get this issue fixed, Webcord has been very stable for me otherwise. If anyone knows what other information would be useful, I would be happy to share.