snapd installation hangs apt with error: cannot read the state file: open /var/lib/snapd/state.json: no such file or directory

Bug #2048139 reported by sem
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Tried to install Firefox, apt hangs at 54%.

This may be related to the fact that calamares reported a failed installation when I tried to install element, but it still let me boot into it. I reported that bug against calamares but it could have been snapd at fault.

apt output:

```
$ sudo apt install firefox

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following additional packages will be installed:

snapd squashfs-tools

Suggested packages:

zenity | kdialog

The following NEW packages will be installed:

firefox snapd squashfs-tools

upgraded, 3 newly installed, 0 to remove and not upgraded.

Need to get 27.5 MB of archives.

After this operation, 111 MB of additional disk space will be used.

Do you want to continue? [Y/n]

Get:1 http://us.archive.ubuntu.com/ubuntu noble/main amd64 squashfs-tools amd64 1:4.6.1-1 [188 kB]

Get:2 http://us.archive.ubuntu.com/ubuntu noble/main amd64 snapd amd64 2.60.4+23.10 [27.3 MB] Get:3 http://us.archive.ubuntu.com/ubuntu noble/main amd64 firefox amd64 1:1snap1-0ubuntu5 [77.3 kB]

Fetched 27.5 MB in 1s (33.4 MB/s)

Preconfiguring packages

Selecting previously unselected package squashfs-tools.

(Reading database .. 254744 files and directories currently installed.) Preparing to unpack.../squashfs-tools_1%3a4.6.1-1_amd64.deb

Unpacking squashfs-tools (1:4.6.1-1)

Selecting previously unselected package snapd.

Preparing to unpack.../snapd_2.60.4+23.10_amd64.deb

Unpacking snapd (2.60.4+23.10)

Setting up squashfs-tools (1:4.6.1-1) Setting up snapd (2.60.4+23.10)

error: cannot read the state file: open /var/lib/snapd/state.json: no such file or directory

Created symlink /etc/systemd/system/multi-user.target.wants/snapd.aa-prompt-listener.service/lib/systemd/system/snapd.aa-prom

pt-listener.service.

I Created symlink /etc/systemd/system/multi-user.target.wants/snapd.apparmor.service/lib/systemd/system/snapd.apparmor.service.

Created symlink /etc/systemd/system/multi-user.target.wants/snapd.autoimport.service/lib/systemd/system/snapd.autoimport.serv ice.

Created symlink /etc/systemd/system/multi-user.target.wants/snapd.core-fixup.service/lib/systemd/system/snapd.core-fixup.serv

ice.

Created

symlink /etc/systemd/system/multi-user.target.wants/snapd.recovery-chooser-trigger.service/lib/systemd/system/snapd.r

ecovery-chooser-trigger.service.

Created symlink /etc/systemd/system/multi-user.target.wants/snapd.seeded.service/lib/systemd/system/snapd.seeded.service.

Created symlink /etc/systemd/system/cloud-final.service.wants/snapd.seeded.service/lib/systemd/system/snapd.seeded.service. is added as a dependency to a non-existent unit cloud-final.service.

Unit /lib/systemd/system/snapd.seeded.service symlink /etc/systemd/system/multi-user.target.wants/snapd.service/lib/systemd/system/snapd.service.

Created symlink /etc/systemd/system/timers.target.wants/snapd.snap-repair.timer/lib/systemd/system/snapd.snap-repair.timer.

Created

Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket/lib/systemd/system/snapd.socket. Created symlink /etc/systemd/system/final.target.wants/snapd.system-shutdown.service/lib/systemd/system/snapd.system-shutdown

.service.

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.
```

This was copied/ocr from a photo of the screen, apologies if there are typos

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: snapd 2.60.4+23.10
ProcVersionSignature: Ubuntu 6.5.0-9.9-generic 6.5.3
Uname: Linux 6.5.0-9-generic x86_64
ApportVersion: 2.27.0-0ubuntu6
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: LXQt
Date: Thu Jan 4 20:00:17 2024
SourcePackage: snapd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
sem (semitones) wrote :
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.