[WIP] Refresh App Awareness

But then all we’ve achieved is to delay all snap updates by 14 days? 🤷

1 Like

Well, that’s the worst case scenario, it’s not representative of the average.

I deployed an app update to one of my snaps last week that ensures a minimum version of snapd that makes RAA mandatory, here’s the rollout stats.

That’s 90% of people who weren’t delayed two weeks, they were delayed enough to ensure the app wasn’t running whilst updated, which is hugely better than what would happen before (app instability).

There’ll almost certainly be some users who do end up hitting the fallback of refreshing while the app runs anyway, but it’s still a better position for most people than before.

And I totally agree that there could be improvements in the UX (e.g, triggering the refresh when the app is closed, scheduling updates during shutdown, improving the notification to have “Update Now”, etc), but from the publisher side of things, I personally think this is a much better position for the snap ecosystem to be in than without it, and hopefully more improvements will come later.

Sorry, I generalized excessively there. I was thinking of Firefox, where most people (I think?) leave it running all the time.

Looking at the stats is a good idea. The stats for the FIrefox snap would show us if it really has the negative effect I’m concerned about.

If I understood correctly, previously snaps would simply refresh, and if they were ‘busy’, would remain open with the old version until you closed the app. This was a pretty simple workflow, which even basic users could understand (or weren’t even aware of).

The previous behavior could lead to data loss, in some scenarios (I believe Chrome was a fairly common victim of it, but there are others). When a snap is updated while still running, snapd could create a folder under user’s home for the new version - under ~/snap/awesome_snap/77 , for instance, with current version being 76. Users could, then, keep using old version and making changes, only to find out that some data has “vanished”, because next time they open the app, the new folder will be used (and changes were in the old one). I think this was one of the motivations for implementing this feature (a big one, if I may guess).

1 Like

In theory. I still don’t really know how it’s supposed to work. I’ve been observing it all week and waited for the countdown timer on my Thunderbird refresh to expire. It triggered the refresh despite the app being open, but then the refresh continually fails.

> 51   Error   3 days ago, at 14:32 BST  3 days ago, at 14:33 BST  Auto-refresh snap "thunderbird"
> 52   Error   2 days ago, at 15:29 BST  2 days ago, at 15:29 BST  Auto-refresh snap "thunderbird"
> 53   Error   today at 10:15 BST        today at 10:15 BST        Auto-refresh snap "thunderbird"

So I’m not sure if the error is expected because Thunderbird is still active, or if it’s just broken. Either way, my Thunderbird hasn’t updated yet with the new behaviour.

Is there any way we can have snaps on Ubuntu CORE update during the shutdown process of the PC? So it does not interrupt the business while the snap is in use or during bootup?

Or is this better to manually connect the plug

plugs:
    snapd:
        interface: snapd-control
        refresh-schedule: managed

and then fully control the snap updates via our application remotely?

1 Like

The notifications are confusing. The suggested action of “Close the app” does not update the app, and the notifications persist after re-opening.

+1 to

Do not bother me with notifications when the suggested action does not resolve the reason for notifying.

As currently implemented, this feature would be better if the notifications were not shown at all.

5 Likes

If the issue is primarily due to differences between the ‘current’ and ‘previous’ versions, maybe the data could simply be rsynced from ‘previous’ to ‘current’ when the new version is first run.

Then we would just need some logical check to see if it’s the first time the ‘current’ version is being run, and trigger the rsync.

Then there would be no need to delay snap updates.

Another use case is when something is running as a daemon in background. I am facing this weird issue with deja-dup, where deja-dup-monitor is running constantly, thus preventing the snap from updating (I presume). The effect: notifications about pending update every day, now I am with 6 days left. I have restarted the OS multiple times, still no update. I don’t think having to find a pid of the process and killing it manually is the solution for end user. Notifications for 14 days every day are also not a pleasant experience. So, I would very much welcome some improvements in the area, maybe force updates on shutdown, or add a button to this notification dialog which will close every running process (owned by particular snap) and force update.

1 Like

Refresh app awareness has been (temporarily!) disabled by default again as of the snapd 2.56.3 release (which should be rolling out in the next few weeks), this revert the behaviour to the previous experience where the “pending snap update” notifications didn’t exist, until improvements in the UX and some specific issues with certain snaps (e.g, LXD) are resolved.

3 Likes

Hello world, me again.

Refresh app awareness is back by default in 2.57; the known bugs effecting reliability of refreshes for certain applications have been fixed. The UX with the “snap update pending” notifications is the same as before and hasn’t been refined since 2.55, but of course, this doesn’t preclude future improvements!

Looking at the current state of the snapd snap, 2.56.3 from the previous post didn’t make it into the stable channel and so for the majority of people, refresh app awareness likely never actually got disabled, even temporarily.

1 Like

