[Bug 2103445] Re: Clicking 'Show updates' on the app indicator does not work
Alessandro Astone
2103445 at bugs.launchpad.net
Thu May 8 08:39:29 UTC 2025
> > The patch only modifies what happens when invoking an action from the tray icons in update-notifier. The "cache out-of-date" tray icon seems to be the only user of this function.
>
> Looking at the code, it is not obvious to me that this is true.
>
> The code affected by the patch here is in the invoke() function. That function is called from several callbacks within update.c: cb_action(), cb_preferences(), gtk_status_icon_click_activate_cb().
Yes, all callbacks originating from a tray icon.
There used to be a tray icon highlighting the availability of updates, but that was replaced long ago by always spawning update-manager in the user's face instead and it is now dead code:
* https://git.launchpad.net/update-notifier/tree/src/update.c?c=588fa66990504f293079d6ccd8913e34335fc03c#n690
* https://git.launchpad.net/update-notifier/tree/src/update.c?c=588fa66990504f293079d6ccd8913e34335fc03c#n177
Today the remaining tray icons are error-related icons.
And you're right that there are more errors other than "cache out of date" so I've changed the wording.
> The cb_action() callback appears to be used more on systems where
synaptic is installed, because update_trayicon_create_menu() will add
more menu items depending on the existence of
/usr/share/applications/synaptic.desktop as per the 'actions' table.
Well we don't need to test every single entry, it's always the same
code-path just with different desktop files.
> Finally, it seems worthwhile to perform the proposed test plan on X11,
too, since presumably the modified code path is important on those
systems. While unlikely, there is regression potential if the `if
(GDK_IS_X11_DISPLAY (gdk_display_get_default ())` condition does not
work as expected.
I agree. Done.
** Description changed:
[ Impact ]
- When the apt repository cache is too out-of-date, update-notifier shows
- a tray icon with message:
+ When the apt repository cache is too long out-of-date, update-notifier
+ shows a tray icon with message:
"The update information is outdated. This may be caused by network
problems or by a repository that is no longer available. Please update
manually by selecting 'Show updates' from the indicator menu, and
watching for any failing repositories."
If you follow the instructions and click 'Show updates', nothing will
happen and update-notifier crashes instead.
This only happens in a Wayland desktop session.
The following errors.ubuntu.com identifiers match this bug report:
https://errors.ubuntu.com/problem/8ca8669144fda26625647db60203296c89e15b26
https://errors.ubuntu.com/problem/fcb15b0085c6db244a9750e2d8c9971c3ece02fe
[ Test Plan ]
1. Install the update-notifier upgrade from -proposed.
2. Temporarily disable the daily updates timer with:
$ sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer
3. Mark the update cache as out-of-date with:
$ sudo touch -d "10 days ago" /var/lib/apt/periodic/update-success-stamp
3. Log-out and log-in again, into a Wayland session
4. Wait for at least 2 hours
5. Verify that a red icon appeared in the top-right system tray
6. Click the red icon
7. Click "Show updates"
8. Verify that the software updater window appeared
9. Verify that no crash report popup appeared
10. Re-enable the daily updates timer with:
$ sudo systemctl enable apt-daily.timer apt-daily-upgrade.timer
+ [ Regression Test Plan ]
+
+ Run through the same steps as the Test Plan above, but loggin-in to an
+ Xorg session instead
+
[ Where problems could occur ]
The patch only modifies what happens when invoking an action from the
- tray icons in update-notifier. The "cache out-of-date" tray icon seems
- to be the only user of this function. No regressions are expected:
- previously the process would crash and there isn't any worse than that.
+ tray icons in update-notifier that inform the user of some kind of
+ error. The "cache out-of-date" tray icon is one of those that can be
+ forced to appear with simple steps, as in the test plan.
- One sensitive point could be that, depending on the policy of the Wayland compositor, the software updater window might not get raised to the front after launching it from the "Show updates" menu item. This is not an issue for GNOME (Ubuntu Desktop), and all compositors will generally highlight in some way that there is a new window open even if it wasn't raised. I still expect all compositors to correctly raise the new window though.
+ On Wayland, no regressions are expected: previously the process would crash and there isn't any worse than that.
+ On Xorg, the Regression Test Plan will verify that the behaviour remains unchanged.
+
+ For Wayland one sensitive point could be that, depending on the policy of the Wayland compositor, the software updater window might not get raised to the front after launching it from the "Show updates" menu item. This is not currently an issue for GNOME (Ubuntu Desktop), and all compositors will generally highlight in some way that there is a new window open even if it wasn't raised. I still expect all compositors to raise the new window though.
Also, as mentioned, anything is better than a crash.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/2103445
Title:
Clicking 'Show updates' on the app indicator does not work
Status in update-notifier package in Ubuntu:
Fix Released
Status in update-notifier source package in Noble:
Fix Committed
Status in update-notifier source package in Oracular:
Fix Committed
Bug description:
[ Impact ]
When the apt repository cache is too long out-of-date, update-notifier
shows a tray icon with message:
"The update information is outdated. This may be caused by network
problems or by a repository that is no longer available. Please update
manually by selecting 'Show updates' from the indicator menu, and
watching for any failing repositories."
If you follow the instructions and click 'Show updates', nothing will
happen and update-notifier crashes instead.
This only happens in a Wayland desktop session.
The following errors.ubuntu.com identifiers match this bug report:
https://errors.ubuntu.com/problem/8ca8669144fda26625647db60203296c89e15b26
https://errors.ubuntu.com/problem/fcb15b0085c6db244a9750e2d8c9971c3ece02fe
[ Test Plan ]
1. Install the update-notifier upgrade from -proposed.
2. Temporarily disable the daily updates timer with:
$ sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer
3. Mark the update cache as out-of-date with:
$ sudo touch -d "10 days ago" /var/lib/apt/periodic/update-success-stamp
3. Log-out and log-in again, into a Wayland session
4. Wait for at least 2 hours
5. Verify that a red icon appeared in the top-right system tray
6. Click the red icon
7. Click "Show updates"
8. Verify that the software updater window appeared
9. Verify that no crash report popup appeared
10. Re-enable the daily updates timer with:
$ sudo systemctl enable apt-daily.timer apt-daily-upgrade.timer
[ Regression Test Plan ]
Run through the same steps as the Test Plan above, but loggin-in to an
Xorg session instead
[ Where problems could occur ]
The patch only modifies what happens when invoking an action from the
tray icons in update-notifier that inform the user of some kind of
error. The "cache out-of-date" tray icon is one of those that can be
forced to appear with simple steps, as in the test plan.
On Wayland, no regressions are expected: previously the process would crash and there isn't any worse than that.
On Xorg, the Regression Test Plan will verify that the behaviour remains unchanged.
For Wayland one sensitive point could be that, depending on the policy of the Wayland compositor, the software updater window might not get raised to the front after launching it from the "Show updates" menu item. This is not currently an issue for GNOME (Ubuntu Desktop), and all compositors will generally highlight in some way that there is a new window open even if it wasn't raised. I still expect all compositors to raise the new window though.
Also, as mentioned, anything is better than a crash.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/2103445/+subscriptions
More information about the foundations-bugs
mailing list