Bug 436677 - History entries missing
Summary: History entries missing
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (other bugs)
Version First Reported In: 5.21.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-06 09:09 UTC by Florian Achleitner
Modified: 2021-06-02 16:44 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Achleitner 2021-05-06 09:09:03 UTC
SUMMARY

Notifications from Chrome and Firefox are not shown in the notification history of the applet, even if all settings are enabled. Is there some hard-coded blacklist? I looked at the sources and have no clue what is wrong.

I caputured the method call with dbus-monitor. See below..


STEPS TO REPRODUCE
1. In the settings enable "Show in history" generally and per application.
In ~/.config/plasmanotifyrc confirm that ShowInHistory=false is *not* set for e.g. [Applications][google-chrome]. Check that other notifications arrive in the history, as configured.
2. Receive a notification from google-chrome running MS-teams or Mattermost, or probably others.


OBSERVED RESULT
The popup appears, but no entry is in the history, after it the popup disappears.

EXPECTED RESULT
The notification is in the history in the applet.


SOFTWARE/OS VERSIONS
Fedora 34
Plasma 5.21.4

ADDITIONAL INFORMATION

I caputured the dbus method call with dbus-monitor:
method call time=1620286131.648975 sender=:1.207 -> destination=org.freedesktop.Notifications serial=35 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string "Google Chrome"
   uint32 0
   string "file:///tmp/.com.google.Chrome.OqAeVR"
   string "Allgemein"
   string "M hat auf eine Unterhaltung in Allgemein geantwortet, an der Sie teilnehmen"
   array [
      string "default"
      string "Activate"
      string "settings"
      string "Settings"
   ]
   array [
      dict entry(
         string "urgency"
         variant             uint32 1
      )
      dict entry(
         string "desktop-entry"
         variant             string "google-chrome"
      )
      dict entry(
         string "image_path"
         variant             string "/tmp/.com.google.Chrome.4Y0me0"
      )
      dict entry(
         string "image-path"
         variant             string "/tmp/.com.google.Chrome.4Y0me0"
      )
      dict entry(
         string "x-kde-origin-name"
         variant             string "teams.microsoft.com"
      )
   ]
   int32 25000

I then tried to reproduce such a call with busctl to figure out what the criteria for the history list are. From dbus point of view it looks virtually the same, but the following notification shows up in history, and the former does not!

method call time=1620286512.261841 sender=:1.423 -> destination=org.freedesktop.Notifications serial=2 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string "Google Chrome"
   uint32 0
   string "file:///tmp/.com.google.Chrome.OqAeVR"
   string "Header"
   string "Do 06 Mai 2021 09:35:12 CEST"
   array [
      string "default"
      string "Activate"
      string "settings"
      string "Settings"
   ]
   array [
      dict entry(
         string "urgency"
         variant             uint32 1
      )
      dict entry(
         string "desktop-entry"
         variant             string "google-chrome"
      )
      dict entry(
         string "x-kde-origin-name"
         variant             string "teams.microsoft.com"
      )
      dict entry(
         string "image_path"
         variant             string "/tmp/.com.google.Chrome.1keGGA"
      )
      dict entry(
         string "image-path"
         variant             string "/tmp/.com.google.Chrome.1keGGA"
      )
   ]
   int32 25000

This produced by:

busctl --user call org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications Notify susssasa\{sv\}i  "Google Chrome"  0  "file:///tmp/.com.google.Chrome.OqAeVR"  "Header"  "$(date)"  4 "default" "Activate" "settings" "Settings" 5 urgency u 1 desktop-entry s google-chrome x-kde-origin-name s teams.microsoft.com image_path s /tmp/.com.google.Chrome.1keGGA image-path s /tmp/.com.google.Chrome.1keGGA 25000

Tell me if I can help!
Thanks,
Florian
Comment 1 Nate Graham 2021-05-06 17:47:24 UTC
Interesting. Cannot reproduce FWIW.
Comment 2 Florian Achleitner 2021-05-08 08:04:22 UTC
I wonder what happens if the file:// URL passed with the image-path hint is no longer available when the notification should go into the history.

I observed that the file is already deleted when the popup disappears and the notification should show up in the history.
But it is there, when the popup is created.

I still can't reproduce it with anything else than real notifications from Chrome.
Comment 3 Kai Uwe Broulik 2021-05-27 19:07:46 UTC
Hmm.. the image-path should have no impact on the history and is purely cosmetical.

Alas, I also never had problems with Chrome notifications showing up in history.
Comment 4 Florian Achleitner 2021-05-31 14:03:17 UTC
I observed, that the notifications from MS-Teams show up in history when they are fresh, during the popup is shown. But when the popup disappears, it also disappears from history. 

Can the sender somehow revoke or remove a notification? This could be the reason.
I also found that it depends on the web application sending the notfication in the browser. So it seems to be content-dependant.
Comment 5 Florian Achleitner 2021-06-02 08:18:57 UTC
I observed that the method CloseNotification is called for the messages that don't show up in history. Thus, the reason is that the application removes its notification. I think it is not a bug in this software. We can close the issue.

Thanks, and sorry
Florian
Comment 6 Nate Graham 2021-06-02 16:44:48 UTC
:)