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 3 years ago
  • Reactions: 11
  • Comments: 34 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Ok, I can confirm the issue is upstream with electron.

On archlinux using sway I have built webcord from latest source, then I switched to electron 30 specifically(electron30 30.5.1-3) is the version i am currently using.

Since switching to this, my webcord allows screenshare again.

If you are using archlinux, there is a very easy fix.

Download electron30 from aur

then edit /usr/bin/webcord change text from “electron33” to “electron30” Now your screen share should work

I am on Arch Linux, Hyprland; starting in a terminal it outputs

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

when sharing using xdg-desktop-portal-hyprland

and

[31480:0130/213630.914844:ERROR:screencast_portal.cc(325)] Failed to select sources for the screen cast session.
[31480:0130/213630.914864:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 3
(node:31480) UnhandledPromiseRejectionWarning: Failed to get sources.
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:31480) 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)

when sharing using xdg-desktop-portal-wlr.

In the webcord gui itself nothing happens.

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.

Resurfaced with version 4.10.3, but now crashes the client. I am running on Fedora 41 Sericea and tested with both RPM, AppImage and Flatpak.

Downgrading to 4.10.2 for now as that version does not have the issue.

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

Same here. Mine crashes with “xargs: zypak-wrapper: terminated by signal 11”

Ok, I can confirm the issue is upstream with electron.

On archlinux using sway I have built webcord from latest source, then I switched to electron 30 specifically(electron30 30.5.1-3) is the version i am currently using.

Since switching to this, my webcord allows screenshare again.

If you are using archlinux, there is a very easy fix.

Download electron30 from aur

then edit /usr/bin/webcord change text from “electron33” to “electron30” Now your screen share should work

Friendly reminder to restart your hyprland session, for those who manage to fix the problem this way.

Also, the official electron30 package worked for me.

My bad, no need to be snarky, (…)

Ah, sorry if it did felt that way. I wanted to be slightly sarcastic in response your comment felt that way as well (+ people suprisingly compare WebCord with Vesktop, although some stuff differs in philosophies for both of them). Hope at least my points in braces were helpful tho (I really meant to give some response but was too lazy/busy to write whole analysis).

+ Kinda want to blame someone for duplicates happening, not sure who (community, GitHub for terrible hierarchization and linkage or myself for not coming with decent functional sollution to this day).

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.