Discord 0.0.11 package sometimes randomly crashes

So the discord package on nix sometimes randomly crashes for me with this error

Discord 0.0.11
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/skykanin/.config/discord/0.0.11/modules
[Modules] Module installed file path: /home/skykanin/.config/discord/0.0.11/modules/installed.json
[Modules] Module download path: /home/skykanin/.config/discord/0.0.11/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.
[000:000] [13060] (audio_device_generic.cc:66): SetRecordingDevice: Not supported on this platform
[Modules] Starting to install discord_krisp...
[Modules] Fetching discord_krisp@0 from https://discord.com/api/modules/stable/discord_krisp/0
[Modules] Streaming discord_krisp@0 to /home/skykanin/.config/discord/0.0.11/modules/pending/discord_krisp-0.zip
[000:067] [13060] (audio_device_generic.cc:66): SetRecordingDevice: Not supported on this platform
Error downloading with electron net: HTTP Error: Status Code 403
Falling back to node net library..
[Modules] Failed fetching module discord_krisp@0: Error: HTTP Error: Status Code 403
[Modules] Finished module downloads. [success: 0] [failure: 1]
(electron) 'setBadgeCount function' is deprecated and will be removed. Please use 'badgeCount property' instead.
[002:054] [13060] (audio_send_stream.cc:285): Failed to set up send codec state.
[002:136] [13060] (audio_send_stream.cc:285): Failed to set up send codec state.
[002:136] [13060] (audio_device_generic.cc:31): BuiltInAECIsAvailable: Not supported on this platform
[002:186] [13060] (audio_send_stream.cc:285): Failed to set up send codec state.
Cannot upload crash dump: cannot exec /usr/bin/wget
Failed to get crash dump id.
Report Id: 
fish: “Discord” terminated by signal SIGSEGV (Address boundary error)

Not sure what the issue is, but I haven’t seen this issue being reported on discords side so I assume it’s a problem with the nix package.

that’s the issue, they hard coded an absolute path into the binary. I tried sending a request but they said something to the effect of, “issues with the linux client wont receive attention as the user base is too small”

1 Like

We may need to change discord into using buildFHSUserEnv, and just let it play in it’s own sandbox

FWIW I’ve been using the web client

I disliked that the packaged app fails to start if it’s not the most recent version. A pretty inane requirement.

For linux distros, there’s a .deb they allow you download and install

/sarcasm

I made a PR to fix the crashing but using buildFHSUserEnv discord: use buildFHSUserEnv to avoid crashing by jonringer · Pull Request #96246 · NixOS/nixpkgs · GitHub

Can you check coredumpctl and see if a dump is available? It’s possible the root cause here is discord: Frequent segmentation faults in libappindicator · Issue #96063 · NixOS/nixpkgs · GitHub (and the wget issue is just incidental, as discord tries to report the crash to its servers)

the gdb output is the same as #96063 however, I’m able to avoid the crash altogether by using the buildFHSUserEnv

I had another crash, even with the buildFHSUserEnv, PR to fix libappindicator

https://github.com/NixOS/nixpkgs/pull/96296

1 Like

Please try the discord version off of master, you can run it using the following command:

NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz nix-shell -p discord --run Discord

Found this in coredumpctl

