Unable to open snapd applications

I am unable to use snap.

Jamal@ubuntu:~$ snap version
snap    2.58.2
snapd   unavailable
series  -
Jamal@ubuntu:~$ systemctl status snapd.service
× snapd.service - Snap Daemon
     Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2023-05-24 18:42:14 +06; 6min ago
TriggeredBy: × snapd.socket
   Main PID: 6955 (code=exited, status=1/FAILURE)
        CPU: 38ms

May 24 18:42:14 ubuntu systemd[1]: snapd.service: Scheduled restart job, restart counter is at 5.
May 24 18:42:14 ubuntu systemd[1]: Stopped Snap Daemon.
May 24 18:42:14 ubuntu systemd[1]: snapd.service: Start request repeated too quickly.
May 24 18:42:14 ubuntu systemd[1]: snapd.service: Failed with result 'exit-code'.
May 24 18:42:14 ubuntu systemd[1]: Failed to start Snap Daemon.
May 24 18:42:14 ubuntu systemd[1]: snapd.service: Triggering OnFailure= dependencies.

what is the full output of snap version so we know what OS/kernel/snapd version you are on ?

EDIT: OOPS ! sorry i’m blind … that’s weird, it should show OS and kernel at least, could you give us that info (“cat /etc/os-release” and the output of “uname -a”) …

Jamal@ubuntu:~$ uname -a
Linux ubuntu 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

And how do i check the “cat /etc/os-release”?

just copy/paste what’s between the quotes into your terminal and hit enter :wink:

Jamal@ubuntu:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

hmm, interesting, i do run the exact same setup on all my machines here without issue, is this in a VM, bare-metal, cloud ?

It is a dual boot system with Windows 10

was it an upgrade from a former ubuntu version or a fresh install ?

I upgraded it from Ubuntu 20.04.

It was 20 for sure. Not confident about the numbers after that though

are the ubuntu-minimal and ubuntu-standard packages installed ? you can check with (copy/paste):

dpkg -l |grep -E 'ubuntu-minimal|ubuntu-standard'

if they are there (so all pre-requisites are fulfilled) i’d try to purge and reinstall snapd:

sudo apt purge snapd
sudo apt install snapd

and check snap version output again …

