SpacingBat3 / WebCord

A Discord and SpaceBar :electron:-based client implemented without Discord API.
MIT License
1.88k stars 94 forks source link

broken screenshare #402

Closed beh-10257 closed 1 year ago

beh-10257 commented 1 year ago

Aknowledgements

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

v24

Application version

WebCord v4.2.0

Bug description

broken sharewcreen functionality using pipewire in linux with this error

Cannot use import statement outside a module
[UPDATE] Application is up-to-date!
[78329:0409/090258.957814:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[78329:0409/090302.188973:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[78329:0409/090307.612464:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
[78297:0409/090326.794905:ERROR:shared_screencast_stream.cc(236)] PipeWire stream state error: no more input formats
[78297:0409/090326.794922:ERROR:shared_screencast_stream.cc(199)] PipeWire remote error: no more input formats
'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:416 pw_thread_loop_wait()
[78297:0409/090423.558784:ERROR:shared_screencast_stream.cc(236)] PipeWire stream state error: no more input formats
[78297:0409/090423.558809:ERROR:shared_screencast_stream.cc(199)] PipeWire remote error: no more input formats

basically the screen is a black screen

Additional context

I'm using wayland an nvidia gpu (BTW how to use that to steam instead of the integrated gpu) my workaround is basically opening obs screenshare the screen and using qpwgraph to connect the screen input that's coming to obs to webcord

2023-04-09_09-12

this is a screenshot of the black screenshare

I don't know if thsi is fixed in the git version since paru -S webcord-git doesn't compile

yeah that's all + thanks for this amazing project

beh-10257 commented 1 year ago

I just checked installing webcord-git yeah the bug is still there

beh-10257 commented 1 year ago

update this issue is basically solved if you use the git version of either the xdg desktop portal wlr or the hyprland version so yeah I don't know about kde and gnome though

JosiahBeaulieu commented 1 year ago

update this issue is basically solved if you use the git version of either the xdg desktop portal wlr or the hyprland version so yeah I don't know about kde and gnome though

xdg-desktop-portal-wlr is Wayland specific and it provides screen casting/sharing abilities on Wayland. It should be used in addition to xdg-desktop-portal-kde and/or xdg-desktop-portal-gtk - which provide other desktop integrations such as the file navigator that is presented when saving a file or locating a file, usually only one of these two should be installed, doesn't matter which though (usually). For best compatibility: if you use the Gnome desktop environment, use xdg-desktop-portal-gtk, for KDE Plasma use xdg-desktop-portal-kde, if you use any other desktop environment: pick whichever you prefer. xdg-desktop-portal-hyprland is a fork of xdg-desktop-portal-wlr meant to function better with the Hyprland desktop environment.

SpacingBat3 commented 1 year ago

(...) It [xdg-desktop-portal-wlr] should be used in addition to xdg-desktop-portal-kde and/or xdg-desktop-portal-gtk.

@JosiahBeaulieu At least on Arch Linux, there's xdg-desktop-portal-gnome package which from my experience with GNOME already provides required portals for stuff like the screen-share and are deeply integrated with GNOME DE, so installation of xdg-desktop-portal-wlr isn't really necessary. This might also be the case for KDE and other DEs providing their own xdg-desktop-portal-* implementation so I would avoid installing xdg-desktop-portal-wlr for these unless something clearly seems to be broken.

(...) if you use any other desktop environment: pick whichever you prefer.

You should probably check what your DE is based on first – if it uses GTK (like XFCE4), it's probably better to pick xdg-desktop-portal-gtk than xdg-desktop-portal-kde if you don't use much of the QT/KDE software.

(...) so yeah I don't know about kde and gnome though

@beh-10257 The last time I've checked GNOME portals were functional and this bug didn't occur.

beh-10257 commented 1 year ago

well at least in the hyprland wiki page it says that I should delete xdg-desktop-portal-gnome or the kde one and what is suggested ( the gtk one and the hyprland one) is working perfectly so yeah this issue is fixed I guess

InfiniteSephiroth commented 1 year ago

well at least in the hyprland wiki page it says that I should delete xdg-desktop-portal-gnome or the kde one and what is suggested ( the gtk one and the hyprland one) is working perfectly so yeah this issue is fixed I guess

i'm on kde and still doesn't work, i have the git version with electron24, idk what to do

SpacingBat3 commented 1 year ago

well at least in the hyprland wiki page it says that I should delete xdg-desktop-portal-gnome or the kde one and what is suggested ( the gtk one and the hyprland one) is working perfectly so yeah this issue is fixed I guess

i'm on kde and still doesn't work, i have the git version with electron24, idk what to do

Do you have xdg-desktop-portal-kde installed? The backends are DE-specific, so not all might work with all DE's. Another thing is that not all backends will provide all portals, e.g. installing xdg-desktop-portal-gtk is not enough for screen share on GNOME and xdg-desktop-portal-gnome should be installed as well.


Also as it seems that any issues mentioned on the issue ticket are due to either upstream bug in specific portals backend or lack of the proper backends installed for the specific DE, I will close this issue ticket.