UX is confusing when snap is auto-refreshing

Bug #2073925 reported by Michelle Hughes
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

 I saw that the discord icon was no longer in my start menu (XFCE), so I went to the console and had this exchange:

$ sudo snap refresh discord
error: cannot refresh "discord": refreshing disabled snap "discord" not supported
$ sudo snap install discord
snap "discord" is already installed, see 'snap help refresh'
$ sudo snap remove discord
error: snap "discord" has "auto-refresh" change in progress
$ sudo snap refresh discord
error: cannot refresh "discord": refreshing disabled snap "discord" not supported
$ sudo snap enable discord
error: snap "discord" has "auto-refresh" change in progress
$ sudo snap install discord
snap "discord" is already installed, see 'snap help refresh'

Apparently, what it was trying to tell me was that it was already doing the update, but I thought it was in an inconsistent state because its response to "refresh", "install", and "enable" all seemed to indicate different things. Soon after this, I got an inotify that discord had just updated, so I guess the state wasn't inconsistent: It was doing an auto refresh. It just wasn't very good at communicating that to me. I had to put it back onto the start menu myself, though.

Revision history for this message
Alex Lowe (lengau) wrote (last edit ):

This UX bug has bothered me for a while, especially as someone who follows the `edge` channel of many snaps (partially because I maintain several snaps, and partially for the purpose of catching bugs before the general public).

If a `refresh` or `auto-refresh` change is already in progress for a snap, I would expect `snap refresh` to find the ongoing refresh change and simply `watch` it.

Revision history for this message
Alex Lowe (lengau) wrote (last edit ):

The menu issue probably has to do with the amount of time the Discord app took to update - likely to do with the size of `~/snap/discord/<previous_revision>` being copied over. While that copy is happening, `/var/lib/snapd/desktop/applications/discord_discord.desktop` doesn't exist, and that is probably the moment at which xfce chose to refresh the app icons in there. When it reloads again, you may get duplicate discord menu entries (one from there, the other from ~/.local/share/applications).

I wonder if snapd could defer the removal of the .desktop file so that if the refresh isn't eliminating the file it doesn't get removed from disk? I've seen similar issues with refreshes causing blips in menu entries in KDE Plasma.

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.