Bug 408250 - Job progress not displayed in pop-up notification when something other than plasmashell has registered kuiserver first
Summary: Job progress not displayed in pop-up notification when something other than p...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.16.0
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords: triaged
: 408807 408948 409101 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-03 11:28 UTC by Юрий
Modified: 2019-06-24 05:45 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.16.2


Attachments
dbus log (451.88 KB, text/html)
2019-06-03 16:41 UTC, Юрий
Details
new dbus log with openSUSE Leap 15.1 (272.94 KB, text/html)
2019-06-03 21:42 UTC, Юрий
Details
output for QT_LOGGING_RULES=org.kde.plasma.notifications=true plasmashell (10.35 KB, text/x-log)
2019-06-17 08:56 UTC, Юрий
Details
settings (536.29 KB, image/png)
2019-06-17 22:26 UTC, Юрий
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Юрий 2019-06-03 11:28:29 UTC
SUMMARY
When working with files: copying, moving, downloading from a remote server, unpacking, in Dolphin, no progress is displayed. There are no statuses in the notification area. No messages about the completion of the process

STEPS TO REPRODUCE
1. Copy/Move large file


OBSERVED RESULT

No progress displayed

EXPECTED RESULT
Showing process status


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: openSUSE Leap 15.0
(available in About System)
KDE Plasma Version: 5.15.90
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Comment 1 Eugeny Kazakov 2019-06-03 11:33:27 UTC
Have the same problems in ArchLinux current

Operating System: Arch Linux 
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Comment 2 Kai Uwe Broulik 2019-06-03 12:14:49 UTC
Can't reproduce. Do you have a kuiserver5 process running?
Comment 3 Eugeny Kazakov 2019-06-03 12:57:47 UTC
Yes, I have that running
Comment 4 Nate Graham 2019-06-03 13:19:13 UTC
Also cannot reproduce.
Comment 5 Юрий 2019-06-03 13:22:50 UTC
kuiserver5 process not running
Comment 7 Kai Uwe Broulik 2019-06-03 13:54:06 UTC
What's the process that belongs to the PID that the following command outputs, or does it fail?
qdbus org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID org.kde.kuiserver
Comment 8 Fabian Vogt 2019-06-03 14:15:30 UTC
Working fine here, using those repos as well, just the variants for Leap 15.1.

Please try the following:

Run dbus-monitor |& tee dbus.log in one terminal and "KDE_FORK_SLAVES=1 kioclient5 cp --interactive file:///proc/mounts file:///proc/mounts" in the other. Wait a second after the dialog appears and click on cancel, then kill dbus-monitor in the other tab.

Scan through the created dbus.log and remove any info that shouldn't be public and attach it here.
Comment 9 Юрий 2019-06-03 16:41:45 UTC
Created attachment 120530 [details]
dbus log
Comment 10 Юрий 2019-06-03 21:42:35 UTC
Created attachment 120537 [details]
new dbus log with openSUSE Leap 15.1

