List notifications (and their properties)

I am currently trying to debug an issue, that Franz is sometimes not brought up again after clicking on a notification sent by Franz (https://github.com/meetfranz/franz/issues/1605).
To determine, whether that is a problem either by the application or gnome-shell I would like to list the notifications and their properties (especially something like a callback link to the application). Does anyone know a way to monitor or list them and could help me with that?

Cheers in advance

The only way today do that, realistically, is from inside gnome-shell. It’s not super difficult, but also not trivial to explain. Essentially you’d want to iterate all notification sources and iterate each notification for that source. It’s possible you could just pass each notification to JSON.stringify() and log them.

An easier way to debug this might be to just run dbus-monitor on the session bus to see what’s happening when the notifications are sent to gnome-shell and when they’re clicked. IIRC, the application just gets Activate called on the org.freedesktop.Application interface when a notification is clicked.

An easier way to debug this might be to just run dbus-monitor on the session bus to see what’s happening when the notifications are sent to gnome-shell and when they’re clicked

Cheers @andyholmes, will have a look into it.

the application just gets Activate called on the org.freedesktop.Application interface when a notification is clicked.

That sounds like a pretty simple protocol. Could an application even break that? Or does that sound more like a gnome-shell issue for you?

So, had a look into observing it with dbus-monitor today resulting in the following outputs:
Notification not opening Franz

signal time=1574002889.192944 sender=:1.17 -> destination=(null destination) serial=34579 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=ActionInvoked
   uint32 66
   string "default"
signal time=1574002889.199117 sender=:1.17 -> destination=(null destination) serial=34580 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
   uint32 66
   uint32 2

Notification opening Franz

signal time=1574003058.494434 sender=:1.17 -> destination=(null destination) serial=34783 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=ActionInvoked
   uint32 67
   string "default"
signal time=1574003058.501010 sender=:1.17 -> destination=(null destination) serial=34784 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
   uint32 67
   uint32 2

To be honest, they look very equivalent to me…

Yeah, sounds like a bug in Franz to me. The regular activate action of notifications is very straightforward, from the shell side.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.