Bug 392063 - [PackageKit] Update Notifier didn't update after using Discover to perform updates
Summary: [PackageKit] Update Notifier didn't update after using Discover to perform up...
Status: RESOLVED DUPLICATE of bug 385754
Alias: None
Product: Discover
Classification: Applications
Component: Updates (interactive) (show other bugs)
Version: 5.12.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2018-03-19 15:18 UTC by Nate Graham
Modified: 2018-05-15 19:22 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Discover and Updates Plasmoid don't agree (136.86 KB, image/png)
2018-03-19 17:36 UTC, Nate Graham
Details
Screen recording of the issue (1.19 MB, video/webm)
2018-04-19 13:39 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2018-03-19 15:18:08 UTC
Plasma 5.12.3 on my Kubuntu 17.10 machine.

Yesterday the Update Notifier Plasmoid showed that I had 7 updates. I opened Discover and performed the updates without drama. However, the Update Notifier plasmoid did not notice, and continues to say that I have 7 updates.

I also received another report of this issue in https://pointieststick.wordpress.com/2018/03/17/this-week-in-usability-productivity-part-10/#comment-771
Comment 1 Nate Graham 2018-03-19 17:36:29 UTC
Created attachment 111517 [details]
Discover and Updates Plasmoid don't agree
Comment 2 Patrick Silva 2018-03-19 17:49:34 UTC
duplicate? bug 385754
Comment 3 Nate Graham 2018-03-19 18:00:25 UTC

*** This bug has been marked as a duplicate of bug 385754 ***
Comment 4 Aleix Pol 2018-03-19 18:02:42 UTC
Are you sure it's a duplicate? Because as described here it doesn't look like the mismatch is coming from flatpak.
Comment 5 Nate Graham 2018-03-19 18:04:02 UTC
If Bug 385754 is tracking something Flatpak-specific, then no, this isn't a duplicate.
Comment 6 Ashberian 2018-03-21 01:24:12 UTC
Exacly as described by Nate but on KDE Neon ( 5.12.3 ) : 

Update Notifier Plasmoid ( UNP from now on )  & Discover don't agree , even after updating everything through Discover, the UNP gets stuck with the same info permanently .

But it gets even worse:

