Bug 462170 - Discover does not notify about pending updates
Summary: Discover does not notify about pending updates
Status: RESOLVED UPSTREAM
Alias: None
Product: Discover
Classification: Applications
Component: Notifier (show other bugs)
Version: 5.26.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-23 14:46 UTC by Nico Dorn
Modified: 2023-01-04 13:33 UTC (History)
6 users (show)

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


Attachments
Screenshot of Discover's tray icon staying hidden even though there are updates pending (1.98 MB, image/png)
2022-12-04 15:38 UTC, Stefan Zurucker
Details
results of journalctl --user | grep DiscoverNotifier (76.29 KB, text/plain)
2022-12-19 17:20 UTC, rdparis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Dorn 2022-11-23 14:46:38 UTC
SUMMARY
Disocver does not notify about updates.

STEPS TO REPRODUCE
This might be due to the configuration. In my case, System Settings > Software Updates is configured as such:

Update software: Manually
Notification frequency: daily
Use offline updates: off

Nevertheless the file ~/.config/PlasmaDiscoverUpdates has this content right now (today is 11/23/2022):

[Global]
LastNotificationTime=2022,11,19,10,59,16.507

Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-53-generic (64-bit)
Comment 1 Aleix Pol 2022-11-23 16:41:39 UTC
Does it suddenly notice there's updates if you run "pkcon refresh"?
Comment 2 Nico Dorn 2022-11-24 08:35:55 UTC
No, unfortunately not. "pkcon refresh" doesn't do the trick.

I should maybe mention that in System Tray Settings the icon Updates is set to "Shown when relevant" (which is the default, I guess).
Comment 3 Nico Dorn 2022-11-24 08:37:35 UTC
I forgot: If I open Discover manually, right now it shows 13 Updates available. It's only about the missing notification.
Comment 4 Aleix Pol 2022-11-24 19:21:13 UTC
Does restarting DiscoverNotifier help there? You can do so by running the following command:

/usr/lib/x86_64-linux-gnu/libexec/DiscoverNotifier --replace
Comment 5 Nico Dorn 2022-11-25 07:59:37 UTC
That works. Unfortunately, I have to do it every time I reboot the system. Otherwise the system tray icon states "offline".
Comment 6 Aleix Pol 2022-11-25 13:36:07 UTC
Weird... 🤔
Comment 7 Nate Graham 2022-11-30 19:10:02 UTC
Was DiscoverNotifier running before you ran `/usr/lib/x86_64-linux-gnu/libexec/DiscoverNotifier --replace`?
Comment 8 Nico Dorn 2022-12-03 14:59:36 UTC
Yes, the process was running. But the icon in the tray said "offline".

