snapcrafters / discord

A community-maintained package to easily install Discord on Linux
MIT License
75 stars 19 forks source link

[Bug]: notificationScreen.webContentsSend: win is invalid undefined. #211

Closed grapemix closed 4 months ago

grapemix commented 4 months ago

What happened?

start the app via /snap/discord/current/usr/share/discord/Discord --disable-gpu

(running discord yield "bash: /usr/bin/discord: No such file or directory" err

I also tried to remove ~/.config/discord

What should have happened?

I should able to run the app

Output of snap info discord

name:      discord
summary:   Chat for Communities and Friends
publisher: Snapcrafters✪
store-url: https://snapcraft.io/discord
contact:   https://github.com//snapcrafters/discord/issues
license:   Proprietary
description: |
  Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay
  close with your friends and communities.

  Snaps are confined, as such Discord may be unable to perform some of the tasks it typically does
  when unconfined. This may result in the system log getting spammed with apparmor errors. Granting
  access to the system-observe interface when in the snap will enable the features, and thus reduce
  the logging.

    snap connect discord:system-observe

  **Authors**

  This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or
  officially maintained by the upstream developers.
commands:
  - discord
snap-id:      qHVefGEBezeuCeSfTND40uoUD6GRw8BO
tracking:     latest/stable
refresh-date: today at 22:50 PDT
channels:
  latest/stable:    0.0.58 2024-06-26 (195) 113MB -
  latest/candidate: 0.0.58 2024-06-26 (195) 113MB -
  latest/beta:      ↑                             
  latest/edge:      ↑                             
installed:          0.0.58            (195) 113MB -

Output of snap connections discord

nterface               Plug                            Slot                            Notes
audio-playback          discord:audio-playback          :audio-playback                 -
audio-record            discord:audio-record            :audio-record                   -
camera                  discord:camera                  :camera                         -
content[gnome-42-2204]  discord:gnome-42-2204           gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]   discord:gtk-3-themes            gtk-common-themes:gtk-3-themes  -
content[icon-themes]    discord:icon-themes             gtk-common-themes:icon-themes   -
content[sound-themes]   discord:sound-themes            gtk-common-themes:sound-themes  -
desktop                 discord:desktop                 :desktop                        -
desktop-legacy          discord:desktop-legacy          :desktop-legacy                 -
gsettings               discord:gsettings               :gsettings                      -
home                    discord:home                    :home                           -
mount-observe           discord:mount-observe           -                               -
network                 discord:network                 :network                        -
network-observe         discord:network-observe         -                               -
opengl                  discord:opengl                  :opengl                         -
process-control         discord:process-control         -                               -
removable-media         discord:removable-media         -                               -
screen-inhibit-control  discord:screen-inhibit-control  :screen-inhibit-control         -
shared-memory           discord:shmem                   :shared-memory                  -
system-observe          discord:system-observe          -                               -
unity7                  discord:unity7                  :unity7                         -
wayland                 discord:wayland                 :wayland                        -
x11                     discord:x11                     :x11                            -

Output of snap version

snap    2.63
snapd   2.63
series  16
ubuntu  18.04
kernel  4.15.0-88-generic

Relevant log output

[869019.402771] audit: type=1400 audit(1719553038.052:2186): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="snap-update-ns.discord" name="/boot/" pid=14919 comm="6" srcname="/var/lib/snapd/hostfs/boot/" flags="rw, bind"

Teminal output of app

Discord 0.0.58
Starting app.
Starting updater.
2024-06-28T05:50:53.073Z [Modules] Modules initializing
2024-06-28T05:50:53.073Z [Modules] Distribution: remote
2024-06-28T05:50:53.073Z [Modules] Host updates: enabled
2024-06-28T05:50:53.074Z [Modules] Module updates: enabled
2024-06-28T05:50:53.074Z [Modules] Module install path: /home/ME/.config/discord/0.0.58/modules
2024-06-28T05:50:53.074Z [Modules] Module installed file path: /home/ME/.config/discord/0.0.58/modules/installed.json
2024-06-28T05:50:53.074Z [Modules] Module download path: /home/ME/.config/discord/0.0.58/modules/pending
splashScreen.initSplash(false)
CDM component API found
blackbox: 2024-06-28T05:50:53.196Z 0 

----------------------------------------------
CDM work timed out
blackbox: 2024-06-28T05:50:53.212Z 1 Discord starting: {"releaseChannel":"stable","version":"0.0.58"}, modulepath: /home/ME/.config/discord/0.0.58/modules
blackbox: 2024-06-28T05:50:53.233Z 2 ✅ webContents.created web1 ""
blackbox: 2024-06-28T05:50:53.236Z 3 ✅ window.created win1 "discord"
splashScreen: SPLASH_SCREEN_READY
splashScreen.webContentsSend: SPLASH_SCREEN_QUOTE SPLASH_SCREEN_QUOTE [ 'Hold Tight — Loading Discord' ]
2024-06-28T05:50:53.432Z [Modules] No updates to install
splashScreen: no-pending-updates
2024-06-28T05:50:53.433Z [Modules] Checking for host updates.
splashScreen: checking-for-updates
splashScreen.updateSplashState checking-for-updates checking-for-updates {}
splashScreen.webContentsSend: SPLASH_UPDATE_STATE SPLASH_UPDATE_STATE [ { status: 'checking-for-updates' } ]
blackbox: 2024-06-28T05:50:53.482Z 4 ✅ webContents.did-finish-load web1
2024-06-28T05:50:53.763Z [Modules] Host is up to date.
2024-06-28T05:50:53.763Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
2024-06-28T05:50:53.806Z [Modules] No module updates available.
splashScreen: update-check-finished true 0 false
CDM completed with status (old updater): undefined
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-06-28T05:50:53.896Z 5 ✅ webContents.created web2 ""
blackbox: 2024-06-28T05:50:53.922Z 6 ✅ window.created win2 "Discord"
[WebContents] crashed (reason: abnormal-exit, exitCode: 32512)... reloading
Optional module ./ElectronTestRpc was not included.
blackbox: 2024-06-28T05:50:54.999Z 7 ❌ render-process-gone { reason: 'abnormal-exit', exitCode: 32512 }
blackbox: 2024-06-28T05:50:55.024Z 8 window.closed win2
blackbox: 2024-06-28T05:50:55.029Z 9 ✅ webContents.created web3 ""
blackbox: 2024-06-28T05:50:55.032Z 10 ✅ window.created win3 "Discord"
blackbox: 2024-06-28T05:50:55.034Z 11 webContents.destroyed web2
[WebContents] double crashed (reason: abnormal-exit, exitCode: 32512)... RIP =(
notificationScreen.webContentsSend: win is invalid undefined.
blackbox: 2024-06-28T05:50:55.982Z 12 ❌ render-process-gone { reason: 'abnormal-exit', exitCode: 32512 }
blackbox: 2024-06-28T05:50:55.990Z 13 before-quit
lengau commented 4 months ago

Running that executable directly will have weird results and is not supported. What's happening here is it's trying to run the snap without confinement.

The error message you're getting sounds like your shell thinks there's a copy of discord still in /usr/bin/discord. Running hash -r should remove that, and then you can check with which discord to see what discord instance it will run - it should be /snap/bin/discord.

If you want to run the Discord snap directly, please either use /snap/bin/discord or snap run discord.