update system  15.0 => 15.1
Comment 11 Nate Graham 2019-06-03 22:17:22 UTC
Wait a minute, what version of KDE Plasma are you using> Not OpenSUSE, but Plasma itself. You can find this in the Info Center app.
Comment 12 Юрий 2019-06-04 07:38:43 UTC
(In reply to Nate Graham from comment #11)
> Wait a minute, what version of KDE Plasma are you using> Not OpenSUSE, but
> Plasma itself. You can find this in the Info Center app.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Leap 15.1 
(available in About System)
KDE Plasma Version: 5.15.90
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Comment 13 Kai Uwe Broulik 2019-06-04 07:59:07 UTC
DBus traffic looks perfectly normal:

It requests a view:
method call time=1559597889.520078 sender=:1.230 -> destination=org.kde.JobViewServer serial=7 path=/JobViewServer; interface=org.kde.JobViewServer; member=requestView
   string "kioclient"
   string "kioclient"
   int32 3

Gets a view back:
method return time=1559597889.524836 sender=:1.28 -> destination=:1.230 serial=549 reply_serial=7
   object path "/org/kde/notificationmanager/jobs/JobView_6"

Connects the various signals, such as:
method call time=1559597889.525251 sender=:1.230 -> destination=org.freedesktop.DBus serial=9 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.kde.JobViewServer',path='/org/kde/notificationmanager/jobs/JobView_6',interface='org.kde.JobViewV2',member='cancelRequested'"

Then populates the job information:
method call time=1559597889.581981 sender=:1.230 -> destination=org.kde.JobViewServer serial=31 path=/org/kde/notificationmanager/jobs/JobView_6; interface=org.kde.JobViewV2; member=setInfoMessage
   string "Копирование"
method call time=1559597889.582002 sender=:1.230 -> destination=org.kde.JobViewServer serial=32 path=/org/kde/notificationmanager/jobs/JobView_6; interface=org.kde.JobViewV2; member=setDescriptionField
   uint32 0
   string "Источник"
   string "/proc/mounts"
method call time=1559597889.582012 sender=:1.230 -> destination=org.kde.JobViewServer serial=33 path=/org/kde/notificationmanager/jobs/JobView_6; interface=org.kde.JobViewV2; member=setDescriptionField
   uint32 1
   string "Назначение"
   string "/proc/mounts"
method call time=1559597889.582041 sender=:1.230 -> destination=org.kde.JobViewServer serial=34 path=/org/kde/notificationmanager/jobs/JobView_6; interface=org.kde.JobViewV2; member=setTotalAmount
   uint64 1
   string "files"

And eventually calls terminate five seconds later when the job is done:
method call time=1559597894.900474 sender=:1.230 -> destination=org.kde.JobViewServer serial=38 path=/org/kde/notificationmanager/jobs/JobView_6; interface=org.kde.JobViewV2; member=terminate
   string ""

I'm afraid I don't know why it's not showing up for you.

Can you run plasmashell from console with notification debugging enabled and observe the output for anything unusual?
QT_LOGGING_RULES=org.kde.plasma.notifications=true plasmashell

When you start a progress you should get an output like or similar (doesn't matter if requested by is empty as long as application-display-name is sensible)
org.kde.plasma.notifications: JobView requested by "org.kde.dolphin" with hints QMap(("application-display-name", QVariant(QString, "Dolphin"))("application-icon-name", QVariant(QString, "system-file-manager")))
Especially make sure to watch for any "By the time we wanted to show JobView it was already stopped" and "Service that requested the view wasn't registered anymore by the time the request was being processed" as well as "JobView service unregistered"
Comment 14 Kai Uwe Broulik 2019-06-17 07:33:54 UTC
*** Bug 408807 has been marked as a duplicate of this bug. ***
Comment 15 Юрий 2019-06-17 08:56:55 UTC
Created attachment 120935 [details]
output for QT_LOGGING_RULES=org.kde.plasma.notifications=true plasmashell
Comment 16 Юрий 2019-06-17 09:05:36 UTC
i was reinstalled my system, all was fine. I start to install necessary software.
and suddenly, notification progress is gone. Not displayed.
Also, download progress from browser, not displayed too.
Comment 17 Kai Uwe Broulik 2019-06-17 10:53:36 UTC
"org.kde.plasma.notifications: Failed to register JobViewServer service on DBus, is kuiserver running?
org.kde.plasma.notifications: Failed to register JobViewServer DBus object"

What software are you installing? Maybe KDE4 apps install a kuiserver which then claims the service before plasmashell can do?
Comment 18 Юрий 2019-06-17 12:42:50 UTC
(In reply to Kai Uwe Broulik from comment #17)
> "org.kde.plasma.notifications: Failed to register JobViewServer service on
> DBus, is kuiserver running?
> org.kde.plasma.notifications: Failed to register JobViewServer DBus object"
> 
> What software are you installing? Maybe KDE4 apps install a kuiserver which
> then claims the service before plasmashell can do?

how can i check installed KDE4 apps?
Comment 19 Kai Uwe Broulik 2019-06-17 12:58:48 UTC
when they depend on kdelibs I guess.
Comment 20 Sefa Eyeoglu 2019-06-17 15:12:33 UTC
I had this issue, too on Arch Linux after updating to the 5.16 beta (5.15.90).

After looking through the debug logs as explained above and looked which process owns kuiserver I came across "latte-dock". Looks like Latte Dock registers the kuiserver before plasmashell does? Anyway after killing latte-dock and restarting plasmashell, the progess is now shown as it should be. Now if I restart Latte Dock AFTER plasmashell it also shows the progress on the dock, as it should do. So I guess OP installed Latte Dock after the clean install and that broke it again. I guess Latte Dock is launched before plasmashell on login, which causes this.

Now the question would be if this is a Latte Dock issue. I mean if plasmashell struggles to register kuiserver if it has already been registered, shouldn't Latte Dock have the same problem?
Comment 21 Kai Uwe Broulik 2019-06-17 15:26:34 UTC
Thanks for the investigation. I didn't expect Latte Dock to start before plasmashell. Maybe because plasmashell's panel take a while to load.

The task bar progress stuff used by Latte is the same as in Plasma's Task Manager and it tries to register the kuiserver service as a result. Not really sure how to address this.
Comment 22 Jeffery Patton 2019-06-17 16:59:52 UTC
I suffer the same as well, but at least I get a progress circle from my Latte dock. I think.
Comment 23 Jeffery Patton 2019-06-17 17:02:01 UTC
I changed some things to specify that this affects the stable 5.16 itself and it is for everyone running 5.16.0.
Comment 24 Michail Vourlakos 2019-06-17 19:36:26 UTC
(In reply to Kai Uwe Broulik from comment #21)
> Thanks for the investigation. I didn't expect Latte Dock to start before
> plasmashell. Maybe because plasmashell's panel take a while to load.
> 
> The task bar progress stuff used by Latte is the same as in Plasma's Task
> Manager and it tries to register the kuiserver service as a result. Not
> really sure how to address this.

Wasn't Unity dbus interface going to be used for tasks progress tracking?
Comment 25 Юрий 2019-06-17 22:26:49 UTC
Created attachment 120961 [details]
settings

if this setting is unchecked, all is fine
Comment 26 Kai Uwe Broulik 2019-06-18 06:47:50 UTC
It was/is but since you can configure it to only display progress in Task Manager without Notification widget, the SmartLauncherItem also registers the service and then it depends on whoever came first, Latte or Plasma.
Comment 27 Michail Vourlakos 2019-06-18 08:59:09 UTC
A workaround could be to delay Latte startup from its startup desktop file for the users that are hit by this
Comment 28 Michail Vourlakos 2019-06-18 08:59:13 UTC
A workaround could be to delay Latte startup from its startup desktop file for the users that are hit by this
Comment 29 Kai Uwe Broulik 2019-06-19 15:28:14 UTC
*** Bug 408908 has been marked as a duplicate of this bug. ***
Comment 30 Christoph Feck 2019-06-20 11:19:48 UTC
*** Bug 408948 has been marked as a duplicate of this bug. ***
Comment 31 Kai Uwe Broulik 2019-06-23 09:08:44 UTC
Anyone affected please give this patch a try: https://phabricator.kde.org/D22017
Comment 32 Kai Uwe Broulik 2019-06-23 16:08:14 UTC
Git commit 52bec414aefadc3fa02dacc82c73ec31d4c00098 by Kai Uwe Broulik.
Committed on 23/06/2019 at 16:04.
Pushed by broulik into branch 'Plasma/5.16'.

[Notifications] Let plasmashell be the only true owner of notification and job tracker services

Register notification and job tracker services with "allow replacement" flag if not plasmashell,
so when it eventually comes up, it can claim the service and then cling on to it.
FIXED-IN: 5.16.2

Differential Revision: https://phabricator.kde.org/D22017

M  +2    -0    libnotificationmanager/jobsmodel.cpp
M  +3    -0    libnotificationmanager/jobsmodel.h
M  +39   -2    libnotificationmanager/jobsmodel_p.cpp
M  +2    -0    libnotificationmanager/jobsmodel_p.h
M  +9    -0    libnotificationmanager/notificationsmodel.cpp
M  +1    -0    libnotificationmanager/server.cpp
M  +5    -0    libnotificationmanager/server.h
M  +21   -1    libnotificationmanager/server_p.cpp
M  +1    -0    libnotificationmanager/server_p.h
M  +6    -0    libnotificationmanager/utils.cpp
M  +2    -0    libnotificationmanager/utils_p.h
M  +3    -0    shell/main.cpp

https://commits.kde.org/plasma-workspace/52bec414aefadc3fa02dacc82c73ec31d4c00098
Comment 33 Michail Vourlakos 2019-06-24 05:45:04 UTC
*** Bug 409101 has been marked as a duplicate of this bug. ***