Notify method not working correctly in 21.10 (impish)

Bug #1949615 reported by Gordon Lack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
New
Undecided
Unassigned

Bug Description

The replaces_id parameter to org.freedesktop.Notifications.Notify no longer works correctly at 21.10.
It is OK on 21.04.

At 21.10 if a message with replaces_id == x ever times out then any further message sent with that replaces_id never gets shown. The timeout-over seems to become permanent for that replaces_id.

Example program to follow....

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: dbus 1.12.20-2ubuntu2
ProcVersionSignature: Ubuntu 5.13.0-20.20-generic 5.13.14
Uname: Linux 5.13.0-20-generic x86_64
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Wed Nov 3 16:49:18 2021
InstallationDate: Installed on 2020-08-13 (447 days ago)
InstallationMedia: Kubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
SourcePackage: dbus
UpgradeStatus: Upgraded to impish on 2021-10-17 (17 days ago)

Revision history for this message
Gordon Lack (gordon-lack) wrote :
Revision history for this message
Gordon Lack (gordon-lack) wrote :

This python program shows the problem

*=*=* Cut here *=*=*
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
from pydbus import SessionBus
from time import sleep

##### Global constants
#
item = "org.freedesktop.Notifications"
path = "/org/freedesktop/Notifications"
interface = "org.freedesktop.Notifications"
app_name = "NotifyTest"
icon = "/usr/share/icons/breeze/devices/64/camera-web.svg"
actions_list = []
hint = {}

bus = SessionBus()
notifications = bus.get('.Notifications')

##### Global variables
#
our_notify_id = 0
timeout = 3000 # ms
wait4 = 0 # s
body = "from NotifyTest.py"

while wait4 < 6:
    wait4 += 1
    message = "The next wait will be %ss" % wait4

# This should replace any previous notification still there...
# (can do this with notify-send command, but doing it in python allows
# us to use a fixed id for replacement).
#
    our_notify_id = notifications.Notify(app_name, our_notify_id, icon,
       message, body, actions_list, hint, timeout)
    print("our_notify_id:", our_notify_id)

# At Ubuntu 21.10 we have to change this to get the new message seen...
#
# our_notify_id += 1
    print(message)

    sleep(wait4)

print("Done")
*=*=* Cut here *=*=*

On 21.04 after the sleep exceeds the 3s timeout a new info message box is displayed.

On 21.10 after the sleep exceeds the 3s timeout nothing is shown.

description: updated
Revision history for this message
Gordon Lack (gordon-lack) wrote :

This is still an issue in 23.04 (lunar)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.