Sat 2020-08-08 16:56:47 CEST   1117  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sat 2020-08-08 17:27:55 CEST   5391  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 12:47:27 CEST   1113  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 13:12:04 CEST  30130  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 13:21:45 CEST  12645  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 13:32:14 CEST  31558  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 13:32:14 CEST  31514  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 14:50:38 CEST  19675  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 14:50:38 CEST  19647  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 17:03:27 CEST  12501  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 17:20:48 CEST  14238  1000   100   6 missing   /nix/store/7m5rs7q1kczlmcz9parajymwfhmmwj6h-obs-studio-25.0.8/bin/..obs-wrapped-wrapped
Sun 2020-08-09 17:23:24 CEST  14793  1000   100   6 missing   /nix/store/7m5rs7q1kczlmcz9parajymwfhmmwj6h-obs-studio-25.0.8/bin/..obs-wrapped-wrapped
Sun 2020-08-09 17:26:11 CEST  20797  1000   100   6 missing   /nix/store/7m5rs7q1kczlmcz9parajymwfhmmwj6h-obs-studio-25.0.8/bin/..obs-wrapped-wrapped
Sun 2020-08-09 17:27:16 CEST  26803  1000   100   6 missing   /nix/store/7m5rs7q1kczlmcz9parajymwfhmmwj6h-obs-studio-25.0.8/bin/..obs-wrapped-wrapped
Sun 2020-08-09 17:47:28 CEST  10803  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 18:37:22 CEST   9993  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 21:24:41 CEST   1125  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 23:14:30 CEST  13251  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-09 23:35:17 CEST   4882  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Mon 2020-08-10 10:53:15 CEST   1114  1000   100   6 missing   /nix/store/dryll81a8ki41mnjvq0hlb2xh7ky0dcj-emacs-26.3/bin/.emacs-26.3-wrapped
Mon 2020-08-10 10:53:15 CEST   1131  1000   100   6 missing   /nix/store/f7z3hlg7c57bayznkpfzfmv8kh54hi10-spotify-1.1.26.501.gbe11e53b-15/share/spotify/.spotify-wrapped
Mon 2020-08-10 10:53:17 CEST   2911  1000   100   5 missing   /nix/store/f7z3hlg7c57bayznkpfzfmv8kh54hi10-spotify-1.1.26.501.gbe11e53b-15/share/spotify/.spotify-wrapped
Wed 2020-08-12 10:40:20 CEST    898   193   193   3 missing   /nix/store/qgi99iqpv7p92cbjblmf0wqk9jmnx4lz-chrootenv/bin/chrootenv
Thu 2020-08-13 20:22:30 CEST   1117  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Sat 2020-08-15 15:29:43 CEST   1114  1000   100  11 missing   /nix/store/ghjvr0zaw20i6wg3g7whrqv5fmhqckif-discord-0.0.11/opt/Discord/.Discord-wrapped
Tue 2020-08-18 20:09:05 CEST    898   193   193   3 missing   /nix/store/qgi99iqpv7p92cbjblmf0wqk9jmnx4lz-chrootenv/bin/chrootenv
Wed 2020-08-19 22:27:53 CEST   1130  1000   100  11 missing   /nix/store/rwmjb26gpj1li7krgsnc8d06j1s14sdg-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-23 00:53:26 CEST   1125  1000   100  11 missing   /nix/store/rwmjb26gpj1li7krgsnc8d06j1s14sdg-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-23 17:25:52 CEST   1126  1000   100  11 missing   /nix/store/rwmjb26gpj1li7krgsnc8d06j1s14sdg-discord-0.0.11/opt/Discord/.Discord-wrapped
Mon 2020-08-24 01:57:53 CEST  12919  1000   100  11 missing   /nix/store/rwmjb26gpj1li7krgsnc8d06j1s14sdg-discord-0.0.11/opt/Discord/.Discord-wrapped
Fri 2020-08-28 03:18:09 CEST  31613  1000   100   5 missing   /nix/store/rwmjb26gpj1li7krgsnc8d06j1s14sdg-discord-0.0.11/opt/Discord/.Discord-wrapped
Fri 2020-08-28 20:18:37 CEST  26036  1000   100   5 missing   /nix/store/rwmjb26gpj1li7krgsnc8d06j1s14sdg-discord-0.0.11/opt/Discord/.Discord-wrapped
Sun 2020-08-30 17:03:23 CEST   2310  1000   100  11 missing   /nix/store/zfa6mdxyp0l990n49ll7ssg55z4a6m17-polybar-3.4.3/bin/.polybar-wrapped
Tue 2020-09-01 16:28:43 CEST   1968  1000   100   6 missing   /nix/store/sa3hzwkkxarbcvpnd1wwmyddy0g9gadv-obs-studio-25.0.8/bin/..obs-wrapped-wrapped
Mon 2020-09-07 23:42:14 CEST   1122  1000   100  11 present   /nix/store/rwmjb26gpj1li7krgsnc8d06j1s14sdg-discord-0.0.11/opt/Discord/.Discord-wrapped
lines 85-134/134 (END)

please use the package that i used above, libappindicator was causing issues, but has been fixed on master now.

The store path should be:

/nix/store/xc1mak2lk1y0g66nfrldslhhkfgxqm7k-discord-0.0.11

on x86_64-linux