Score:0

Snap apps mysteriously crash on launch

cn flag

Using Ubuntu 22.04, KDE Plasma.

I'm experiencing very strange behavior of many (all?) snap apps, such as Firefox. They usually crash on launch, but if I try to launch them many times, eventually it will work. I could not find any indication of what's wrong in any of the logs (syslog, dmesg, journalctl -f). Sometimes the following messages appear in the syslog, but not every time:

[ 2176.109392] audit: type=1400 audit(1691916306.731:728): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/19457/usr/lib/snapd/snap-confine" pid=15891 comm="snap-confi
ne" capability=12  capname="net_admin"
[ 2176.109401] audit: type=1400 audit(1691916306.731:729): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/19457/usr/lib/snapd/snap-confine" pid=15891 comm="snap-confi
ne" capability=38  capname="perfmon"

The most mysterious part is when I launch Firefox (or the other snap apps) from terminal via snap run firefox or just firefox, it works every time. Also, when I configure the Plasma launcher to open the app in a terminal, it works every time. So no easy way to debug the problem, since it's only reproducible when launched from the desktop UI, not from terminal.

I've done extensive googling, found nothing that looked relevant. How do I approach this problem?

Sebastian avatar
in flag
It is a bit unclear how you _are_ actually trying to launch the apps. Are you saying a launcher hangs, but when you set it to run in a terminal it works? Have you tried the exact same command line the launcher uses in a terminal?
kirillkh avatar
cn flag
I'm launching it by pressing its icon in the Application Launcher. Yes, I have tried the same command in the terminal, it works just fine. The command for firefox is `env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox %u` (obviously, I run it without the `%u` from terminal).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.