Bug 385754

Summary: [Flatpak] The number of updates available shown by Discover and its tray icon don't match
Product: [Applications] Discover Reporter: Patrick Silva <bugseforuns>
Component: Updates (interactive)Assignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: alex.brrsclnt, andrew.crouthamel, andysem, contacha, docampo.angel, elsner, gomezcarrillojuan, hrqelder, jaderoliveira, kiwimisc, nate, neousr, oss+kde+bugzilla, p92, rdieter, ruiam8, sergio.callegari, s_chriscollins, tim
Priority: NOR Keywords: usability
Version: 5.14.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.16.0
Attachments: screenshot
screenshot
Discover 5.12 on Arch
Discover on neon dev unstable
Discover 5.13.5 on Arch
Discover 5.14.2, Arch Linux

Description Patrick Silva 2017-10-14 18:18:15 UTC
Created attachment 108351 [details]
screenshot

Discover 5.11 on Arch.
See my screenshot, Discover shows 7 updates available and its tray icon shows 2 updates available.
Comment 1 Patrick Silva 2017-10-14 18:21:10 UTC
Created attachment 108352 [details]
screenshot
Comment 2 ruiamar 2017-12-15 18:36:29 UTC
The same upped to me on Discover 5.11.3 in Kubuntu
Comment 3 Aleix Pol 2018-01-08 18:09:27 UTC
Git commit 50cbb53afdaca8bd91aa8aec2b66ecc18b147d58 by Aleix Pol.
Committed on 08/01/2018 at 18:05.
Pushed by apol into branch 'master'.

Make sure pk updates don't go out of sync

Listen to all updates request transactions and update the values
accordingly.

M  +27   -5    libdiscover/backends/PackageKitBackend/PackageKitNotifier.cpp
M  +4    -0    libdiscover/backends/PackageKitBackend/PackageKitNotifier.h

https://commits.kde.org/discover/50cbb53afdaca8bd91aa8aec2b66ecc18b147d58
Comment 4 Patrick Silva 2018-02-13 01:12:32 UTC
Created attachment 110589 [details]
Discover 5.12 on Arch

Still happening on Arch Linux, Discover 5.12.
Comment 5 Aleix Pol 2018-02-13 02:15:27 UTC
Comment on attachment 110589 [details]
Discover 5.12 on Arch

