SpacingBat3 / WebCord

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

WebCord becomes unusable over time / doesn't update window content #403

Open Milliw opened 1 year ago

Milliw commented 1 year ago

Aknowledgements

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

24.0.0

Application version

4.2.0

Bug description

When opening WebCord everything seems to work fine at first but then after some time leaving the window open on the second monitor it starts to become "unresponsible". It starts when typing the letters show up slowly and later on the window doesn´t update its content completely meaning hovering with mouse does nothing and clicking triggers events (eg switching audio channels is hearable) but is not shown.

Same is happening to official Discord client. Only working workaround for now is by using discord-screenaudio program. Earlier version 4.1.0(?) had same issue.

Guess it's related to Electron but have not looked up this yet.

Additional context

Nobara 37; Nvidia RTX 2060; Wayland; Gnome

SpacingBat3 commented 1 year ago

Might be a driver bug or Wayland-specific issue. Have you tried running WebCord with/without optimizations?

Any additional logs (stdout/stderr output)?

Same is happening to official Discord client.

Most likely this also happens in Chrome/Chromium as well.

Milliw commented 1 year ago

Have you tried running WebCord with/without optimizations?

Don't know how to

Any additional logs (stdout/stderr output)?

Don't know how to do, too

Most likely this also happens in Chrome/Chromium as well.

Will try this and report back

SpacingBat3 commented 1 year ago
Have you tried running WebCord with/without optimizations?
Don't know how to

You can enable this in WebCord's settings (on menubar: File → Settings). You probably didn't if you don't know how.

Any additional logs (`stdout`/`stderr` output)?
Don't know how to do, too