Another thing I disovered right now that might have something to do with it: I wrote a script that pops up at startup and executes `/usr/lib/x86_64-linux-gnu/libexec/DiscoverNotifier --replace` after I press enter. (Weirdly, I have a login script, but it won't work from there, even if I give the command a huge delay of 30 secs.) After that, the update notifier works as expected. But, if I cut the internet connection, the notifier turns back into the "offline" state and won't get active again, even if I reestablish the connection. But at startup it never works out of the box, whether there's an internet connection present or not.
Comment 9 Stefan Zurucker 2022-12-04 15:38:10 UTC
Created attachment 154307 [details]
Screenshot of Discover's tray icon staying hidden even though there are updates pending
Comment 10 Stefan Zurucker 2022-12-04 15:42:34 UTC
I can confirm this on two machines with KDE Neon. I would like to point out that this started right after upgrading both machines from 20.04 to 22.04, which leads me to believe something in Discover became misconfigured during that version jump.

Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-53-generic (64-bit)
Comment 11 Nico Dorn 2022-12-05 13:37:03 UTC
In addition to Stefans comment: I made a fresh install of KDE neon some weeks ago after the rebase on jammy. Since then I face this bug.

I might have found a way to reproduce the notifier's behaviours: Establishing a network connection switches the notfier off. Steps to reproduce:

1. Make sure DiscoverNotifer is running.
2. Disconnet your network connection (turn off Wifi or LAN) => DiscoverNotifier's state is unchanged.
3. Reconnect Wifi or LAN => DiscoverNotifier switches into "offline" mode.
Comment 12 luca 2022-12-09 10:51:30 UTC
I can confirm in debian testing and unstable.
plasma-discover  5.26.4-1 

I have noticed in journalctl after pkcon refresh or apt-get update these lines:
dic 09 11:42:09 user DiscoverNotifier[18930]: packagekitqt.transaction: Unknown Transaction property: "Sender" QVariant(QString, ":1.334")
dic 09 11:42:12 user DiscoverNotifier[18930]: packagekitqt.transaction: Unknown Transaction property: "Sender" QVariant(QString, ":1.334")
Comment 13 luca 2022-12-09 13:37:25 UTC
reverting packagekit to previous version
gir1.2-packagekitglib-1.0 1.2.5-3+b1,  libpackagekit-glib2-18:amd64 1.2.5-3+b1,  libpackagekitqt5-1:amd64 1.0.2-1, packagekit                                  1.2.5-3+b1, packagekit-tools 1.2.5-3+b1
discovernotifier works.
Comment 14 Nate Graham 2022-12-09 14:31:04 UTC
Seems pretty clear that it's a PackageKit regression, then.

Nico, does this fix the issue for you as well?
Comment 15 Nico Dorn 2022-12-09 18:19:01 UTC
(In reply to Nate Graham from comment #14)
> Nico, does this fix the issue for you as well?

I'd like to test that, but don't know how, Nate. I think, the version of my packagekit libraries is acutally lower than the one, Luca gave, e.g.: libpackagekit-glib2-18:amd64 1.2.5-2ubuntu2? Unfortunately, there ist no other version I could force. Maybe due to the fresh install I made a month ago?
Comment 16 luca 2022-12-09 18:48:35 UTC
@Nico
in your journal are there rows related DiscoverNotifier or packagekit?
try
$ journalctl --user | grep DiscoverNotifier
Comment 17 Nico Dorn 2022-12-10 09:15:25 UTC
Nothing for packagekit, some for DiscoverNotifier, but not the same as yours and quite irregular (not every day). There are three different types, but none of them appear on a daily basis:

Nov 13 10:23:54 nico systemd[1167]: Started /usr/lib/x86_64-linux-gnu/libexec/DiscoverNotifier.
Nov 19 11:59:24 nico DiscoverNotifier[2090]: Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
Nov 30 14:58:34 nico DiscoverNotifier[3065]: "Object does not exist at path “/org/freedesktop/NetworkManager/ActiveConnection/1”"
Comment 18 luca 2022-12-10 11:52:01 UTC
Maybe the reasons why Discover does not notify about updates are more than one ;)
Comment 19 rdparis 2022-12-19 17:20:24 UTC
Created attachment 154700 [details]
results of journalctl --user | grep DiscoverNotifier
Comment 20 rdparis 2022-12-19 17:23:22 UTC
(In reply to Nate Graham from comment #14)
> Seems pretty clear that it's a PackageKit regression, then.
> 
> Nico, does this fix the issue for you as well?

I found this thread while trying to figure out why Discover wasn't giving notifications. I was able to revert the packages mentioned under Debian Bookworm and can confirm that the notifier will start working again. I will even go as far to say that reverting only libpackagekitqt5-1 will bring it back. Apt will start wanting to remove things if you mark hold, so I don't recommend leaving the system in that state.  I have also added an attachment with the results of journalctl --user | grep DiscoverNotifier. 

I hope this is helpful.
Comment 21 Bug Janitor Service 2023-01-03 05:28:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 22 Floreal 2023-01-03 10:15:13 UTC
Same bug on debian testing. Problem should be related to packagekit: journalctl give this error:

DiscoverNotifier[2167]: packagekitqt.transaction: Unknown Transaction property: "Sender" QVariant(QString, ":1.99")

I hope this bug should be fixed...
Comment 23 luca 2023-01-03 13:01:56 UTC
If you can not wait and you are brave can try this workaround:
- extract libpackagekitqt5.so.1.0.2 from previous libpackagekitqt5-1
- replace libpackagekitqt5.so.1.0.3(first save it with another name) in /usr/lib/x86_64-linux-gnu
Comment 24 Nate Graham 2023-01-03 18:28:33 UTC
That specific issue seems like a PackageKit bug. Those versions are extremely old, more than 3 years old. It's quite possible that it's been fixed for years already.
Comment 25 luca 2023-01-03 18:41:06 UTC
In debian testing/unstable the DiscoverNotifier issue starts with libpackagekitqt5-1:amd64  Vers.1.1.0-1 released one mounth ago 
https://github.com/PackageKit/PackageKit-Qt
Comment 26 Nate Graham 2023-01-03 18:48:18 UTC
Ah, PackageKitQt uses different version numbers, I see.

Regardless, please report the issue upstream.