Why do you have 2 updaters on the systray?
Comment 6 Patrick Silva 2018-02-13 02:25:14 UTC
(In reply to Aleix Pol from comment #5)
> Comment on attachment 110589 [details]
> Discover 5.12 on Arch
> 
> Why do you have 2 updaters on the systray?

second icon is another notifier installed from AUR or kde store.
I dont remember well.
Comment 7 Patrick Silva 2018-02-13 02:32:06 UTC
Created attachment 110591 [details]
Discover on neon dev unstable

the same just happened on neon dev unstable.
Comment 8 Patrick Silva 2018-02-13 02:44:25 UTC
after install these 7 updates on neon, discover said that no update was available.
So I ran "flatpak update" in konsole and VLC player was updated.
Immediatelly after VLC update was completed, tray icon changed to "system updated".
Comment 9 Patrick Silva 2018-02-13 02:48:17 UTC
(In reply to Dr. Chapatin from comment #8)
> after install these 7 updates on neon, discover said that no update was
> available.

but tray icon was still indicating 1 update available.
Comment 10 Andrew Crouthamel 2018-02-26 19:30:43 UTC
I just had this happen. The tray notification stated 1 update available. I clicked the Update button, which said no updates were available. I checked "apt list --upgradable", nothing. I ran "flatpak update" and I got:

ndrew@andrew-XPS-13-9360:~$ flatpak update
Looking for updates...
[...]
Updating: org.freedesktop.Platform.ffmpeg/x86_64/1.6 from flathub

1 delta parts, 2 loose fetched; 516 KiB transferred in 2 seconds                                   
Now at b5f77229b85f.
[...]

After that completed the 1 update notification went away.

This definitely points to some updater/flatpak integration issue.
Comment 11 Nate Graham 2018-03-19 18:00:25 UTC
*** Bug 392063 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2018-04-04 21:28:01 UTC
*** Bug 392740 has been marked as a duplicate of this bug. ***
Comment 13 Angel Docampo 2018-05-04 22:58:30 UTC
Can confirm the behaviour, also in Arch with discover 5.12
Comment 14 Angel Docampo 2018-05-04 23:30:13 UTC
Related to this, also, I saw 1 pendin update on the system tray and none on the GUI, as shown on Dr. Chapatin first screenshot.

By the way, when I execute flatpak update, this is the output.

$ flatpak update
Looking for updates...
Actualizando: org.freedesktop.Platform.GL.nvidia-390-48/x86_64/1.4 desde
 flathub
[####################] Downloading: 46,3 MB/46,3 MB (23,1 MB/s)

Then the system tray icon disappears.

By the way, I wasn't even aware of have installed org.freedesktop.Platform.GL.nvidia in my system and I cannot see it under Installed Applications.
Comment 15 Nate Graham 2018-05-09 22:41:17 UTC
*** Bug 394043 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2018-05-10 02:18:45 UTC
*** Bug 392063 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2018-05-10 02:18:49 UTC
*** Bug 392364 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2018-05-10 02:18:53 UTC
*** Bug 394043 has been marked as a duplicate of this bug. ***
Comment 19 Nate Graham 2018-05-10 12:54:02 UTC
*** Bug 392740 has been marked as a duplicate of this bug. ***
Comment 20 p92 2018-05-15 19:39:12 UTC
affects 5.12.4 on kubuntu 18.04
Comment 21 Neousr 2018-07-20 16:44:27 UTC
I can confirm the behavior there is "1" one update on the discover tray icon and opening discover itself will show no update.

There is more info on Bug #394043 about that.
Comment 22 Mayeul C. 2018-10-02 08:50:42 UTC
I can confirm this, on Arch, Discover 5.13.5.

The notification in the tray displays 5 updates, only two show up in discover (I will attach a screenshot).

I don't think that runtimes always appear in Discover. The output of flatpak list displays 5 packages, so all presumably need to be updated:
Ref                                                Options       
com.valvesoftware.Steam/x86_64/stable              system,current
org.freedesktop.Platform.Compat.i386/x86_64/18.08  system,runtime
org.freedesktop.Platform.VAAPI.Intel/x86_64/18.08  system,runtime
org.freedesktop.Platform.html5-codecs/x86_64/18.08 system,runtime
org.freedesktop.Platform/x86_64/18.08              system,runtime

It could be related to Bug 395923 where runtimes are handled differently as well.

I was about to write that no update at all was displayed, but  they just took a long time (maybe 5 minutes) to be displayed. It could be the same with people reporting that no update is shown. Adding a progress indicator, or an indication that updates are being checked for could be of some help here.

After installing updates trough Discover, no updates are shown int the main windows, though one remains, and is displayed in the tray. Discover complained about org.freedesktop.Platform.Compat.i386 not being in the flathub remote, although it works with `flatapak update`. After updating this way, the tray icon disappears.

If that helps for reproducing, here is the output of
$ flatpak list --ostree-verbose -v -d                                                                                                                                                                                   
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening user flatpak installation at path /home/user/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
Ref                                                Origin  Active commit Latest commit Installed size Options       
com.valvesoftware.Steam/x86_64/stable              flathub eb44022a304e  -              15,4 MB       system,current
org.freedesktop.Platform.Compat.i386/x86_64/18.08  flathub 279502715b02  -             493,8 MB       system,runtime
org.freedesktop.Platform.VAAPI.Intel/x86_64/18.08  flathub f4e8c0397f5a  -               8,1 MB       system,runtime
org.freedesktop.Platform.html5-codecs/x86_64/18.08 flathub 6e3e9f613bdd  -               7,9 MB       system,runtime
org.freedesktop.Platform/x86_64/18.08              flathub 7af74803c28b  -             751,1 MB       system,runtime

I'm not sure if you can install the same revisions to help with reproducing this bug, but I hope it helps.
Comment 23 Mayeul C. 2018-10-02 08:52:01 UTC
Created attachment 115361 [details]
Discover 5.13.5 on Arch
Comment 24 Patrick Silva 2018-10-22 16:32:51 UTC
*** Bug 400156 has been marked as a duplicate of this bug. ***
Comment 25 Patrick Silva 2018-10-23 23:59:01 UTC
Created attachment 115860 [details]
Discover 5.14.2, Arch Linux

See the screenshot please.
Both 'flatpak update' command in konsole and update notifier indicate 6 flatpak updates available. Discover only shows 4 updates.


Operating System: Arch Linux 
KDE Plasma Version: 5.14.2
Qt Version: 5.12.0 beta2
KDE Frameworks Version: 5.51.0
Comment 26 Patrick Silva 2018-12-04 12:20:05 UTC
*** Bug 401713 has been marked as a duplicate of this bug. ***
Comment 27 Aleix Pol 2019-01-08 17:31:04 UTC
*** Bug 402344 has been marked as a duplicate of this bug. ***
Comment 28 Nate Graham 2019-03-07 23:55:45 UTC
*** Bug 405013 has been marked as a duplicate of this bug. ***
Comment 29 Patrick Silva 2019-03-14 12:34:47 UTC
*** Bug 405465 has been marked as a duplicate of this bug. ***
Comment 30 Aleix Pol 2019-03-16 20:13:17 UTC
Git commit 2d8c028cd3955055289f3109fce2e3068fd2dd7d by Aleix Pol.
Committed on 16/03/2019 at 20:07.
Pushed by apol into branch 'master'.

Don't calculate updates on the updates notification plasmoid
Related: bug 405533

M  +0    -9    libdiscover/backends/DummyBackend/DummyNotifier.cpp
M  +2    -2    libdiscover/backends/DummyBackend/DummyNotifier.h
M  +35   -40   libdiscover/backends/FlatpakBackend/FlatpakNotifier.cpp
M  +12   -9    libdiscover/backends/FlatpakBackend/FlatpakNotifier.h
M  +5    -4    libdiscover/backends/PackageKitBackend/PackageKitNotifier.cpp
M  +2    -2    libdiscover/backends/PackageKitBackend/PackageKitNotifier.h
M  +3    -2    libdiscover/notifiers/BackendNotifierModule.h
M  +11   -49   notifier/DiscoverNotifier.cpp
M  +5    -12   notifier/DiscoverNotifier.h
D  +0    -84   notifier/plasmoid/contents/ui/Full.qml
M  +48   -1    notifier/plasmoid/contents/ui/main.qml

https://commits.kde.org/discover/2d8c028cd3955055289f3109fce2e3068fd2dd7d
Comment 31 gcjuan 2019-04-02 09:43:31 UTC
Having the same issue on KDE neon 15.5.3.

SOLUTION:

the problem was that I had flatpak packages to update and they seem not to be updated with Discover. I've run "flatpak update" to update all my flatpak packages and the updater tray icon notification is gone.