SpacingBat3 / WebCord

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

Can't run on wayland natively #492

Closed LOSEARDES77 closed 7 months ago

LOSEARDES77 commented 7 months ago

Acknowledgements

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

v25.9.4

Application version

v4.5.2

Bug description

Cant get it run natively on wayland

Additional context

the tray icon shows up but cant get the window to open


[24967:1128/231153.504220:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[24967:1128/231153.504266:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[24967:1128/231153.504302:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[24967:1128/231153.504315:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[24967:1128/231153.504328:ERROR:shared_image_factory.cc(673)] CreateSharedImage: could not create backing.
[24967:1128/231153.504340:ERROR:shared_image_factory.cc(527)] DestroySharedImage: Could not find shared image mailbox
[24967:1128/231153.504366:ERROR:gpu_service_impl.cc(1010)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[GPU:8704] Process left us unexpectedly!
[GPU:TIP] Rest in peace, GPU... :(
[WebSocket] Listening at port 6463.
[25012:1128/231153.593119:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[25012:1128/231153.593163:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[25012:1128/231153.593261:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[25012:1128/231153.593340:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[25012:1128/231153.593355:ERROR:shared_image_factory.cc(673)] CreateSharedImage: could not create backing.
[25012:1128/231153.593431:ERROR:shared_image_factory.cc(527)] DestroySharedImage: Could not find shared image mailbox
[25012:1128/231153.593458:ERROR:gpu_service_impl.cc(1010)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[GPU:8704] Process left us unexpectedly!
[GPU:TIP] Rest in peace, GPU... :(
[25024:1128/231153.674384:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[25024:1128/231153.674469:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[25024:1128/231153.674557:ERROR:gbm_wrapper.cc(258)] Failed to export buffer to dma_buf: No such file or directory (2)
[25024:1128/231153.674613:ERROR:gbm_pixmap_wayland.cc(75)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[25024:1128/231153.674695:ERROR:shared_image_factory.cc(673)] CreateSharedImage: could not create backing.
[25024:1128/231153.674710:ERROR:shared_image_factory.cc(527)] DestroySharedImage: Could not find shared image mailbox
[25024:1128/231153.674815:ERROR:gpu_service_impl.cc(1010)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[GPU:8704] Process left us unexpectedly!
[GPU:TIP] Rest in peace, GPU... :(
[UPDATE] Application is up-to-date!
^C⏎       ```
ElectricLizzzard commented 7 months ago

Add launch argument --ozone-platform=wayland Works as expected.

ThatOneCalculator commented 7 months ago

These are the flags I use on Hyprland with an AMD 6700XT: webcord --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer --enable-features=VaapiVideoDecoder (with Optimize the client for the current graphics card OFF in the settings)

Janrupf commented 7 months ago

I don't believe this is fixable when running with electron 25 (I did not test 26 and 27). It however seems to be fixed when running with electron 28.

EDIT: I did now test with electron 27, and it still crashes. So electron 28 is required (this probably primarily affects Wayland on NVIDIA)

(Note: I only hacked a dirty setup together, no idea if everything else works properly with electron 28. Additionally this repository already specifies electron 27 as a dependency, but for example the AUR package uses electron 25)

SpacingBat3 commented 7 months ago

Honestly, the Electron is kinda old here (v25.9.4) and I haven't noticed that before, there are also some rumours that this might be a duplicate of #433. I also don't care anymore about supporting older Electron versions, I rather focus on maintaining my app under newer versions especially in case of EOF Electron releases (since those don't get any security patches anymore and it is no longer advised to use these).

I'll just close this as duplicate…