[Bug]: Discord restarts after opening the window from the desktop icon a few times
What happened?
On both Ubuntu 22.04 and Kubuntu 22.10, I have noticed that whenever I open the app from its desktop icon (so like, the icon in Gnome's application drawer) enough times, discord will restart.
What should have happened?
The already-running Discord process should simply open its window when the app is opened from KDE's application launcher or dock, or GNOME's application menu, etc. Basically anything that uses its .desktop file.
Output of snap info discord
name: discord
summary: All-in-one voice and text chat for gamers
publisher: Snapcrafters
store-url: https://snapcraft.io/discord
contact: https://github.com/snapcrafters/discord/issues
license: unset
description: |
All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and
phone.
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
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 14:31 CST
channels:
latest/stable: 0.0.23 2023-01-23 (148) 90MB -
latest/candidate: ↑
latest/beta: ↑
latest/edge: 0.0.24 2023-01-16 (149) 85MB -
installed: 0.0.23 (148) 90MB -
Output of snap connections discord
Interface 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 :system-observe manual
unity7 discord:unity7 :unity7 -
wayland discord:wayland :wayland -
x11 discord:x11 :x11 -
Output of snap version
snap 2.58
snapd 2.58
series 16
ubuntu 22.10
kernel 5.19.0-29-generic
Relevant log output
No response
Teminal output of app
constancies@framestancies:~$ discord
Discord 0.0.23
[6382:0128/152016.011043:ERROR:process_singleton_posix.cc(235)] read() failed: Permission denied (13)
(Discord:6382): Gtk-WARNING **: 15:20:16.047: Theme parsing error: gtk.css:1:21: Failed to import: Error opening file /home/constancies/snap/discord/148/.config/gtk-3.0/colors.css: No such file or directory
Gtk-Message: 15:20:16.062: Failed to load module "colorreload-gtk-module"
Gtk-Message: 15:20:16.062: Failed to load module "window-decorations-gtk-module"
[6382:0128/152016.079917:ERROR:zygote_host_impl_linux.cc(263)] Failed to adjust OOM score of renderer with pid 6502: Permission denied (13)
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: disabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/constancies/snap/discord/148/.config/discord/0.0.23/modules
[Modules] Module installed file path: /home/constancies/snap/discord/148/.config/discord/0.0.23/modules/installed.json
[Modules] Module download path: /home/constancies/snap/discord/148/.config/discord/0.0.23/modules/pending
[6502:0128/152016.139425:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[Modules] No updates to install
[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.
Optional module ./ElectronTestRpc was not included.
[6382:0128/152016.261782:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.login1.Manager.Inhibit: object_path= /org/freedesktop/login1: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.102" (uid=1000 pid=6382 comm="/snap/discord/148/usr/share/discord/Discord --use-" label="snap.discord.discord (enforce)") interface="org.freedesktop.login1.Manager" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=1057 comm="/lib/systemd/systemd-logind" label="unconfined")
[6382:0128/152016.310551:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.PowerManagement.Inhibit.Inhibit: object_path= /org/freedesktop/PowerManagement/Inhibit: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.112" (uid=1000 pid=6382 comm="/snap/discord/148/usr/share/discord/Discord --use-" label="snap.discord.discord (enforce)") interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.PowerManagement" (uid=1000 pid=1644 comm="/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdev" label="unconfined")
[6382:0128/152016.310572:ERROR:power_save_blocker_linux.cc(337)] No response to Inhibit() request!
[6382:0128/152016.853789:ERROR:object_proxy.cc(623)] Failed to call method: org.kde.KWallet.isEnabled: object_path= /modules/kwalletd5: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.113" (uid=1000 pid=6382 comm="/snap/discord/148/usr/share/discord/Discord --use-" label="snap.discord.discord (enforce)") interface="org.kde.KWallet" member="isEnabled" error name="(unset)" requested_reply="0" destination="org.kde.kwalletd5" (uid=1000 pid=1882 comm="/usr/bin/kwalletd5" label="unconfined")
[6382:0128/152016.853811:ERROR:kwallet_dbus.cc(100)] Error contacting kwalletd5 (isEnabled)
[6382:0128/152016.854161:ERROR:object_proxy.cc(623)] Failed to call method: org.kde.KLauncher.start_service_by_desktop_name: object_path= /KLauncher: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.klauncher was not provided by any .service files
[6382:0128/152016.854169:ERROR:kwallet_dbus.cc(72)] Error contacting klauncher to start kwalletd5
[6382:0128/152016.854504:ERROR:object_proxy.cc(623)] Failed to call method: org.kde.KWallet.close: object_path= /modules/kwalletd5: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.113" (uid=1000 pid=6382 comm="/snap/discord/148/usr/share/discord/Discord --use-" label="snap.discord.discord (enforce)") interface="org.kde.KWallet" member="close" error name="(unset)" requested_reply="0" destination="org.kde.kwalletd5" (uid=1000 pid=1882 comm="/usr/bin/kwalletd5" label="unconfined")
[6382:0128/152016.854520:ERROR:kwallet_dbus.cc(418)] Error contacting kwalletd5 (close)
WEIGHT /home/constancies/snap/discord/148/.config/discord/0.0.23/modules/discord_krisp/NC_small_8k.thw
WEIGHT /home/constancies/snap/discord/148/.config/discord/0.0.23/modules/discord_krisp/NC_small_16k.thw
WEIGHT /home/constancies/snap/discord/148/.config/discord/0.0.23/modules/discord_krisp/c6.s.f.27f1a3.thw
WEIGHT /home/constancies/snap/discord/148/.config/discord/0.0.23/modules/discord_krisp/VAD_weight.thw
[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.
(Discord:6382): IBUS-WARNING **: 15:20:18.016: Failed to mkdir /home/constancies/snap/discord/148/.config/ibus/bus: Not a directory
[6382:0128/152018.049179:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.PowerManagement.Inhibit.Inhibit: object_path= /org/freedesktop/PowerManagement/Inhibit: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.114" (uid=1000 pid=6382 comm="/snap/discord/148/usr/share/discord/Discord --use-" label="snap.discord.discord (enforce)") interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.PowerManagement" (uid=1000 pid=1644 comm="/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdev" label="unconfined")
[6382:0128/152018.049209:ERROR:power_save_blocker_linux.cc(337)] No response to Inhibit() request!
Killed
Since the latest snap update 0.0.32 2023-10-17 (160), this now occurs for me every time I close the Discord window and re-open from the launcher.
Ubuntu 22.04 (GNOME) snap discord 0.0.32
The problem is similar to the one described.
Also, if after closing the window, you click “open Discord” in the discord menu in the tray, it crashes