This completely fails the “mom test” - my mother has no clue what this notification means and what to do about and it shows up all the time.

I think it’s back the to the drawing boards and work out another approach, this is not the way and it honestly completely breaks the whole Ubuntu user experience - this is serious.

I think that showing a notification “There are updates pending - click here to update” would be more sane, and when clicking the notification a window would show that lists all the applications that has an update available and a close/kill/update button + a way to “mass close/kill/update” all applications on the list.

There should absolutely be no terminal commands involved … this is not mom friendly.

Do Canonical employees really go to the terminal every time this notification shows up, to update installed Snaps?!

1 Like

there is no need for the command line at all …

i trained my 86 year old mom to open the snap-store once the notification shows up and go to the updates tab and simply refresh the app …

this might work, except for apps that have background processes, with best example being snap-store itself. I cannot update it from GUI 1

yup, there is a snapd fix in the works to allow such apps to opt-out …

1 Like

The above comment says otherwise… “sometimes it works”.

And this is what shows up when you Google this problem, nobody knows that they should open the Snapstore:

Here: https://askubuntu.com/questions/1412575/pending-update-of-snap-store

I stand my ground - the whole update process is badly designed and the notification is not helpful and intuitive, especially because it offers no solution to the user at all.

Please please please, don’t argue with the users this time, just accept critique and fix it… - read on the internet, everybody hates it and it ruins the otherwise great Ubuntu user experience.

From my work machine today:

Screenshot from 2022-09-13 10-33-21

nobody said it is great and there is a lot of room for improvement.

but not having the notification at all means you’d silently update while the app is running which in case of browsers makes you lose your history from the point of the silent update …

it is well known that the UX is bad and there is work going on to improve it, nothing to argue about here …

You sure do see the glass as half full and not half empty - I like it :stuck_out_tongue:

Thanks for keeping calm with me, sorry if I sound passive aggressive, but it’s a bit of a frustrating problem, that things was shipped like this, and I think this “update problem” specifically needs urgent attention and improvements, because it’s causing a great amount of irritation and annoyance and also a central part of the system.

The questions about this on askubuntu has thousands of views.

It’s not the notification it self and it’s not the fact that applications has to be closed, that is fine with me and sounds “sane”.

The problem is that the notification does not offer a solution and the GUI way of updating snaps does not work in all cases and the error messages are hard to understand.

My suggestion would be something along the lines of:

  1. Show the notification that indicates that there are pending updates, and make the notification clickable, and make it open the software center and displaying the Updates tab.
  2. If one of more applications has to be closed, before proceeding with the update, then show a dialog which allows the user to “close” or “force quit” the applications or abort, and I think some inspiration for that could be found in Windows, because to me the “problem” sounds very similar to the screen from Windows that allows you to forcefully quit applications that prevents Windows from shutting down:

https://media.askvg.com/articles/images6/This_App_Preventing_Shutdown_Screen_Windows.png

(I have never heard anybody complain about this screen in Windows, so what works for a billion Windows users, probably works for Ubuntu users too)

Good to hear that there is work going on to improve it, I cross my fingers that the improvements will be released soon.

Just out of curiosity is there a place I can follow the work or is this the place?

This completely fails the “mom test” - my mother has no clue what this notification means and what to do about and it shows up all the time.

I agree. Everyone who sees these notifications has to google to find out what the heck they mean. Then, once there’s an update to a running snap available, the notifications start appearing about once an hour, with no apparent way to turn them off. This is a suboptimal user experience.

When there are udpates to regular packages, Ubuntu’s Software Updater pops up a dialog either once a day or once a week, user-configurable. The dialog has a button to start the update process.

Some ideas that immediately come to mind that would improve the user experience of the “Pending update of X snap” notifications:

  • The notification should explain better what it’s all about.

  • The notification should instead be a dialog that has buttons for taking action, like the Software Updater dialog does.

  • One of the actions should be to pause the notifications for a set time, like a number of hours or days.

  • Another action should be starting the update process for those snaps that need updating, without requiring the user to go to the command line.

As an aside, as far as I understand, the action that currently has to be taken to update snaps is commanding “sudo snap refresh” on the command line. When I give that command while there’s a snap to be updated, but it’s running, it yields this misleading output: “All snaps up to date.” Only after I kill the snap that has an update and give that command again does it start updating the snap. Very puzzling to the naive user who thinks that the output “All snaps up to date” means that all snaps are, indeed, up-to-date.

Also, I just now noticed that there’s an application called “Snap Store” that allows one to update snaps using the GUI. However, when I tried to update the snap that has an update pending, I got an error similar to the one user kimse posted above, in message #96. This is not great either — why isn’t there an option for the user to shut down the running snap so that the Snap Store can update it?

In other words, I agree with user kimse’s suggestions in message #99.

1 Like