Bug 473758 - Discover app and notifier can disagree on whether there are updates available
Summary: Discover app and notifier can disagree on whether there are updates available
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.27.7
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-25 19:52 UTC by Riccardo Robecchi
Modified: 2024-08-13 18:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0
Sentry Crash Report:


Attachments
Screenshot (66.32 KB, image/png)
2023-08-25 19:52 UTC, Riccardo Robecchi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2023-08-25 19:52:37 UTC
Created attachment 161182 [details]
Screenshot

SUMMARY
Discover's system tray icon shows that there are available updates, but upon opening Discover there are actually none.

STEPS TO REPRODUCE
1. ?

OBSERVED RESULT
Discover shows the "updates available" system tray icon even though there are no updates.

EXPECTED RESULT
Discover doesn't show the icon if there are no updates.

SOFTWARE/OS VERSIONS
Linux: KDE neon
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Comment 1 Patrick Silva 2023-08-28 19:29:50 UTC
I noticed the same on neon unstable a few hours ago. I ran apt in Konsole and updates were found though.
Comment 2 Nate Graham 2023-08-28 20:46:46 UTC
Did you previously update the system using your command-line package manager?
Comment 3 Riccardo Robecchi 2023-08-28 21:35:44 UTC
(In reply to Nate Graham from comment #2)
> Did you previously update the system using your command-line package manager?

I updated some packages because they couldn't be updated by Discover: they simply didn't show up as available and I had to update them manually by specifying the version. Maybe there are other packages like that? But they don't come up in any package manager, so I wouldn't know how to track them down.
Comment 4 Nate Graham 2023-08-29 15:36:19 UTC
I had a feeling. This is because when you update using the command line, whatever tool you use doesn't notify the PackageKit library used by Discover that everything's done now, so Discover will only notice it on its own schedule.

However the fact that the Notifier and the app don't agree is a bug we can fix. At the minimum, when you open the Discover app and it checks for updates and find that there are none, it can update the System Tray item to make it go away.
Comment 5 Riccardo Robecchi 2023-08-29 15:46:58 UTC
Yes, because the thing is, the systray notification remains even after updating Discover manually. That is in fact what happened when I took the screenshot: I had just updated Discover manually and the systray notification simply stayed there. It therefore looks like there is some miscommunication between the two.
Comment 6 Nate Graham 2023-08-29 15:50:22 UTC
Indeed, they aren't talking to each other properly.
Comment 7 Bug Janitor Service 2024-07-26 11:29:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/885
Comment 8 Harald Sitter 2024-08-13 10:03:09 UTC
Git commit 23713ce5a44fd647c04a632dc91e3c23168b982b by Harald Sitter.
Committed on 13/08/2024 at 09:57.
Pushed by sitter into branch 'master'.

updates: tie together refreshing between app and notifier

this implements a two-way notification system.

- discover tells the notifier to refresh its state whenever it itself
has refreshed the state
- the notifier does the same but only if the user actually clicked
refresh

this is implemented using dbus broadcasts so we don't have to do
excessive service watching. each component will simply fire a broadcast
and the respective other end will act on it, if it is running.

M  +1    -0    discover/CMakeLists.txt
M  +3    -0    discover/DiscoverObject.cpp
A  +43   -0    discover/RefreshNotifier.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +25   -0    discover/RefreshNotifier.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +22   -0    libdiscover/UpdateModel/RefreshNotifierDBus.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
M  +15   -0    notifier/DiscoverNotifier.cpp
M  +1    -0    notifier/DiscoverNotifier.h
M  +1    -1    notifier/NotifierItem.cpp

https://invent.kde.org/plasma/discover/-/commit/23713ce5a44fd647c04a632dc91e3c23168b982b