SpacingBat3 / WebCord

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

Webcord v4.4.0: Windows turning blank after couple of seconds #452

Closed JulianFP closed 11 months ago

JulianFP commented 1 year ago

Acknowledgements

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

26.0.0

Application version

v4.4.0

Bug description

After the last update (v4.4.0) all webcord windows turn blank / gray after a few seconds. This makes the application completely unusable. Reloading a window brings back its content, however it will turn blank after a couple of seconds again. This seems to happen under both Wayland and X11. The only workaround I have found is to downgrade back to v4.3.0. I have attached a video of this behavior.

https://github.com/SpacingBat3/WebCord/assets/70963316/2de49ef8-0b05-464a-9eb2-f25468d89031

Additional context

system information:

EDIT: This is an upstream issue of Electron 26. A workaround is to use Electron 25 instead of Electron 26 until the issue is resolved upstream.

MOD EDIT: The issue seems to be hardware-specific or setup-specific. However there are mixed reports for each driver (MESA AMDGPU,NVIDIA), which might mean this isn't somehow associated with the driver. I might verify if I can reproduce this on Wayland, as for me NVIDIA driver on X11 (XFCE4) works just fine.

Lazorne commented 11 months ago

I can confirm that this issue is also affecting me on my desktop but on my laptop with Nvidia drivers it all works as it should.

Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.15-200.fc38.x86_64 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 31.2 Gibyte of RAM
Graphics Processor: AMD Radeon RX 6750 XT
GPU information object:
{
  auxAttributes: {
    amdSwitchable: false,
    canSupportThreadedTextureMailbox: false,
    glImplementationParts: '(gl=none,angle=none)',
    glResetNotificationStrategy: 0,
    inProcessGpu: true,
    initializationTime: 0,
    isAsan: false,
    isClangCoverage: false,
    jpegDecodeAcceleratorSupported: false,
    optimus: false,
    passthroughCmdDecoder: false,
    sandboxed: false,
    subpixelFontRendering: true,
    targetCpuBits: 64,
    visibilityCallbackCallCount: 0
  },
  gpuDevice: [
    {
      active: true,
      cudaComputeCapabilityMajor: 0,
      deviceId: 29663,
      gpuPreference: 0,
      vendorId: 4098
    }
  ]
}
tjhexf commented 11 months ago

Having the same issue on NVIDIA under wayland. Turns blank, crashes, tries to restart, crashes again. I'm running fedora 38.

after a couple crashes, it also seems to leave this funny little log, that i find cute:

[GPU:8704] Process left us unexpectedly!
[GPU:TIP] Rest in peace, GPU... :(
tjhexf commented 11 months ago

Weirdly enough, safe-mode makes it last for a bit longer.

thespad commented 11 months ago

Still crashing for me even with safe mode, in my case running in KasmVNC under Debian Bullseye, no GPU acceleration.

tjhexf commented 11 months ago

Issue still present after switching to an AMD gpu

dreamsyntax commented 11 months ago

The workaround I found is downgrading to the latest working commit on Flatpak

sudo flatpak update io.github.spacingbat3.webcord --commit=3456e73fb5e39dbf058a101d27467414f51baa9150dad89510d4c5a6da5985b4

You can also mask it so it doesn't update

flatpak mask io.github.spacingbat3.webcord

Make sure that you remove the mask after it works again

flatpak mask --remove io.github.spacingbat3.webcord

Just quoting your message to make it visible to new users, since its hidden by the collapsed default view.

volitank commented 11 months ago

I installed v4.4.1 and something similar happens. v4.4.0 I get just a blank grey screen.

v4.4.1 it will actually crash and loop. Running it in a terminal I get this when it crashes. Not sure if it helps or not.

[WC_6:139] crashed

Debian Sid using the .deb from releases.

v4.3.0 works fine though.

demirdegerli commented 11 months ago

I can confirm that I'm getting the same behavior.

SpacingBat3 commented 11 months ago

I installed v4.4.1 and something similar happens. v4.4.0 I get just a blank grey screen.

v4.4.1 it will actually crash and loop. Running it in a terminal I get this when it crashes. Not sure if it helps or not.

[WC_6:139] crashed

Debian Sid using the .deb from releases.

v4.3.0 works fine though.

That's literally the expected behaviour in v4.4.1. It should loop, eventually restart in --safe-mode and then continue looping in hope it will (someday) fix itself. The implementation is pretty naive, it blames GPU for renderer crashes or Chromium flags mods WebCord does, so WebCord will try to disable hardware acceleration, use SWRAST and avoid modding Chromium cmdline by itself. Whenever this works is another matter, it's hard to workaround bugs you have no idea of actual cause and make some kind of future-proof prevention mechanism.

volitank commented 11 months ago

Interesting. I only let it crash a few times. Should I wait and see if it eventually works? Once it does is there a way to see which options allow it to work?

So long as it's broken on my system I can try to be of help. Although I'm not very familiar with electron apps.

SpacingBat3 commented 11 months ago

@volitank Nah, the loop is due to fact it keeps constantly crashing, I highly doubt the outcome will be different. However, the behaviour introduced in v4.4.1 is supperior to v4.4.0, as WebCord constantly tries to recover from crash and workaround it in any known way for me (unlike to pretty much giving up on the first try).

MarioShebib commented 11 months ago

I'm having it crash with the error being that it failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory.

With the Gtk message being that it failed to load module canberra-gtk-module.

I am using Pop-OS 22.04 if that could be related to the issue.

dreamsyntax commented 11 months ago

Just reporting, the deb_amd64 version of v4.4.3 does not have this issue on Linux Mint Cinnamon 21.2, for whatever reason. (NVIDIA proprietary driver + X11 if that matters) Flatpak v4.4.1 has the issue; Will test when the unofficial flatpak updates to v4.4.3

Update: Flatpak v4.4.3 still has the issue.

volitank commented 11 months ago

Gave me an idea to try. I have hybrid graphics and I was using Nvidia primarily for Hyprland. I downloaded v4.4.3 and tried Intel. Same thing though just crashes over and over.

Also I have KDE Plasma installed. Tried in there and same thing. Tough bug

Traemandir commented 11 months ago

Same issue for me on my system. Can confirm that the flatpak downgrade workaround works for me, thank you! If there's any information I can provide to help narrow down where the bug lies just let me know. I'm running OpenSUSE Tumbleweed with KDE Plasma, and Pipewire, in a Wayland session. CPU is a Ryzen 5900x, GPU is an RX 6800 XT, using Mesa.

How to Downgrade Flatpak Package for Webcord to v4.3.0 in Linux: sudo flatpak update --commit=a35defd55a5da112609c61babd223c9f05aa198b1338cdbee0f72974e467765c io.github.spacingbat3.webcord Source: https://itsfoss.com/downgrade-flatpak-packages/

SpacingBat3 commented 11 months ago

This should be resolved in WebCord v4.5.0 (since it now uses Electron 27.0.0)! :tada: