Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when no notification server is up twice (should autostart) #40

Open
fwsmit opened this issue Feb 12, 2022 · 2 comments
Open

Crash when no notification server is up twice (should autostart) #40

fwsmit opened this issue Feb 12, 2022 · 2 comments

Comments

@fwsmit
Copy link
Contributor

fwsmit commented Feb 12, 2022

I have configured my notification daemon to autostart upon sending a notification, but this seems to not always work with mpd-notificatition (note that it always works with notify-send).

To reproduce:

  1. start mpd-notification
  2. kill the notification daemon
  3. toggle music playback
  4. kill the notification deamon again
  5. toggle music playback again

mpd-notification will then crash with the message:

mpd-notification: Error showing notification: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.398 was not provided by any .service files

I reproduced it using mpd-notification v0.8.6 and the latest master.

@eworm-de
Copy link
Owner

Well, that's not a crash, but an error caused by failed dbus auto-activation. You say "seems to not always work"... Is it always the second notification deamon start that fails?

Wondering what notify-send does different, though... Perhaps it does try to again on failure?

@fwsmit
Copy link
Contributor Author

fwsmit commented Feb 18, 2022

I've done some more looking and the error is not caused by dbus activation. I can also reproduce it as follows:

  1. Start mpd-notification
  2. Toggle the music to show a notification
  3. Kill the notification daemon
  4. Start the notification daemon again
  5. Toggle the music again to show another notification

At this point mpd-notification exits. So mpd-notification is not able to send notifications to another notification once it has sent one already. Note that step 2 is neccesary. Only after the first notification is sent, mpd-notification cannot switch.

I've tried looking what is done different by notify-send and dunstify (which also works).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants