all snap apps gone after snap upgrade

Bug #1960702 reported by Martin Vysny
30
This bug affects 7 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After snap has been upgraded yesterday to 2.54.2+21.10ubuntu1, all hell broke loose. All snap-installed apps are gone from gnome - snap firefox cannot be selected as the default browser, gnome says there's no app to handle https:// links when trying to report bugs via ubuntu-bug, firefox launch icon is missing from the dock launcher, even fish prints some kind of error to the console:

```
/usr/share/fish/vendor_conf.d/snapd.fish (line 3):
fish_add_path -aP $snap_bin_path
^
from sourcing file /usr/share/fish/vendor_conf.d/snapd.fish
 called on line 294 of file /usr/share/fish/config.fish
from sourcing file /usr/share/fish/config.fish
 called during startup
```

Firefox has no icon and is showing as the "grey cog wheel" icon, see screenshot for details. Luckily, firefox and all snap apps can be started from the terminal.

snap chromium is not present in Gnome Applications list, but when started from the terminal the icon in dock is correct for some reason.

None of the snap apps (firefox, chrome, intellij) can be "pinned" in Ubuntu Dock.

> dpkg -s snapd
Package: snapd
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 93766
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 2.54.2+21.10ubuntu1
Replaces: snap-confine (<< 2.23), snapd-xdg-open (<= 0.0.0), ubuntu-core-launcher (<< 2.22), ubuntu-snappy (<< 1.9), ubuntu-snappy-cli (<< 1.9)
Depends: adduser, apparmor (>= 2.10.95-0ubuntu2.2), ca-certificates, openssh-client, squashfs-tools, systemd, udev, libc6 (>= 2.34), libfuse2 (>= 2.6), liblzma5 (>= 5.1.1alpha+20110809), liblzo2-2 (>= 2.02), libudev1 (>= 183), zlib1g (>= 1:1.1.4), default-dbus-session-bus | dbus-session-bus
Recommends: gnupg
Suggests: zenity | kdialog
Breaks: snap-confine (<< 2.23), snapd-xdg-open (<= 0.0.0), ubuntu-core-launcher (<< 2.22), ubuntu-snappy (<< 1.9), ubuntu-snappy-cli (<< 1.9)
Conflicts: snap (<< 2013-11-29-1ubuntu1)
Conffiles:
 /etc/apparmor.d/usr.lib.snapd.snap-confine.real b9b25a499a2aa93118180bfd799ff48a
 /etc/apt/apt.conf.d/20snapd.conf e0e08d8267c66b9f81340dd6500cb67a
 /etc/profile.d/apps-bin-path.sh cf10aed8bb987ded8b7f4ba4303c1e9b
 /etc/xdg/autostart/snap-userd-autostart.desktop 4aaaa2fe36462a072a72e09cad553362
Description: Daemon and tooling that enable snap packages
 Install, configure, refresh and remove snap packages. Snaps are
 'universal' packages that work across many different Linux systems,
 enabling secure distribution of the latest apps and utilities for
 cloud, servers, desktops and the internet of things.
 .
 Start with 'snap list' to see installed snaps.
Built-Using: apparmor (= 3.0.3-0ubuntu1), libcap2 (= 1:2.44-1build1), libseccomp (= 2.5.1-1ubuntu1)
Homepage: https://github.com/snapcore/snapd

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: snap (not installed)
ProcVersionSignature: Ubuntu 5.13.0-28.31-generic 5.13.19
Uname: Linux 5.13.0-28-generic x86_64
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat Feb 12 15:39:43 2022
InstallationDate: Installed on 2021-03-24 (324 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
SourcePackage: snap
UpgradeStatus: Upgraded to impish on 2021-10-13 (121 days ago)

Revision history for this message
Martin Vysny (vyzivus) wrote :
Revision history for this message
Martin Vysny (vyzivus) wrote :
description: updated
description: updated
description: updated
Manfred Hampl (m-hampl)
affects: snap (Ubuntu) → snapd (Ubuntu)
Revision history for this message
Martin Vysny (vyzivus) wrote :

The same thing happened just now on my other laptop after upgrading to newest snapd, so this bug is not related to just one machine only.

This is critical - not for me since I can launch those apps from terminal, but for less experienced users, since they will perceive this as apps disappearing for no apparent reason.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Bram Geron (bgeron) wrote :

I have the same issue. And I also have fish as my login shell. Presumably there's a connection. Though the way I understand Ubuntu's design, gnome-session should be managing my environment (and not indirectly using my login shell).

Revision history for this message
Martin Vysny (vyzivus) wrote :

Tried to fix fish as suggested at https://askubuntu.com/questions/1392178/where-should-i-find-the-fish-add-path-command (by commenting out the line number 3 of /usr/share/fish/vendor_conf.d/snapd.fish) indeed hides the fish error but doesn't seem to help with the "missing apps" problem.

Revision history for this message
Martin Vysny (vyzivus) wrote :

Reverting back to bash and rebooting helped:

$ chsh -s /usr/bin/bash

Revision history for this message
Martin Vysny (vyzivus) wrote :

Since using bash instead of fish fixes the issue, I think the problem lies in the snapd+fish integration. Possible workarounds:

1. Revert to bash via chsh as stated above
2. Upgrade fish to 3.2.0 which contains the fish_add_path
3. Wait for newer snapd (which reportedly contains a compatibility fix to continue working with fish 3.1)

Also see https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1957948

Revision history for this message
Loïc Rouchon (loicrouchon) wrote :

There are two problems:

$ fish_add_path -aP $snap_bin_path
which breaks the fish script startup as the fish_add_path needs a higher fish version than 3.1

and a wrong XDG_DATA_DIRS separator (empty space instead of ':')
$ set XDG_DATA_DIRS $XDG_DATA_DIRS $snap_xdg_path
This prevents snap apps from being found in the launcher

The first problem can be fixed by adding the fish ppa to upgrade fish as suggested here: https://askubuntu.com/questions/1392178/where-should-i-find-the-fish-add-path-command

The second can be fixed locally by replacing
set XDG_DATA_DIRS $XDG_DATA_DIRS $snap_xdg_path
by
set XDG_DATA_DIRS $XDG_DATA_DIRS:$snap_xdg_path
in /usr/share/fish/vendor_conf.d/snapd.fish

Revision history for this message
DimanNe (dimanne) wrote :

Essentially, this bug broke entire KDE for me (not only snap packages).

I was getting these weird errors right after entering login password:
```
ksplashqml
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = ksplashqml path = /usr/bin pid = 17218
KCrash: Arguments: /usr/bin/ksplashqml
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi
Icon theme "breeze" not found.
Icon theme "breeze" not found.
```

Thank you Loic - the workaround helped!
I wish they tested such changes...

Logan Rosen (logan)
tags: added: regression-update
Revision history for this message
DimanNe (dimanne) wrote :

I am not sure this bug is a duplicate of bug #1957948. Bug #1957948 is annoying, but is not serious (when I open a new console, I see a message about fish_add_path.

While this bug breaks entire system (KDE cannot load) because XDG_DATA_DIRS is set incorrectly. Essentially, it renders entire system unusable.

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

Indeed, I may have acted to fast marking this as a duplicate of the other bugs. The problem is somewhat related to the other bugs in that both go down to fish shell snapd setup and how fragile the desktop session setup is. I pushed a fix in https://github.com/snapcore/snapd/pull/11416 which should be cherry picked to 2.54.3 once it lands.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.