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

Activation failure isn't detected with transient systemd unit #314

Open
amezin opened this issue May 29, 2023 · 2 comments
Open

Activation failure isn't detected with transient systemd unit #314

amezin opened this issue May 29, 2023 · 2 comments

Comments

@amezin
Copy link

amezin commented May 29, 2023

$ cat ~/.local/share/dbus-1/services/com.github.amezin.false.service 
[D-BUS Service]
Name=com.github.amezin.false
Exec=false
$ dbus-send --session --dest=org.freedesktop.DBus --print-reply --reply-timeout=120000 /org/freedesktop/DBus org.freedesktop.DBus.StartServiceByName string:'com.github.amezin.false' uint32:0
Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

While, obviously, the service fails (almost) immediately.

In journal:

Created slice Slice /app/dbus-:1.2-com.github.amezin.false.
Started dbus-:1.2-com.github.amezin.false@0.service.
dbus-:1.2-com.github.amezin.false@0.service: Main process exited, code=exited, status=1/FAILURE
dbus-:1.2-com.github.amezin.false@0.service: Failed with result 'exit-code'.

And it seems that activation won't be attempted again until dbus-broker is restarted. So, if there was some issue with, for example, service configuration, or missing dependencies, after fixing it I'll have to log out and login again - for session bus, or restart the system completely - for system bus.

@teg
Copy link
Contributor

teg commented May 31, 2023

Thank you for your report!

Which version of dbus-broker are you using?

@amezin
Copy link
Author

amezin commented May 31, 2023

v33, from Arch Linux repository

amezin added a commit to ddterm/gnome-shell-extension-ddterm that referenced this issue Jun 4, 2023
Manually ensure the app is running before calling its actions.

Both dbus-daemon and dbus-broker are somewhat broken:

- https://gitlab.freedesktop.org/dbus/dbus/-/issues/458
- bus1/dbus-broker#314

Fixes #433
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