Unable to open snapd applications

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)…

Jamal@ubuntu:~$ journalctl -xu snapd.service

is giving a 507 lines output!

Oct 29 17:06:05 ubuntu systemd[1]: Starting Snap Daemon...
░░ Subject: A start job for unit snapd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit snapd.service has begun execution.
░░ 
░░ The job identifier is 158.
Oct 29 17:06:08 ubuntu snapd[1073]: AppArmor status: apparmor is enabled and all features are available
Oct 29 17:06:08 ubuntu snapd[1073]: overlord.go:263: Acquiring state lock file
Oct 29 17:06:08 ubuntu snapd[1073]: overlord.go:268: Acquired state lock file
Oct 29 17:06:08 ubuntu snapd[1073]: daemon.go:247: started snapd/2.57.5+22.04 (series 16; classic) ubuntu/22.04 (amd64) linux/5.15.0-52-generic.
Oct 29 17:06:09 ubuntu snapd[1073]: daemon.go:340: adjusting startup timeout by 2m25s (pessimistic estimate of 30s plus 5s per snap)
Oct 29 17:06:13 ubuntu systemd[1]: Started Snap Daemon.
░░ Subject: A start job for unit snapd.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit snapd.service has finished successfully.
░░ 
░░ The job identifier is 158.
Oct 29 17:07:07 ubuntu snapd[1073]: storehelpers.go:748: cannot refresh: snap has no updates available: "asciiquarium", "bare", "code", "color-picker", "core", "core18", "core20", "core22", "curl", "discord", "firefox", "gimp", "gnome-3->
Oct 29 17:11:07 ubuntu snapd[1073]: main.go:155: Exiting on terminated signal.
Oct 29 17:11:07 ubuntu snapd[1073]: overlord.go:504: Released state lock file
Oct 29 17:11:06 ubuntu systemd[1]: Stopping Snap Daemon...
░░ Subject: A stop job for unit snapd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A stop job for unit snapd.service has begun execution.
░░ 
░░ The job identifier is 2876.
Oct 29 17:11:06 ubuntu systemd[1]: snapd.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit snapd.service has successfully entered the 'dead' state.
Oct 29 17:11:06 ubuntu systemd[1]: Stopped Snap Daemon.
░░ Subject: A stop job for unit snapd.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A stop job for unit snapd.service has finished.
░░ 
░░ The job identifier is 2876 and the job result is done.
Oct 29 17:11:06 ubuntu systemd[1]: snapd.service: Consumed 1.421s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit snapd.service completed and consumed the indicated resources.
-- Boot 1baa69d560c54a3fb0091a1bb8f4132b --
Oct 30 04:30:42 ubuntu systemd[1]: Starting Snap Daemon...
░░ Subject: A start job for unit snapd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit snapd.service has begun execution.
░░ 
░░ The job identifier is 202.
Oct 30 04:30:45 ubuntu snapd[1067]: AppArmor status: apparmor is enabled and all features are available
Oct 30 04:30:45 ubuntu snapd[1067]: overlord.go:263: Acquiring state lock file
Oct 30 04:30:45 ubuntu snapd[1067]: overlord.go:268: Acquired state lock file
Oct 30 04:30:45 ubuntu snapd[1067]: daemon.go:247: started snapd/2.57.5+22.04 (series 16; classic) ubuntu/22.04 (amd64) linux/5.15.0-52-generic.
Oct 30 04:30:45 ubuntu snapd[1067]: daemon.go:340: adjusting startup timeout by 2m25s (pessimistic estimate of 30s plus 5s per snap)
Oct 30 04:30:51 ubuntu systemd[1]: Started Snap Daemon.
░░ Subject: A start job for unit snapd.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit snapd.service has finished successfully.
░░ 
░░ The job identifier is 202.
Oct 29 22:32:43 ubuntu snapd[1067]: storehelpers.go:748: cannot refresh: snap has no updates available: "asciiquarium", "bare", "code", "color-picker", "core", "core18", "core20", "core22", "curl", "discord", "firefox", "gimp", "gnome-3->
Oct 29 22:35:55 ubuntu snapd[1067]: storehelpers.go:748: cannot refresh: snap has no updates available: "asciiquarium", "bare", "code", "color-picker", "core", "core18", "core20", "core22", "curl", "discord", "firefox", "gimp", "gnome-3->
Oct 29 22:35:55 ubuntu snapd[1067]: autorefresh.go:540: auto-refresh: all snaps are up-to-date
Oct 30 00:00:20 ubuntu snapd[1067]: main.go:155: Exiting on terminated signal.
Oct 30 00:00:20 ubuntu snapd[1067]: overlord.go:504: Released state lock file
Oct 30 00:00:20 ubuntu systemd[1]: Stopping Snap Daemon...
░░ Subject: A stop job for unit snapd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A stop job for unit snapd.service has begun execution.
░░ 
░░ The job identifier is 4104.
Oct 30 00:00:20 ubuntu systemd[1]: snapd.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit snapd.service has successfully entered the 'dead' state.
Oct 30 00:00:20 ubuntu systemd[1]: Stopped Snap Daemon.
░░ Subject: A stop job for unit snapd.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A stop job for unit snapd.service has finished.
░░ 
░░ The job identifier is 4104 and the job result is done.
Oct 30 00:00:20 ubuntu systemd[1]: snapd.service: Consumed 1.891s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit snapd.service completed and consumed the indicated resources.
-- Boot 450f61abc7ec47e3b77285bd9b3e9f1a --
Nov 02 02:48:45 ubuntu systemd[1]: Starting Snap Daemon...
░░ Subject: A start job for unit snapd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit snapd.service has begun execution.
░░ 
░░ The job identifier is 125.
Nov 02 02:48:48 ubuntu snapd[1058]: AppArmor status: apparmor is enabled and all features are available
Nov 02 02:48:49 ubuntu snapd[1058]: overlord.go:263: Acquiring state lock file
Nov 02 02:48:49 ubuntu snapd[1058]: overlord.go:268: Acquired state lock file
Nov 02 02:48:50 ubuntu snapd[1058]: daemon.go:247: started snapd/2.57.5+22.04 (series 16; classic) ubuntu/22.04 (amd64) linux/5.15.0-52-generic.
Nov 02 02:48:50 ubuntu snapd[1058]: daemon.go:340: adjusting startup timeout by 2m25s (pessimistic estimate of 30s plus 5s per snap)
Nov 02 02:48:52 ubuntu systemd[1]: Started Snap Daemon.
░░ Subject: A start job for unit snapd.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit snapd.service has finished successfully.
░░ 
░░ The job identifier is 125.
Nov 02 02:50:50 ubuntu snapd[1058]: storehelpers.go:748: cannot refresh: snap has no updates available: "asciiquarium", "bare", "code", "color-picker", "core", "core18", "core20", "core22", "curl", "discord", "gimp", "gnome-3-28-1804", ">
Nov 02 02:50:53 ubuntu snapd[1058]: storehelpers.go:748: cannot refresh: snap has no updates available: "asciiquarium", "bare", "code", "color-picker", "core", "core18", "core20", "core22", "curl", "discord", "gimp", "gnome-3-28-1804", ">
Nov 02 02:53:55 ubuntu snapd[1058]: storehelpers.go:748: cannot refresh: snap has no updates available: "asciiquarium", "bare", "code", "color-picker", "core", "core18", "core20", "core22", "curl", "discord", "gimp", "gnome-3-28-1804", ">
Nov 02 02:54:41 ubuntu snapd[1058]: storehelpers.go:748: cannot refresh snap "firefox": snap has no updates available
-- Boot 9bab5cb49b4340009aca7f03cd69e419 --
Nov 02 02:58:27 ubuntu systemd[1]: Starting Snap Daemon...
░░ Subject: A start job for unit snapd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit snapd.service has begun execution.
░░ 
░░ The job identifier is 161.
Nov 02 02:58:30 ubuntu snapd[1047]: AppArmor status: apparmor is enabled and all features are available
Nov 02 02:58:30 ubuntu snapd[1047]: overlord.go:263: Acquiring state lock file
Nov 02 02:58:30 ubuntu snapd[1047]: overlord.go:268: Acquired state lock file
Nov 02 02:58:31 ubuntu snapd[1047]: daemon.go:247: started snapd/2.57.5+22.04 (series 16; classic) ubuntu/22.04 (amd64) linux/5.15.0-52-generic.
Nov 02 02:58:32 ubuntu snapd[1047]: daemon.go:340: adjusting startup timeout by 2m25s (pessimistic estimate of 30s plus 5s per snap)
Nov 02 02:58:36 ubuntu systemd[1]: Started Snap Daemon.
░░ Subject: A start job for unit snapd.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit snapd.service has finished successfully.
░░ 
░░ The job identifier is 161.
-- Boot 450f61abc7ec47e3b77285bd9b3e9f1a --
Nov 02 03:17:00 ubuntu snapd[1058]: main.go:155: Exiting on terminated signal.
Nov 02 03:17:00 ubuntu systemd[1]: Stopping Snap Daemon...
░░ Subject: A stop job for unit snapd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A stop job for unit snapd.service has begun execution.
░░ 
░░ The job identifier is 3451.
Nov 02 03:17:00 ubuntu snapd[1058]: overlord.go:504: Released state lock file
Nov 02 03:17:00 ubuntu systemd[1]: snapd.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit snapd.service has successfully entered the 'dead' state.
Nov 02 03:17:00 ubuntu systemd[1]: Stopped Snap Daemon.
░░ Subject: A stop job for unit snapd.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A stop job for unit snapd.service has finished.
░░ 
░░ The job identifier is 3451 and the job result is done.
Nov 02 03:17:00 ubuntu systemd[1]: snapd.service: Consumed 11.289s CPU time.