( Once again, on KDE Neon ) Since Plasma 5.12.x ( not 100%, i'd say this behavior started after the first update on 5.12.1 ) this UNP always claim there's updates avaliable, ( it always shows the little blue dot ) whether there really are updates or not, status won't change .

Additional info: using KDE Neon on a daily basis since 5.10.X.
Comment 7 Patrick Silva 2018-03-26 15:15:32 UTC
*** Bug 392364 has been marked as a duplicate of this bug. ***
Comment 8 Sergio 2018-03-27 10:23:51 UTC
As a matter of fact, the issue seems now to involve /all/ the systray applets. The printer applet does exactly the same, remaining active and indicating 1 job in queue on a printer, when there are no jobs in queue at all.
Comment 9 Sergio 2018-03-27 10:27:27 UTC
In any case, logging out an logging back in is a way (though a bit inconvenient) of having the systray applets refreshed.
Comment 10 Øystein Steffensen-Alværvik 2018-04-02 18:16:06 UTC
Marking this as confirmed because it affects multiple users. Also affects me, exactly as described in Graham's first post, on KDE Neon 5.12.4. 
Additional info: after completely updating the system, the Updater icon seems to always nag me to install exactly one package - regardless of how many packages I recently updated.
Comment 11 Aleix Pol 2018-04-05 00:23:36 UTC
can you try running the plasmoid by hand and see if it gives you the same numbers?
execute "plasmawindowed org.kde.discovernotifier".

We'll see how to proceed from there.
Comment 12 Øystein Steffensen-Alværvik 2018-04-05 16:43:53 UTC
«plasmawindowed org.kde.discovernotifier» triggered a small window called «Updates» with the message «System is updated».
Here's the output of the command, in case it's useful:

KTranscript: Loaded property map: /usr/share/locale/nn/LC_SCRIPTS/ki18n5/skjermelement.pmapc
KTranscript: Loaded module: /usr/share/locale/nn/LC_SCRIPTS/ki18n5/ki18n5.js
"Interpolation {$[pron %1]} in {Fjern $[pron %1] $[b...} failed: Non-string return value: undefined"
"Interpolation {$[bunden %1]} in {Fjern $[pron %1] $[b...} failed: Non-string return value: undefined"
"Interpolation {$[bunden %1]} in {Set opp $[dobbelbest...} failed: Non-string return value: undefined"
org.kde.plasmaquick: Applet preload policy set to 1
"Interpolation {$[pron %1]} in {Fjern $[pron %1] $[b...} failed: Non-string return value: undefined"
"Interpolation {$[bunden %1]} in {Fjern $[pron %1] $[b...} failed: Non-string return value: undefined"
"Interpolation {$[bunden %1]} in {Set opp $[dobbelbest...} failed: Non-string return value: undefined"
"Interpolation {$[pron %1]} in {Fjern $[pron %1] $[b...} failed: Non-string return value: undefined"
"Interpolation {$[bunden %1]} in {Fjern $[pron %1] $[b...} failed: Non-string return value: undefined"
"Interpolation {$[bunden %1]} in {Set opp $[dobbelbest...} failed: Non-string return value: undefined"
org.kde.plasma: requesting config for "Oppdateringar" without a containment!
org.kde.plasmaquick: New Applet  "Oppdateringar" with a weight of 50
qml: 0
using... PackageKit::Transaction(0x463cdf0) "/3523_aaadbcbe"
org.kde.plasmaquick: Delayed preload of  "Oppdateringar" after 1.566 seconds
org.kde.plasmaquick: Applet "Oppdateringar" loaded after 0 msec
using... PackageKit::Transaction(0x41f3330) "/3525_cabbebdc"
using... PackageKit::Transaction(0x41f00c0) "/3526_ddaaadbc"
using... PackageKit::Transaction(0x2a61150) "/3527_bccbaada"
using... PackageKit::Transaction(0x4642f70) "/3528_dccbeade"
Comment 13 Øystein Steffensen-Alværvik 2018-04-05 16:46:06 UTC
(In reply to ystein from comment #12)
> «plasmawindowed org.kde.discovernotifier» triggered a small window called
> «Updates» with the message «System is updated».

AND this was while the Update tray icon (mistakenly) showed 2 available updates. Discover said system is updated.
Comment 14 Nate Graham 2018-04-19 13:39:42 UTC
Created attachment 112111 [details]
Screen recording of the issue

(In reply to Aleix Pol from comment #11)
> can you try running the plasmoid by hand and see if it gives you the same
> numbers?
> execute "plasmawindowed org.kde.discovernotifier".
> 
> We'll see how to proceed from there.

I just did this after experiencing the bug (notifier says 7 updates, Discover says 2), and here's what happened:

- The window appears, with the initial text "System is up to date
- The text quickly changes to "2 packages to update" (which is correct)
- Almost immediately thereafter, it changes again to "7 packages to update" (which is not correct)

I'm attaching a screen recording, as it's reproducible if I try it again.

This is with Plasma 5.12.4.
Comment 15 Nate Graham 2018-04-19 13:48:04 UTC
This appears to be caused by the flatpak backend. If I remove it (`sudo apt remove plasma-discover-flatpak-backend` on Ubuntu-based distros), then the update notifier plasmoid always shows the correct number.
Comment 16 Nate Graham 2018-04-19 14:05:11 UTC
Aleix and I debugged this a bit. The update notifier was acrtally showing the correct number of updates, which included some updated Flatpak runtimes. Discover wasn't showing them, and was only showing PackageKit updates. After poking flatpak by running `flatpak update` on the command-line and then immediately ^C'ing it, Discover suddenly noticed the Flatpak runtime updates.
Comment 17 Øystein Steffensen-Alværvik 2018-04-30 17:38:54 UTC
(In reply to Nate Graham from comment #16)
> Aleix and I debugged this a bit. The update notifier was acrtally showing
> the correct number of updates, which included some updated Flatpak runtimes.
> Discover wasn't showing them, and was only showing PackageKit updates. After
> poking flatpak by running `flatpak update` on the command-line and then
> immediately ^C'ing it, Discover suddenly noticed the Flatpak runtime updates.

Yes, indeed! When I run 'flatpak update' from a terminal the notification disappears.
Comment 18 Nate Graham 2018-05-09 22:42:42 UTC
*** Bug 394043 has been marked as a duplicate of this bug. ***
Comment 19 Nate Graham 2018-05-10 02:18:45 UTC

*** This bug has been marked as a duplicate of bug 385754 ***
Comment 20 Øystein Steffensen-Alværvik 2018-05-15 19:22:51 UTC
I am experiencing this right now after successfully updating the system with Discover (Notifier shows 4 updates when there are none). I ran 'flatpak update' – no updates available. Funnily, when I run 'plasmawindowed org.kde.discovernotifier' the pop-up says "System is up to date", but Notifier's counter stays the same. I also removed Discover's flatpak backend and ran 'pkcon refresh', but still the same.

The weird thing was, Notifier first told me "1 update is available, of which 4 are security updates". After the update Notifier showed 4 available normal updates.

Restarting session clears it.

Plasma 5.12.5