Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 of 7 tasks
JulianFP opened this issue Aug 16, 2023 · 66 comments
Closed
3 of 7 tasks

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

JulianFP opened this issue Aug 16, 2023 · 66 comments
Assignees
Labels
status:patch-released Patched in current stable release type:bug Something isn't working

Comments

@JulianFP
Copy link

JulianFP commented Aug 16, 2023

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

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.

output.mp4

Additional context

system information:

  • Arch Linux
  • Tested on Intel CPU and both AMD and Intel GPU
  • Tested with both webcord-bin package from AUR and webcord AppImage from Releases page
  • Tested on Hyprland, Sway and i3

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.

@JulianFP JulianFP added the type:bug Something isn't working label Aug 16, 2023
@nicklozon
Copy link

nicklozon commented Aug 16, 2023

Same here - arch, intel cpu, amd gpu, hyprland.

I get this error output in my terminal (Edit: doesn't seem to be related to the issue):

[35748:0815/214746.638720:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[35748:0815/214747.778123:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[35748:0815/214747.791778:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

I only get this message once with v4.3.0, seems like it might be a wayland issue with the recent release.

@JulianFP
Copy link
Author

JulianFP commented Aug 16, 2023

I only get this message once with v4.3.0, seems like it might be a wayland issue with the recent release.

I am not sure if this error message is related. I get the message three times on both v4.3.0 and v4.4.0. Also as mentioned above, I have the same problem under i3 as well, which means that this issue is not exclusive to Wayland. However, under i3 I don't get this error message in the terminal.

@nicklozon
Copy link

nicklozon commented Aug 16, 2023

You're right.

Looks like it's an electron26 issue - 4.4.0 bumped to 26 from 25.

If you edit /usr/bin/webcord to use electron25 it seems to work.

Edit: I have the latest electron 26.0.0-beta.12 installed and 25.3.2

Running webcord --verbose results in this vague error: Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.

Edit 2: Running ELECTRON_LOG_FILE=/tmp/electron ELECTRON_ENABLE_LOGGING=true webcord gives some audio warnings, might be Pipewire related.

[109376:0815/231152.936120:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=10
[109376:0815/231153.047165:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=20
[109376:0815/231153.158451:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=30
[109376:0815/231153.269419:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=40
[109376:0815/231153.380211:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=50
[109376:0815/231153.491243:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=60
[109376:0815/231153.602693:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=70
[109376:0815/231153.713831:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=80
[109376:0815/231153.806790:WARNING:sync_reader.cc(175)] ASR: No room in socket buffer.: Broken pipe (32)
[109376:0815/231153.806837:WARNING:sync_reader.cc(195)] SyncReader::Read timed out, audio glitch count=90

Electron 26 is in beta and has had changes with pipewire.

@JulianFP
Copy link
Author

Running webcord --verbose results in this vague error: Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.

Edit 2: Running ELECTRON_LOG_FILE=/tmp/electron ELECTRON_ENABLE_LOGGING=true webcord gives some audio warnings, might be Pipewire related.

I can confirm, I get the exact same error messages. I use Pipewire as well.

Looks like it's an electron26 issue

I can confirm this as well. Using Electron 25.3.2 completely resolves the problem for me. I also compiled discord_arch_electron from AUR (basically plain Discord except that it uses Electron provided by the system) with Electron 26 and I got the exact same behavior: The window goes blank after a few seconds. Discord however reloads the Window automatically, but the app is still unusable. I think this confirms that this is an upstream issue of some kind and not limited to Webcord. We should probably stick to Electron 25 until this is resolved.

@HanabishiRecca
Copy link

EDIT: This is an upstream issue of Electron 26.

Please link the issue. I tested AUR package before publishing and not faced any issues.

If you edit /usr/bin/webcord to use electron25 it seems to work.

Better edit PKGBUILD instead. Electron version can be changed in the first line, it also will set right dependency.

@frosth555
Copy link

frosth555 commented Aug 16, 2023

I can confirm that isse on arch (aur package), fedora (official rpm release) and unofficial flatpak. no matter wayland/xwayland/Xorg

@HanabishiRecca
Copy link

Well, it should be fine to step back to Electron 25 for AUR package, I guess.

On Linux the only issue we care is #442, afaik. But actually the fix also was backported to 25.3.0, so Electron 26 is not necessary.

@SpacingBat3
Copy link
Owner

SpacingBat3 commented Aug 16, 2023

I still don't reproduce this issue on NVIDIA drivers and X11, maybe it's MESA only or hardware-specific?
What about GPU optimizations? Does changing that do anything?

@SpacingBat3 SpacingBat3 added the status:need-info Further information is requested label Aug 16, 2023
@SpacingBat3
Copy link
Owner

Also what about #444 and proposed workaround here? Maybe that's duplicate issue?

@HanabishiRecca
Copy link

I still don't reproduce this issue on NVIDIA drivers and X11, maybe it's MESA only or hardware-specific?
What about GPU optimizations? Does changing that do anything?

I am also unable to reproduce it using MESA/AMDGPU. Regardless of optimization setting. I see no difference between 25 and 26.
So the issue is quite setup-specific for sure.

archlinux-github pushed a commit to archlinux/aur that referenced this issue Aug 16, 2023
@frosth555
Copy link

i've tried no sandbox, disable-gpu, disable-webgl, disable-3d-apis none of it worked
fwiw, Electron 27.0.0-nightly with 4.4 works ok

@nicklozon
Copy link

nicklozon commented Aug 16, 2023

fwiw, Electron 27.0.0-nightly with 4.4 works ok

Didn't even know that was being worked on considering 26 is still in beta. 27 alpha1 was just published like 5 minutes ago 😂

Edit: Looks like electron 26 was released 2 days ago but the arch AUR package isn't updated yet, let me test that.

Edit 2: v26.0.0 doesn't fix the issue

@DylanElens

This comment was marked as spam.

@OtaK
Copy link

OtaK commented Aug 17, 2023

Can confirm as well, it starts without an issue, then the window turns blank after a few seconds.
I tried all the flags that usually solve similar issues: --enable-features=WaylandWindowDecorations,UseOzonePlatform --ozone-platform=wayland --force-device-scale-factor=1 --in-process-gpu and nothing works. Same behavior.

Wayland (Hyprland) on Nvidia drivers.

Rolling back to WebCord 4.3.0 does the job for now!

@r2rX
Copy link

r2rX commented Aug 17, 2023

Also what about #444 and proposed workaround here? Maybe that's duplicate issue?

That was the first thing I did when I encountered this issue but it doesn't help, unfortunately.

I still don't reproduce this issue on NVIDIA drivers and X11, maybe it's MESA only or hardware-specific? What about GPU optimizations? Does changing that do anything?

If you (or any other NVIDIA GPU owners) can test in Wayland, that would help narrow down the potential cause.

The grey screen issue definitely stems from the interaction between Electron and (recent) Mesa drivers (at least for RDNA 2 owners).

@nlunceford
Copy link

I believe I'm seeing the same thing on nvidia v4.4.0, but not v4.3.0 (unlike #444).

Setup:
nvidia GPU, nvidia drivers 535
Kubuntu
KDE, Wayland
Using both .deb and .AppImage

Tinkering with the flags too much (enabling Wayland, at the least) also causes it to seg-fault on startup, which is probably worthy of its own issue (which I can file when I have more time later).

@ravenclaw900
Copy link

ravenclaw900 commented Aug 17, 2023

I also appear to have the same issue, and it's fixed by downgrading to 4.3.0.

Flatpak
Nvidia GPU, Nvidia drivers 535 on host
OpenSuse Tumbleweed
Cinnamon on X11

@r2rX

This comment was marked as duplicate.

@SpacingBat3 SpacingBat3 removed the status:need-info Further information is requested label Aug 17, 2023
@garyoakidoki
Copy link

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/

@0xGingi
Copy link

0xGingi commented Aug 19, 2023

Oddly, the grey screen issue on AMD/Mesa is nonexistent on Electron 27 Alpha, but persists on 26

@frosth555
Copy link

frosth555 commented Aug 19, 2023

it's not about amdgpu/mesa/webcord4.4
it exists on ryzen 5xxx with igpu and ryzen 5 with nvidia 3060
doesn't exist on haswell + igpu and haswell + amd polaris (rx580)
problem is exclusively for electron26
discord and caprine are affected too

@soumyaDghosh
Copy link

This issue doesn't bother the snap though. It works fine.

@carabistouflette

This comment was marked as spam.

@SpacingBat3
Copy link
Owner

Discord however reloads the Window automatically, but the app is still unusable.

This made me to think it's renderer process constantly crashing for some reason. I guess it is good idea to implement renderer crashes handling for Discord window right now, eventually maybe for other/all WebContents instances as well. I might also try do some fallback behavior, e.g. if it constantly crashes WebCord will restart and try to run with hardware acceleration forcefully disabled and GPU optimizations entirely ignored (this should last only for the current WebCord session).

@soumyaDghosh
Copy link

Discord however reloads the Window automatically, but the app is still unusable.

This made me to think it's renderer process constantly crashing for some reason. I guess it is good idea to implement renderer crashes handling for Discord window right now, eventually maybe for other/all WebContents instances as well. I might also try do some fallback behavior, e.g. if it constantly crashes WebCord will restart and try to run with hardware acceleration forcefully disabled and GPU optimizations entirely ignored (this should last only for the current WebCord session).

Is this really a webcord issue? The snap package is also at 4.4.0 which is used by many now. And none haven't reported anything including myself.

@SpacingBat3
Copy link
Owner

(...) but instead of just going grey and staying like that it repeatedly "logs in" and shows the Discord splash screen, then initial friends list again, then the Discord splash screen etc over and over.

This is expected to happen, WebCord now reloads the page in the approach to workaround the renderer crashes that don't constantly happen in the client. It should also restart itself with --safe-mode in order to fix crashes caused by issues with GPU acceleration or some tweaks done by WebCord. If none of that helps, well… WebCord still tries to refresh the page.

@RossComputerGuy
Copy link

The new update is slightly better. I can almost get to log in but once I scan the code or I am too slow, it just goes blank and restarts.

@demirdegerli

This comment was marked as off-topic.

@Lazorne

This comment was marked as duplicate.

@tjhexf
Copy link

tjhexf commented Sep 25, 2023

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
Copy link

tjhexf commented Sep 25, 2023

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

@SpacingBat3 SpacingBat3 mentioned this issue Sep 25, 2023
7 tasks
@thespad
Copy link

thespad commented Sep 25, 2023

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

@tjhexf
Copy link

tjhexf commented Oct 5, 2023

Issue still present after switching to an AMD gpu

@dreamsyntax
Copy link

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
Copy link

volitank commented Oct 6, 2023

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

This comment was marked as spam.

@SpacingBat3
Copy link
Owner

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
Copy link

volitank commented Oct 6, 2023

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
Copy link
Owner

@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
Copy link

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
Copy link

dreamsyntax commented Oct 9, 2023

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
Copy link

volitank commented Oct 10, 2023

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
Copy link

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:patch-released Patched in current stable release type:bug Something isn't working
Development

No branches or pull requests