Ubuntu 22.04 chromium snap broken

Ubuntu Version: 22.04 LTS

Desktop Environment (if applicable): GNOME

Problem Description:
Chromium browser disappeared from system. Snapd reports the snap is broken.

Relevant System Information:
Last used the morning (EDT) of Monday, May 26.

Screenshots or Error Messages:
From snap list:

chromium                   -                               3137   latest/stable    canonical✓     broken

What I’ve Tried:

$ sudo snap refresh
error: cannot refresh: cannot find installed snap "chromium" at revision 3137:
       missing file /snap/chromium/3137/meta/snap.yaml
$ snap remove chromium; snap install chromium
error: cannot perform the following tasks:
- Save data of snap "chromium" in automatic snapshot set #3 (sync /var/lib/snapd/snapshots/3_chromium__3137.zip.hBSLF9HWWlV7~: input/output error)
snap "chromium" is already installed, see 'snap help refresh'

Curt

Have you looked at /snap/chromium yet ? This is where the .snap file should get mounted under its respectively versioned mount point…

Also snap changes (and for details snap change <ID>) and snap warnings might be interesting…

Did you change the kernel to something unsupported or is your disk full (or read only due to filesystem errors) by any chance ? These two could also cause a snap breakage.

From your output:

Snapd is not “reporting the snap is broken”.
Snapd is telling you it encountered an unrecoverable fault while trying to communicate with your storage device.

1 Like

I am still a bit of a newb regarding snaps, so thanks for the pointer

/snap/chromium/current → 3137/

However, the 3137 directory is empty, while the 3125 directory is not:

$ ll /snap/chromium/current/
total 0
drwxr-xr-x 1 root root  0 May 26 08:17 ./
drwxr-xr-x 1 root root 30 May 26 08:19 ../

Looks like 3137 was “installed” after I had launched chromium the morning of May 26.

No snap warnings and snap changes only reported the failed removal attempt from today.

1 Like

sudo snap revert chromium has restored a working chromium browser to my system.

3 Likes

Glad to hear you managed to sort this out.

Please mark this topic with a solution to help others.

For future reference, you can find a very handy list of snap commands here:

Interestingly, snap list is still showing rev 3125 as latest/stable and sudo snap refresh reports all snaps up to date. So what happened to this failed rev 3137 whose directory is now partially populated, but has obviously fewer files than the 3125 directory?

After more failed updates, chromium finally updated successfully this morning to revision 3153. It was accompanied with an update to core20 rev 2582.

I’m left wondering if there was a problem with the prior core20 rev?

Check your error messages for detail.
Failed updates are uncommon and suspicious.

If you’re not sure what the detail is telling you, post the output here.

Unfortunately, the apt autoremove I executed last night trashed my Ubuntu 22.04 partition and I had to restore from a recent backup. Looking at journalctl, the log now jumps from a successful snap update on May 17 to a successful update this morning, i.e. I have lost the portion of the log that would have shown snap install errors earlier this week.

Trashed my partition” is not what apt does.

It is exactly, however, what an input/output error can do.

Mysterious corruption issues and input/output errors are both strong indicators that you may have a faulty or dying storage device.

If your storage device is faulty or dying, that hardware must be replaced. There is no software fix or workaround.

2 Likes

After much investigation and several failed attempts to restore my 22.04 partition yesterday, I have come to the conclusion the BTRFS partition is corrupted and beyond recovery. SMART diagnostics for the SSD are all healthy and the other partitions on the SSD are operating normally.

I had already started building up a new install of 24.04 alongside the 22.04 partition and have now shifted my attention to getting it fully configured for my needs.

Further investigation has revealed that snaps had consumed across three user accounts a substantial portion of my ext4 /home partition. With it nearly full, it is possible I was experiencing inode exhaustion. Now I have the partition usage down to 70%, but I have not retested my 22.04 partition that was giving me problems.

Do you know which snaps that were? Would be interesting to know, normally they do not consume a lot in the home dir (apart from something like a browser that catches there or a mail program that holds your email in it…)

The big ones were Firefox and Chromium. Chromium is less of a problem, because I mount a common file space onto $HOME/snap/chromium to share my setup between my current and prior Ubuntu installations. I use a unique home directory for each install and sym link common files and directories that I want to share between installs. This separate but shared /home architecture has worked well for me for the past 10+ years.

Firefox is kept completely independent for my user account in each installation with bookmarks shared through the cloud. It has not been conducive to share my Firefox profile between home accounts for many years now. When I tried to copy my 22.04 Firefox profile to my new 24.04 user account I ran out of space on /home. After I deleted my 20.04 Firefox profile I was able to copy the 22.04 profile to 24.04. I subsequently found and deleted a second, older Firefox profile in snap/firefox/common/.mozilla/firefox that was abandoned by a prior Firefox upgrade in Nov 2020(!) - no wonder my /home had mysteriously become more full - this has been puzzling me for years, but I had not previously been able to put my finger on why.

1 Like