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

Spotifyd sometimes crashes due to unset DBUS_SESSION_BUS_ADDRESS #47

Open
TobleMiner opened this issue Jan 21, 2025 · 1 comment
Open

Comments

@TobleMiner
Copy link
Member

Under some circumstances DBUS_SESSION_BUS_ADDRESS seems to become unset or maybe invalid.
Investigate running spotifyd as dbus unit maybe?

Jan 21 00:12:50 OtterCastAudio systemd[1]: Started spotifyd.
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: No config file specified. Running with default values
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: No username specified. Checking username_cmd
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: No username_cmd specified
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: No password specified. Checking password_cmd
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: No password_cmd specified
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: No proxy specified
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: Using software volume controller.
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: no usable credentials found, enabling discovery
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: *** WARNING *** The program 'spotifyd' uses the Apple Bonjour compatibility layer of Avahi.
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: *** WARNING *** The program 'spotifyd' uses the Apple Bonjour compatibility layer of Avahi.
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jan 21 00:12:50 OtterCastAudio spotifyd[517]: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
Jan 21 00:13:11 OtterCastAudio spotifyd[517]: Ignoring blacklisted access point ap-gew4.spotify.com:4070
Jan 21 00:13:11 OtterCastAudio spotifyd[517]: Ignoring blacklisted access point ap-gew4.spotify.com:443
Jan 21 00:13:11 OtterCastAudio spotifyd[517]: Ignoring blacklisted access point ap-gew4.spotify.com:80
Jan 21 00:13:11 OtterCastAudio spotifyd[517]: Ignoring blacklisted access point ap-gue1.spotify.com:4070
Jan 21 00:13:11 OtterCastAudio spotifyd[517]: Connecting to AP "ap-gew1.spotify.com:443"
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Authenticated as "*redacted*" !
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Mixing with softvol and volume control: Log(60.0)
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Country: "DE"
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Converting with ditherer: tpdf
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Using PulseAudioSink with format: S16
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: The application panicked (crashed).
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Message:  Failed to initialize DBus connection: D-Bus error: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead (org.freedesktop.DBus.Error.NotSupported)
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Location: src/dbus_mpris.rs:169
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Jan 21 00:13:12 OtterCastAudio spotifyd[517]: Run with RUST_BACKTRACE=full to include source snippets.
Jan 21 00:13:12 OtterCastAudio systemd[1]: spotifyd.service: Main process exited, code=exited, status=101/n/a
Jan 21 00:13:12 OtterCastAudio systemd[1]: spotifyd.service: Failed with result 'exit-code'.
Jan 21 00:13:17 OtterCastAudio systemd[1]: spotifyd.service: Scheduled restart job, restart counter is at 2.
@Manawyrm
Copy link
Member

I think most of this hackery is historic.
Back before we had the otter-user/user-separation in general, we needed to set the DBUS address manually.

Now with systemd user services, this might just work in general? Not quite sure.

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