Just run webcord in the terminal app and copy all text it has printed there (or at least errors/warnings if you've noticed any there).

Milliw commented 1 year ago

Tried Chromium. Same behaviour.

You can enable this in WebCord's settings (on menubar: File → Settings). You probably didn't if you don't know how.

Do you mean the gpu optimizations? I tried this with no difference

Just run webcord in the terminal app and copy all text it has printed there (or at least errors/warnings if you've noticed any there).

Will try this. Thx.

Milliw commented 1 year ago

Errors I get right when launching: (tried to sort them out as many show multiple times)

[13 preload-host-spawn-strategy] Warning: waitpid override ignores groups
[6 preload-host-spawn-strategy] Warning: waitpid override ignores groups
[6:0412/010750.524302:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
Gtk-Message: 01:07:50.700: Failed to load module "canberra-gtk-module"
Gtk-Message: 01:07:50.700: Failed to load module "pk-gtk-module"
[51:0412/010750.732874:ERROR:angle_platform_impl.cc(43)] Display.cpp:1019 (initialize): ANGLE Display::initialize error 12289: glXQueryExtensionsString returned NULL
ERR: Display.cpp:1019 (initialize): ANGLE Display::initialize error 12289: glXQueryExtensionsString returned NULL
[51:0412/010750.732997:ERROR:gl_display.cc(504)] EGL Driver message (Critical) eglInitialize: glXQueryExtensionsString returned NULL
[51:0412/010750.733045:ERROR:gl_display.cc(793)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[51:0412/010750.733514:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[51:0412/010750.736994:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
Cannot use import statement outside a module
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung
SpacingBat3 commented 1 year ago

A lot of GPU errors 😕… And I see you also use Flatpak version (the socket error is caused due to Flatpak sandboxing). Could you give a try regular builds? I just don't trust how Flatpaks are sandboxed and neither I maintain them.


Here's what I find out from logs:

KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung

This one is actually interesting and made me think this might be actually a problem either on NVIDIA side, Wayland or your current setup. I doesn't look like it is printed directly by Chromium, at least it's not formatted as such.

As it seems to be a KMS DRM issue, maybe you have to check if it is enabled? I dunno if there's anything other you can do than this, I guess it might be just yet another issue caused by incompatibilities or bugs in NVIDIA driver.

Cannot use import statement outside a module

Also FYI this one line is being printed because I've messed up in DisConnection module when updating to TypeScript v5 and it doesn't work as wrong module code is generated. I've already fixed that, so the next build will have it fully functional.

Milliw commented 1 year ago

Could you give a try regular builds?

I did. And then I remembered why I was using the flatpak version... ;) Running the rpm version results in:

Terminal errors (repeatedly):

src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 538982482
src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 943215175
src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094158
src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 842094169
src/gbm_drv_common.c:56: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000

and this here is shown in the gui: Bildschirmfoto vom 2023-04-16 19-47-34 Ignoring it shows no window but keeps processes in background.

As it seems to be a KMS DRM issue, maybe you have to check if it is enabled?

That's enabled already by default in the Nobara distro. Already checked that.

SpacingBat3 commented 1 year ago

(...) and this here is shown in the gui (...)

This is because of empty winstate file in ~/.config/WebCord. I've fixed the main cause of it, but WebCord still crashes if any of the configuration files is empty. I'll fix that before next release.

Milliw commented 1 year ago

This is because of empty winstate file in ~/.config/WebCord

Ah I see. I guess this is some leftover from the previous version I installed and uninstalled earlier. I deleted the files in the .config folder and now the application starts without that error. Some progress. =)

(Just for my information - is it normal that stuff like this stays on the system after uninstalling apps on Linux?)

Starting it from a terminal still gives the earlier mentioned GBM-DRV error and the one following but not more: Cannot use import statement outside a module

It's late in the evening to test further but quick test shows some black menus repeatedly so I guess this rpm version will not run solid, too. grafik

Did I not see your answer regarding my question on what you mean by this:

Have you tried running WebCord with/without optimizations?

SpacingBat3 commented 1 year ago

Did I not see your answer regarding my question on what you mean by this (…)

Oh, you've already guessed what I meant:

Do you mean the gpu optimizations? I tried this with no difference

Disabling these could potentially help with the app stability, that would leave Chromium to be run without --use-gl=egl.


(Just for my information - is it normal that stuff like this stays on the system after uninstalling apps on Linux?)

Most package managers don't mess with the user files. Basing on my experience with Arch Linux and pacman I can also tell some will even backup some of the files like the user data or configuration files and restore them once the app is installed. And yeah, most of the apps don't have the functionality to clean data after removal so the user has to care about it on their own. Some programs like BleachBit might make it easier through.

There's actually a bit more standard directories that store application data: ~/.local/share and ~/cache. You might also want to check for hidden files/directories placed directly in your home dir.

Milliw commented 1 year ago

Thanks for that OT informations.

So I ran the rpm version with and without gpu optimization and it made no difference. Almost as soon as I run my game on primary display Discord/WebCord on second display becomes unresponsive (rendered).

So I guess I have to stick with discord-screenaudio for now... At least the second latest version of it runs fine.

Though if interested we can continue to debug WebCord further if this helps in development anyhow. =)

dpanter commented 1 year ago

I also experienced Webcord not updating the windows contents on my secondary monitor, typically noticed when gaming on the main monitor. Since upgrading to 4.2.0 deb I haven't seen the issue so it seems fixed for me. Debian sid, KDE Plasma 5.27.2 Wayland, AMD RX 6900XT, dual monitors.

Milliw commented 1 year ago

I also experienced Webcord not updating the windows contents on my secondary monitor, typically noticed when gaming on the main monitor. Since upgrading to 4.2.0 deb I haven't seen the issue so it seems fixed for me. Debian sid, KDE Plasma 5.27.2 Wayland, AMD RX 6900XT, dual monitors.

At least I am not the only one! Yeay! =D Tbh I thought that Nvidia is the source of the issue here. And I thought buying an AMD card as soon as I can afford one will fix all my issues. Seems like this will not be the case... =(

dpanter commented 1 year ago

At least I am not the only one!

Just to be extra clear, the issue was resolved with version 4.2.0 for me.