Jamal@ubuntu:~$ dpkg -l |grep -E 'ubuntu-minimal|ubuntu-standard'
ii  ubuntu-minimal                                 1.481                                   amd64        Minimal core of Ubuntu
ii  ubuntu-standard                                1.481                                   amd64        The Ubuntu standard system
Jamal@ubuntu:~$ sudo apt purge snapd
[sudo] password for ubuntu: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  firefox* firefox-locale-bn* firefox-locale-en* snapd*
0 upgraded, 0 newly installed, 4 to remove and 7 not upgraded.
After this operation, 103 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 264100 files and directories currently installed.)
Removing firefox-locale-en (1:1snap1-0ubuntu2) ...
Removing firefox-locale-bn (1:1snap1-0ubuntu2) ...
Removing firefox (1:1snap1-0ubuntu2) ...
Removing snapd (2.58+22.04) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
(Reading database ... 263986 files and directories currently installed.)
Purging configuration files for snapd (2.58+22.04) ...
Stopping snap-asciiquarium-19.mount
Stopping unit snap-asciiquarium-19.mount
Waiting until unit snap-asciiquarium-19.mount is stopped [attempt 1]
snap-asciiquarium-19.mount is stopped.
Removing snap asciiquarium and revision 19
Removing snap-asciiquarium-19.mount
Stopping snap-asciiquarium-42.mount
Stopping unit snap-asciiquarium-42.mount
Waiting until unit snap-asciiquarium-42.mount is stopped [attempt 1]
snap-asciiquarium-42.mount is stopped.
Removing snap asciiquarium and revision 42
Removing snap-asciiquarium-42.mount
Stopping snap-bare-5.mount
Stopping unit snap-bare-5.mount
Waiting until unit snap-bare-5.mount is stopped [attempt 1]
snap-bare-5.mount is stopped.
Removing snap bare and revision 5
Removing snap-bare-5.mount
Stopping snap-code-119.mount
Stopping unit snap-code-119.mount
Waiting until unit snap-code-119.mount is stopped [attempt 1]
snap-code-119.mount is stopped.
Removing snap code and revision 119
Removing snap-code-119.mount
Stopping snap-code-120.mount
Stopping unit snap-code-120.mount
Waiting until unit snap-code-120.mount is stopped [attempt 1]
snap-code-120.mount is stopped.
Removing snap code and revision 120
Removing snap-code-120.mount
Stopping snap-color\x2dpicker-25.mount
Stopping unit snap-color\x2dpicker-25.mount
Waiting until unit snap-color\x2dpicker-25.mount is stopped [attempt 1]
snap-color\x2dpicker-25.mount is stopped.
Removing snap color-picker and revision 25
Removing snap-color\x2dpicker-25.mount
Stopping snap-color\x2dpicker-26.mount
Stopping unit snap-color\x2dpicker-26.mount
Waiting until unit snap-color\x2dpicker-26.mount is stopped [attempt 1]
snap-color\x2dpicker-26.mount is stopped.
Removing snap color-picker and revision 26
Removing snap-color\x2dpicker-26.mount
Stopping snap-core-14447.mount
Stopping unit snap-core-14447.mount
Waiting until unit snap-core-14447.mount is stopped [attempt 1]
snap-core-14447.mount is stopped.
Removing snap core and revision 14447
Removing snap-core-14447.mount
Stopping snap-core-14784.mount
Stopping unit snap-core-14784.mount
Waiting until unit snap-core-14784.mount is stopped [attempt 1]
snap-core-14784.mount is stopped.
Removing snap core and revision 14784
Removing snap-core-14784.mount
Stopping snap-core18-2697.mount
Stopping unit snap-core18-2697.mount
Waiting until unit snap-core18-2697.mount is stopped [attempt 1]
snap-core18-2697.mount is stopped.
Removing snap core18 and revision 2697
Removing snap-core18-2697.mount
Stopping snap-core18-2708.mount
Stopping unit snap-core18-2708.mount
Waiting until unit snap-core18-2708.mount is stopped [attempt 1]
snap-core18-2708.mount is stopped.
Removing snap core18 and revision 2708
Removing snap-core18-2708.mount
Stopping snap-core20-1822.mount
Stopping unit snap-core20-1822.mount
Waiting until unit snap-core20-1822.mount is stopped [attempt 1]
snap-core20-1822.mount is stopped.
Removing snap core20 and revision 1822
Removing snap-core20-1822.mount
Stopping snap-core20-1828.mount
Stopping unit snap-core20-1828.mount
Waiting until unit snap-core20-1828.mount is stopped [attempt 1]
snap-core20-1828.mount is stopped.
Removing snap core20 and revision 1828
Removing snap-core20-1828.mount
Stopping snap-core22-509.mount
Stopping unit snap-core22-509.mount
Waiting until unit snap-core22-509.mount is stopped [attempt 1]
snap-core22-509.mount is stopped.
Removing snap core22 and revision 509
Removing snap-core22-509.mount
Stopping snap-core22-522.mount
Stopping unit snap-core22-522.mount
Waiting until unit snap-core22-522.mount is stopped [attempt 1]
snap-core22-522.mount is stopped.
Removing snap core22 and revision 522
Removing snap-core22-522.mount
Stopping snap-curl-1256.mount
Stopping unit snap-curl-1256.mount
Waiting until unit snap-curl-1256.mount is stopped [attempt 1]
snap-curl-1256.mount is stopped.
Removing snap curl and revision 1256
Removing snap-curl-1256.mount
Stopping snap-curl-1435.mount
Stopping unit snap-curl-1435.mount
Waiting until unit snap-curl-1435.mount is stopped [attempt 1]
snap-curl-1435.mount is stopped.
Removing snap curl and revision 1435
Removing snap-curl-1435.mount
Stopping snap-discord-149.mount
Stopping unit snap-discord-149.mount
Waiting until unit snap-discord-149.mount is stopped [attempt 1]
snap-discord-149.mount is stopped.
Removing snap discord and revision 149
Removing snap-discord-149.mount
Stopping snap-discord-150.mount
Stopping unit snap-discord-150.mount
Waiting until unit snap-discord-150.mount is stopped [attempt 1]
snap-discord-150.mount is stopped.
Removing snap discord and revision 150
Removing snap-discord-150.mount
Stopping snap-firefox-2356.mount
Stopping unit snap-firefox-2356.mount
Waiting until unit snap-firefox-2356.mount is stopped [attempt 1]
snap-firefox-2356.mount is stopped.
Removing snap firefox and revision 2356
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_ZA.dic': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_CA.dic': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_US.aff': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_ZA.aff': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_US.dic': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/bn_BD.aff': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_AU.dic': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_AU.aff': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/bn_BD.dic': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_GB.aff': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_GB.dic': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/bn_IN.aff': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/bn_IN.dic': Read-only file system
rm: cannot remove '/var/snap/firefox/common/host-hunspell/en_CA.aff': Read-only file system
dpkg: error processing package snapd (--purge):
 installed snapd package post-removal script subprocess returned error exit status 1
