NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.15k stars 14.18k forks source link

Discord fails to start #303157

Closed Noratrieb closed 2 months ago

Noratrieb commented 7 months ago

Describe the bug

Discord fails to start. The full log when running $ discord is

``` [Nix] Disabling updates already done Discord 0.0.47 Starting app. Starting updater. 2024-04-10T16:51:02.810Z [Modules] Modules initializing 2024-04-10T16:51:02.811Z [Modules] Distribution: remote 2024-04-10T16:51:02.811Z [Modules] Host updates: disabled 2024-04-10T16:51:02.811Z [Modules] Module updates: enabled 2024-04-10T16:51:02.811Z [Modules] Module install path: /home/nils/.config/discord/0.0.47/modules 2024-04-10T16:51:02.811Z [Modules] Module installed file path: /home/nils/.config/discord/0.0.47/modules/installed.json 2024-04-10T16:51:02.811Z [Modules] Module download path: /home/nils/.config/discord/0.0.47/modules/pending splashScreen.initSplash(false) blackbox: 2024-04-10T16:51:02.850Z 0 ---------------------------------------------- blackbox: 2024-04-10T16:51:02.874Z 1 Discord starting: {"releaseChannel":"stable","version":"0.0.47"}, modulepath: /home/nils/.config/discord/0.0.47/modules blackbox: 2024-04-10T16:51:02.880Z 2 ✅ webContents.created web1 "" blackbox: 2024-04-10T16:51:02.887Z 3 ✅ window.created win1 "discord" src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 [5797:0410/185103.299815:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=139 blackbox: 2024-04-10T16:51:03.301Z 4 ❌ child-process-gone { type: 'GPU', reason: 'crashed', exitCode: 139, serviceName: 'GPU' } src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 splashScreen: SPLASH_SCREEN_READY splashScreen.webContentsSend: SPLASH_SCREEN_QUOTE SPLASH_SCREEN_QUOTE [ 'Hold Tight — Loading Discord' ] 2024-04-10T16:51:03.502Z [Modules] No updates to install splashScreen: no-pending-updates 2024-04-10T16:51:03.503Z [Modules] Host is up to date. 2024-04-10T16:51:03.503Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json splashScreen: checking-for-updates splashScreen.updateSplashState checking-for-updates checking-for-updates {} splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'checking-for-updates' } ] 2024-04-10T16:51:03.594Z [Modules] No module updates available. splashScreen: update-check-finished true 0 false splashScreen.launchMainWindow: false Optional module ./ElectronTestRpc was not included. splashScreen.updateSplashState launching launching {} splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'launching' } ] blackbox: 2024-04-10T16:51:03.654Z 5 ✅ webContents.created web2 "" blackbox: 2024-04-10T16:51:03.661Z 6 ✅ window.created win2 "Discord" [5797:0410/185103.776574:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=139 (electron) 'gpu-process-crashed event' is deprecated and will be removed. Please use 'child-process-gone event' instead. child-process-gone! child: GPU (undefined) exitCode: 139 blackbox: 2024-04-10T16:51:03.777Z 7 ❌ child-process-gone { type: 'GPU', reason: 'crashed', exitCode: 139, serviceName: 'GPU' } notificationScreen.webContentsSend: win is invalid undefined. blackbox: 2024-04-10T16:51:03.785Z 8 before-quit ```

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run discord

I use X11 GNOME with an nvidia card and the proprietary nvidia driver, my full config is https://github.com/Nilstrieb/nixos/tree/483ab6368d4ab659fada94bac8a22729b46a6e96

Expected behavior

Discord starts

Additional context

Add any other context about the problem here.

Notify maintainers

Probably related to #299552, which roughly coincides with when I started encountering this. @JohnRTitor @DontEatOreo

@MP2E @Scrumplex @Artturin @Infinidoge @jopejoe1

Metadata

using nixos-unstable ff0dbd94265ac470dda06a657d5fe49de93b4599

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.25, NixOS, 24.05 (Uakari), 24.05.20240406.ff0dbd9`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos"`
 - channels(nils): `"nixos"`
 - nixpkgs: `/nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source`

Add a :+1: reaction to issues you find important.

Artturin commented 7 months ago

Try https://github.com/NixOS/nixpkgs/pull/302657

Noratrieb commented 7 months ago

I still get the same error with that :/

