Pending update of snap-store but no update available

Ubuntu 23.04: In the notification area i see ‘Pending update of snap-store’ but snap refresh --list says all snaps up to date.

Hi, thank you for reaching out. Next time this happens, can you provide us with the snapd logs journalctl -u snapd, the output of snap changes and snap list please? This might help us understand what’s going on.

corrado@corrado-n5-ll-0224:~$ sudo snap refresh
All snaps up to date.
corrado@corrado-n5-ll-0224:~$ snap changes
ID   Status  Spawn                Ready                Summary
23   Done    today at 07:48 CEST  today at 07:48 CEST  Refresh all snaps: no updates

corrado@corrado-n5-ll-0224:~$ snap list
Name                       Version           Rev    Tracking         Publisher   Notes
bare                       1.0               5      latest/stable    canonical✓  base
core20                     20230308          1852   latest/stable    canonical✓  base
core22                     20230316          583    latest/stable    canonical✓  base
firefox                    111.0.1-2         2487   latest/stable    mozilla✓    -
gnome-3-38-2004            0+git.6f39565     119    latest/stable/…  canonical✓  -
gnome-42-2204              0+git.09673a5     65     latest/stable    canonical✓  -
gtk-common-themes          0.1-81-g442e511   1535   latest/stable/…  canonical✓  -
snap-store                 41.3-76-g2e8f3b0  935    latest/stable/…  canonical✓  -
snapd                      2.58.3            18596  latest/stable    canonical✓  snapd
snapd-desktop-integration  0.1               71     latest/stable/…  canonical✓  -
corrado@corrado-n5-ll-0224:~$ 
Mar 30 07:32:15 corrado-n5-ll-0224 systemd[1]: Starting snapd.service - Snap Daemon...
Mar 30 07:32:15 corrado-n5-ll-0224 snapd[886]: overlord.go:268: Acquiring state lock file
Mar 30 07:32:15 corrado-n5-ll-0224 snapd[886]: overlord.go:273: Acquired state lock file
Mar 30 07:32:15 corrado-n5-ll-0224 snapd[886]: daemon.go:247: started snapd/2.58.3+23.04ubuntu1 (series 16; classic) ubuntu/23.04 (amd64) linux/6.2.0-18-generic.
Mar 30 07:32:15 corrado-n5-ll-0224 snapd[886]: daemon.go:340: adjusting startup timeout by 1m20s (pessimistic estimate of 30s plus 5s per snap)
Mar 30 07:32:16 corrado-n5-ll-0224 snapd[886]: backends.go:58: AppArmor status: apparmor is enabled and all features are available
Mar 30 07:32:16 corrado-n5-ll-0224 systemd[1]: Started snapd.service - Snap Daemon.
Mar 30 07:32:45 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:32:47 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:32:49 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:32:49 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:32:54 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:32:54 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:37:17 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:37:17 corrado-n5-ll-0224 snapd[886]: snapstate.go:1778: cannot refresh snap "snap-store": snap "snap-store" has running apps (snap-store), pids: 2306
Mar 30 07:37:17 corrado-n5-ll-0224 snapd[886]: autorefresh.go:551: auto-refresh: all snaps are up-to-date
Mar 30 07:37:18 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:37:21 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:48:36 corrado-n5-ll-0224 snapd[886]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "core22", "firefox", "gnome-3-38-2004", "gnome-42-2204", "gtk-common-themes", "snapd", "snapd-desktop-integration"
Mar 30 07:48:36 corrado-n5-ll-0224 snapd[886]: snapstate.go:1778: cannot refresh snap "snap-store": snap "snap-store" has running apps (snap-store), pids: 2306

but after stopping snap-store the update was ok. corrado@corrado-n5-ll-0224:~$ sudo killall snap-store [sudo] password for corrado: sudo snap refresh snap-store (stable/ubuntu-23.04) 41.3-71-g709398e from Canonical✓ refreshed corrado@corrado-n5-ll-0224:~$

so the problem is that the command ‘sudo snap refresh’ does not say ‘cannot refresh, snap store is running’

Edit: after snap-store refresh and reboot in the notification area i still see ‘Pending update of snap-store’

The snap refresh command is meant to refresh any available snap but it doesn’t fail if one of the snaps can’t be refreshed. If you tried to refresh that snap specifically with snap refresh snap-store, then the error would be surfaced. Next time you see the notification, you can either kill the snap-store like you did to trigger the automatic refresh, or you can just run snap refresh --ignore-running snap-store which will tell snapd to ignore the running snap.