Purging configuration files for firefox (1:1snap1-0ubuntu2) ...
Errors were encountered while processing:
 snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Jamal@ubuntu:~$ sudo apt install snapd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  snapd
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 23.8 MB of archives.
After this operation, 102 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 snapd amd64 2.58+22.04 [23.8 MB]
Fetched 23.8 MB in 58s (408 kB/s)                                                                                                                                                                                                            
(Reading database ... 263979 files and directories currently installed.)
Preparing to unpack .../snapd_2.58+22.04_amd64.deb ...
Unpacking snapd (2.58+22.04) ...
Setting up snapd (2.58+22.04) ...
error: cannot read state: invalid character 'L' looking for beginning of value
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.
snapd.failure.service is a disabled or a static unit, not starting it.
snapd.mounts-pre.target is a disabled or a static unit, not starting it.
snapd.mounts.target is a disabled or a static unit, not starting it.
snapd.snap-repair.service is a disabled or a static unit, not starting it.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...

OUCH … looks like some firefox bug you are hitting there … the interesting part though is that “snap remove firefox” seems to not have complained at all, but just tried to remove the snap, lets try a snapd reinstall without removal (in the hope it overwrites potentially messed up stuff) …

sudo apt install --reinstall snapd
Jamal@ubuntu:~$ sudo apt install --reinstall snapd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 23.8 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 snapd amd64 2.58+22.04 [23.8 MB]
Fetched 23.8 MB in 15s (1,608 kB/s)                                                                                                                                                                                                          
(Reading database ... 264076 files and directories currently installed.)
Preparing to unpack .../snapd_2.58+22.04_amd64.deb ...
Unpacking snapd (2.58+22.04) over (2.58+22.04) ...
Setting up snapd (2.58+22.04) ...
error: cannot read state: invalid character 'L' looking for beginning of value
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.
snapd.failure.service is a disabled or a static unit not running, not starting it.
snapd.snap-repair.service is a disabled or a static unit not running, not starting it.
Failed to restart snapd.mounts-pre.target: Operation refused, unit snapd.mounts-pre.target may be requested by dependency only (it is configured to refuse manual start/stop).
See system logs and 'systemctl status snapd.mounts-pre.target' for details.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...

there you go, there is something fishy with the state file, is your disk full, do you see any other filesystem errors in your system logs ?

But my disk is showing that only 84.7GB is allocated

this one is also worrying and points to some bigger underlying issue …

please check your system logs for any filesystem errors …

yeah, not what i meant … do not use the log viewer but something like journalctl from a terminal and look for suspicious errors … the log viewer is a nice toy but really not helpful in this case (but the GIO and Glib errors in there also look worrying, there seems to be something really wrong on the low level with your install)…