these are some of the last ones

that would only show issues around the snapd service … by the looks of it snapd’s mis-behavior is just fallout of some system wide problem though, which is why i suggested looking at the full log (i.e. without ... -xu snapd.service) and yes, that will be a lot of lines and a lot of reading to find the errors…

Jamal@ubuntu:~$ journalctl -e
Journal file /var/log/journal/312addfa550945198cc1082f3c8feaaa/system@b62a2e8040ec4d19896e6342c68a4002-0000000000041ceb-0005f68c921df0e0.journal is truncated, ignoring file.
May 24 18:33:27 ubuntu anacron[1031]: Job `cron.weekly' started
May 24 18:33:27 ubuntu anacron[4974]: Updated timestamp for job `cron.weekly' to 2023-05-24
May 24 18:33:27 ubuntu anacron[1031]: Job `cron.weekly' terminated
May 24 18:33:27 ubuntu anacron[1031]: Normal exit (2 jobs run)
May 24 18:33:27 ubuntu systemd[1]: anacron.service: Deactivated successfully.
May 24 18:33:27 ubuntu systemd[1]: Started Run anacron jobs.
May 24 18:33:27 ubuntu anacron[4976]: Anacron 2.3 started on 2023-05-24
May 24 18:33:27 ubuntu anacron[4976]: Normal exit (0 jobs run)
May 24 18:33:27 ubuntu systemd[1]: anacron.service: Deactivated successfully.
May 24 18:33:57 ubuntu systemd[1]: Starting Ubuntu Advantage Timer for running repeated jobs...
May 24 18:33:58 ubuntu systemd[1]: ua-timer.service: Deactivated successfully.
May 24 18:33:58 ubuntu systemd[1]: Finished Ubuntu Advantage Timer for running repeated jobs.
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/24 of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/32 of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/16@2x of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/22@2x of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/24@2x of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/32@2x of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/symbolic of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/24 of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/32 of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/16@2x of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/22@2x of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/24@2x of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/32@2x of theme Dracula has no size field
May 24 18:34:13 ubuntu gnome-shell[2050]: Theme directory actions/symbolic of theme Dracula has no size field
May 24 18:36:14 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Activating via systemd: service name='org.freedesktop.Tracker3.Miner.Extract' unit='tracker-extract-3.service' requested by ':1.6' (uid=1000 pid=1931 comm="/usr/libexe>
May 24 18:36:14 ubuntu systemd[1869]: Starting Tracker metadata extractor...
May 24 18:36:14 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Successfully activated service 'org.freedesktop.Tracker3.Miner.Extract'
May 24 18:36:14 ubuntu systemd[1869]: Started Tracker metadata extractor.
May 24 18:36:59 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Activating service name='org.gnome.ControlCenter.SearchProvider' requested by ':1.35' (uid=1000 pid=2050 comm="/usr/bin/gnome-shell " label="unconfined")
May 24 18:36:59 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Activating service name='org.gnome.Nautilus' requested by ':1.35' (uid=1000 pid=2050 comm="/usr/bin/gnome-shell " label="unconfined")
May 24 18:36:59 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Activating service name='org.gnome.Calculator.SearchProvider' requested by ':1.35' (uid=1000 pid=2050 comm="/usr/bin/gnome-shell " label="unconfined")
May 24 18:36:59 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Activating service name='org.gnome.Characters.BackgroundService' requested by ':1.35' (uid=1000 pid=2050 comm="/usr/bin/gnome-shell " label="unconfined")
May 24 18:36:59 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Successfully activated service 'org.gnome.ControlCenter.SearchProvider'
May 24 18:36:59 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Successfully activated service 'org.gnome.Nautilus'
May 24 18:36:59 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Successfully activated service 'org.gnome.Characters.BackgroundService'
May 24 18:36:59 ubuntu dbus-daemon[1888]: [session uid=1000 pid=1888] Successfully activated service 'org.gnome.Calculator.SearchProvider'
May 24 18:36:59 ubuntu nautilus[5617]: Connecting to org.freedesktop.Tracker3.Miner.Files
May 24 18:37:00 ubuntu gnome-shell[2050]: Timelines with detached actors are not supported. <unnamed>[<Gjs_ui_search_ListSearchResult>:0x559e1421d550] in animation of duration 100ms but not on stage.
May 24 18:37:01 ubuntu systemd[1869]: Started Application launched by gnome-shell.
May 24 18:37:02 ubuntu gnome-calculato[5695]: Theme directory actions/24 of theme Dracula has no size field
May 24 18:37:02 ubuntu gnome-calculato[5695]: Theme directory actions/32 of theme Dracula has no size field
May 24 18:37:02 ubuntu gnome-calculato[5695]: Theme directory actions/16@2x of theme Dracula has no size field
May 24 18:37:02 ubuntu gnome-calculato[5695]: Theme directory actions/22@2x of theme Dracula has no size field
May 24 18:37:02 ubuntu gnome-calculato[5695]: Theme directory actions/24@2x of theme Dracula has no size field
May 24 18:37:02 ubuntu gnome-calculato[5695]: Theme directory actions/32@2x of theme Dracula has no size field
May 24 18:37:02 ubuntu gnome-calculato[5695]: Theme directory actions/symbolic of theme Dracula has no size field
May 24 18:37:05 ubuntu systemd[1869]: Started Application launched by gnome-shell.
May 24 18:37:07 ubuntu systemd[1869]: Started Application launched by gnome-shell.
May 24 18:37:10 ubuntu systemd[1869]: Started Application launched by gnome-shell.
May 24 18:37:13 ubuntu systemd[1869]: Started Application launched by gnome-shell.
May 24 18:37:14 ubuntu systemd[1869]: Started Application launched by gnome-shell.
May 24 18:37:15 ubuntu systemd[1869]: Started Application launched by gnome-shell.
May 24 18:37:15 ubuntu vlc.desktop[5882]: [000055c6b52ec580] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
May 24 18:37:15 ubuntu vlc.desktop[5882]: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
May 24 18:37:15 ubuntu systemd[1869]: Started Application launched by gnome-shell.
May 24 18:37:16 ubuntu systemd[1869]: Started Application launched by gnome-shell.

These were the last page logs. Should I provide all the logs? Because its too long.

try using a pastebin … or try something like:

journalctl | nc termbin.com 9999

(that should return a url with the pasted content, not sure if they have a size limit though, teh journal might be to big)

https://termbin.com/5krg

Jamal@ubuntu:~$ journalctl | nc termbin.com 9999
Journal file /var/log/journal/312addfa550945198cc1082f3c8feaaa/system@b62a2e8040ec4d19896e6342c68a4002-0000000000041ceb-0005f68c921df0e0.journal is truncated, ignoring file.

yeah, it only posted log output from october last year … that last error about the truncated log above points even more to a disk or filesystem error :frowning:

try limiting it to the current boot with -b0 … like:

journalctl -b0 | nc termbin.com 9999 

https://termbin.com/xp3t

there are a lot of:

ubuntu tracker-miner-f[1931]: SQLite error: database disk image is malformed (errno: Bad file descriptor)

and other filesystem related errors … and also errors about missing “.dpkg-new” files …

when you upgraded this machine from 20.04, did that upgrade run through smoothly or were there failures ?

That upgrade was smooth. I upgraded at least 4 months ago. But I am facing this issue since this week

are you using any fancy filesystem (btrfs, zfs) or is that just a standard ext4 ? …

Its ext4

Jamal@ubuntu:~$ df -Th | grep "^/dev"
/dev/sda3      ext4   141G   55G   79G  41% /
/dev/nvme0n1p2 vfat   100M   32M   69M  32% /boot/efi

That NVME is my windows boot drive. It has nothing to do with Ubuntu. But I don;t know why it is still being shown

it is shown because it holds your UEFI bootloader, even for ubuntu :slight_smile:

anyway, i’m rather out of ideas here, there are several corrupt files on your disk (is there anything in /lost+found ? that would indicate a filesystem check moved things around) , one of them is the snapd state file (/var/lib/snapd/state.json) that causes the issues with your snapd … i’m not sure what happens if you move it out of the way (snapd will most likely forget all info about installed snaps) but you could try to simply sudo mv /var/lib/snapd/state.json ~/, that will move it to your home dir (so you can move it back if needed) and then try to restart snapd again or reboot or so …

I remember now. Last week when i ran “sudo apt-get upgrade” after “update”, an option came mid update saying that ubuntu was unable to find some drive and then there was a option to choose a drive with my nvme shown selected temporarily, i pressed enter hovering the drop down menu, but the upgrade started again after hitting enter

I have moved the state file as you said and rebooted. Now snap version is working

Jamal@ubuntu:~$ snap version
snap    2.58.2
snapd   2.58.2
series  16
ubuntu  22.04
kernel  5.19.0-35-generic

But snap warning is showing something

Jamal@ubuntu:~$ snap warnings
last-occurrence:  today at 21:38 +06
warning: |
  seeding failed with: cannot accept some assertions:
   - broken assertion storage, looking for snap-declaration: broken assertion
   storage, cannot decode assertion: parsing assertion headers: header is not
   utf8
   - broken assertion storage, looking for snap-declaration: broken assertion
   storage, cannot decode assertion: parsing assertion headers: header is not
   utf8. This indicates an error in your distribution, please see
   https://forum.snapcraft.io/t/16341 for more information.

right, more filesystem errors and corrupt files …

your filesystem is corrupt or your disk is dying …

How can I resolve this issue?