flathub / com.discordapp.Discord

https://flathub.org/apps/details/com.discordapp.Discord
118 stars 43 forks source link

Crash on startup [Wayland] #413

Open my4ng opened 4 days ago

my4ng commented 4 days ago

The small update window appears for a moment and then discord crashes. It works on KDE (wayland) but not niri (wayland).

$ flatpak run --socket=wayland com.discordapp.Discord --enable-features=UseOzonePlatform --ozone-platform=wayland

Disabling updates already done
Discord 0.0.58
Starting app.
Starting updater.
2024-07-04T01:52:21.390Z [Modules] Modules initializing
2024-07-04T01:52:21.390Z [Modules] Distribution: remote
2024-07-04T01:52:21.390Z [Modules] Host updates: disabled
2024-07-04T01:52:21.390Z [Modules] Module updates: enabled
2024-07-04T01:52:21.390Z [Modules] Module install path: /home/my4ng/.var/app/com.discordapp.Discord/config/discord/0.0.58/modules
2024-07-04T01:52:21.390Z [Modules] Module installed file path: /home/my4ng/.var/app/com.discordapp.Discord/config/discord/0.0.58/modules/installed.json
2024-07-04T01:52:21.390Z [Modules] Module download path: /home/my4ng/.var/app/com.discordapp.Discord/config/discord/0.0.58/modules/pending
splashScreen.initSplash(false)
CDM component API found
blackbox: 2024-07-04T01:52:21.488Z 0

----------------------------------------------
blackbox: 2024-07-04T01:52:21.500Z 1 Discord starting: {"releaseChannel":"stable","version":"0.0.58"}, modulepath: /home/my4ng/.var/app/com.discordapp.Discord/config/discord/0.0.58/modules
blackbox: 2024-07-04T01:52:21.502Z 2 ✅ webContents.created web1 "index.html"
blackbox: 2024-07-04T01:52:21.502Z 3 ✅ window.created win1 "discord"
splashScreen: SPLASH_SCREEN_READY
2024-07-04T01:52:21.551Z [Modules] No updates to install
splashScreen: no-pending-updates
2024-07-04T01:52:21.551Z [Modules] Host is up to date.
2024-07-04T01:52:21.551Z [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-07-04T01:52:21.557Z [Modules] No module updates available.
splashScreen: update-check-finished true 0 false
CDM completed with status (old updater): [{"id":"oimompecagnajdejgnnjijobebaeigek","status":"new","title":"Widevine Content Decryption Module","version":"4.10.2710.0"}]
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-07-04T01:52:21.625Z 4 ✅ webContents.created web2 ""
blackbox: 2024-07-04T01:52:21.628Z 5 ✅ window.created win2 "Discord"
blackbox: 2024-07-04T01:52:21.632Z 6 ✅ webContents.did-finish-load web1
[WebContents] crashed (reason: crashed, exitCode: 11)... reloading
Optional module ./ElectronTestRpc was not included.
blackbox: 2024-07-04T01:52:22.145Z 7 ❌ render-process-gone { reason: 'crashed', exitCode: 11 }
blackbox: 2024-07-04T01:52:22.154Z 8 window.closed win2
blackbox: 2024-07-04T01:52:22.155Z 9 ✅ webContents.created web3 ""
blackbox: 2024-07-04T01:52:22.156Z 10 ✅ window.created win3 "Discord"
blackbox: 2024-07-04T01:52:22.156Z 11 webContents.destroyed web2
[WebContents] double crashed (reason: crashed, exitCode: 11)... RIP =(
notificationScreen.webContentsSend: win is invalid undefined.
blackbox: 2024-07-04T01:52:22.555Z 12 ❌ render-process-gone { reason: 'crashed', exitCode: 11 }
blackbox: 2024-07-04T01:52:22.561Z 13 before-quit
2024/07/04 11:52:22 socat[3] W exiting on signal 15
YaLTeR commented 3 days ago

Discord wants X11 for some reason; on KDE it probably accesses KDE's Xwayland socket (it's allowed in the Flatpak manifest), but on niri there's none.

my4ng commented 3 days ago

Discord wants X11 for some reason; on KDE it probably accesses KDE's Xwayland socket (it's allowed in the Flatpak manifest), but on niri there's none.

Indeed with xwayland-satellite running in the background and setting the DISPLAY env var, it opens without any issue. This is bizarre since under KDE it states that it is running as a native wayland window using the debug console.