``` [Nix] Disabling updates already done Discord 0.0.49 Starting app. Starting updater. 2024-04-10T19:24:02.984Z [Modules] Modules initializing 2024-04-10T19:24:02.984Z [Modules] Distribution: remote 2024-04-10T19:24:02.984Z [Modules] Host updates: disabled 2024-04-10T19:24:02.984Z [Modules] Module updates: enabled 2024-04-10T19:24:02.984Z [Modules] Module install path: /home/nils/.config/discord/0.0.49/modules 2024-04-10T19:24:02.984Z [Modules] Module installed file path: /home/nils/.config/discord/0.0.49/modules/installed.json 2024-04-10T19:24:02.985Z [Modules] Module download path: /home/nils/.config/discord/0.0.49/modules/pending splashScreen.initSplash(false) CDM component API not found, skipping blackbox: 2024-04-10T19:24:03.025Z 0 ---------------------------------------------- blackbox: 2024-04-10T19:24:03.046Z 1 Discord starting: {"releaseChannel":"stable","version":"0.0.49"}, modulepath: /home/nils/.config/discord/0.0.49/modules blackbox: 2024-04-10T19:24:03.056Z 2 ✅ webContents.created web1 "" blackbox: 2024-04-10T19:24:03.062Z 3 ✅ window.created win1 "discord" src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 [249322:0410/212403.491277:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=139 blackbox: 2024-04-10T19:24:03.493Z 4 ❌ child-process-gone { type: 'GPU', reason: 'crashed', exitCode: 139, serviceName: 'GPU' } src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 src/gbm_drv_common.c:130: GBM-DRV error (get_bytes_per_component): Unknown or not supported format: 808530000 splashScreen: SPLASH_SCREEN_READY splashScreen.webContentsSend: SPLASH_SCREEN_QUOTE SPLASH_SCREEN_QUOTE [ 'Hold Tight — Loading Discord' ] 2024-04-10T19:24:03.695Z [Modules] No updates to install splashScreen: no-pending-updates 2024-04-10T19:24:03.695Z [Modules] Host is up to date. 2024-04-10T19:24:03.695Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json splashScreen: checking-for-updates splashScreen.updateSplashState checking-for-updates checking-for-updates {} splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'checking-for-updates' } ] 2024-04-10T19:24:03.699Z [Modules] No module updates available. splashScreen: update-check-finished true 0 false CDM completed with status (old updater): "api-not-found" splashScreen.launchMainWindow: false Optional module ./ElectronTestRpc was not included. splashScreen.updateSplashState launching launching {} splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'launching' } ] blackbox: 2024-04-10T19:24:03.766Z 5 ✅ webContents.created web2 "" blackbox: 2024-04-10T19:24:03.773Z 6 ✅ window.created win2 "Discord" [249322:0410/212403.979208:ERROR:gpu_process_host.cc(993)] GPU process exited unexpectedly: exit_code=139 (electron) 'gpu-process-crashed event' is deprecated and will be removed. Please use 'child-process-gone event' instead. child-process-gone! child: GPU (undefined) exitCode: 139 blackbox: 2024-04-10T19:24:03.980Z 7 ❌ child-process-gone { type: 'GPU', reason: 'crashed', exitCode: 139, serviceName: 'GPU' } notificationScreen.webContentsSend: win is invalid undefined. ```

One thing I forgot to mention is that after updating, it works on the first try (both with your PR and the one i tried before). Then, after I close it, subsequent launches fail.

Artturin commented 7 months ago

Try a nixpkgs from before the update NIXPKGS_ALLOW_UNFREE=1 nix run "github:nixos/nixpkgs/fd281bd6b7d3e32ddfa399853946f782553163b5#discord" --impure

also try newest canary

Noratrieb commented 7 months ago

That has the same issue of working the first time and crashing the second time... looks it's not the discord update then. Canary has the same issue. Very weird. Spotify and Obsidian (other electron apps) work perfectly fine.. Looks like I need to bisect this whole thing in that case.

Noratrieb commented 7 months ago

I started bisecting and suspiciously, everything was green so I reset to the known-bad commit, rebuilt, restarted my computer and now it seems to work reliably? And your command also works reliably? And canary as well? Weird, maybe some other thing was corrupt.. state, on my system, unbelievable!! :D Gonna leave this issue open for a bit to see whether I get an issue again (or if someone else has the same problem) but will close if it doesn't reappear.

Noratrieb commented 7 months ago

It happened again, no updates :thinking:

Infinidoge commented 7 months ago

Try nuking (or less destructively, renaming) .config/{discord,discordptb,discordcanary} so it generates the directory from scratch, and see if it still does it. Discord keeps a frustratingly large amount of state,

matt1432 commented 7 months ago

I'm having the same issue. I tried deleting my .config/discord folder and it worked, but only the first launch. If i restart discord the issue comes back.

NVIDIA 535 on Hyprland

zanok commented 7 months ago

I am also experiencing this issue. It didn't start until I added nvidia drivers to my configuration.

A better work around to get discord to launch without nuking the .config/discord folder is to disable Hardware Acceleration in Settings > Advanced

My system is currently using Nvidia 550.67 with Wayland

Daholli commented 5 months ago

For me it works fine using X11 Plasma6, but after switching to Wayland I get this error, but disabling hardware accel fixed it for now, hope I can reactivate it later! (also doesnt work on the 555 driver)

DontEatOreo commented 2 months ago

@Noratrieb @matt1432 @Daholli Does this issue still persist?

Daholli commented 2 months ago

recently no issues, even with hardware accel

Noratrieb commented 2 months ago

I turned on hardware acceleration and it looks like it works again.