[GH-ISSUE #170] dbus failure should concur to not attempt #86

Closed
opened 2026-03-02 23:44:23 +03:00 by kerem · 9 comments
Owner

Originally created by @sewnie on GitHub (Mar 26, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/170

Log and backtrace

Got a panic: PanicInfo {
    payload: Any { .. },
    message: Some(
        called `Result::unwrap()` on an `Err` value: SendError { .. },
    ),
    location: Location {
        file: "/home/sewn/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/souvlaki-0.6.0/src/platform/mpris/dbus.rs",
        line: 160,
        col: 53,
    },
    can_unwind: true,
}

After spotify-player realizes there is no dbus daemon running, it should instead simply stop sending requests when there isn't one available, instead of crashing immediately.

Originally created by @sewnie on GitHub (Mar 26, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/170 **Log and backtrace** ``` Got a panic: PanicInfo { payload: Any { .. }, message: Some( called `Result::unwrap()` on an `Err` value: SendError { .. }, ), location: Location { file: "/home/sewn/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/souvlaki-0.6.0/src/platform/mpris/dbus.rs", line: 160, col: 53, }, can_unwind: true, } ``` After spotify-player realizes there is no dbus daemon running, it should instead simply stop sending requests when there isn't one available, instead of crashing immediately.
kerem 2026-03-02 23:44:23 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Mar 26, 2023):

Looks like a third-party problem to me. It's kinda annoying sometimes when the third-party library doesn't implement error handling probably and just uses unwrap which results in panicking the whole program.

<!-- gh-comment-id:1483958784 --> @aome510 commented on GitHub (Mar 26, 2023): Looks like a third-party problem to me. It's kinda annoying sometimes when the third-party library doesn't implement error handling probably and just uses `unwrap` which results in panicking the whole program.
Author
Owner

@sewnie commented on GitHub (Mar 26, 2023):

Hmm, so its either no dbus support or contact the repository? Damn

<!-- gh-comment-id:1483959542 --> @sewnie commented on GitHub (Mar 26, 2023): Hmm, so its either no dbus support or contact the repository? Damn
Author
Owner

@aome510 commented on GitHub (Mar 26, 2023):

wdym by no dbus support? I thought the dbus still works fine. IIUC from the issue description, this issue seems to happen when the DBUS dies unexpectedly or something, which should happen rarely.

<!-- gh-comment-id:1483960366 --> @aome510 commented on GitHub (Mar 26, 2023): wdym by no dbus support? I thought the `dbus` still works fine. IIUC from the issue description, this issue seems to happen when the DBUS dies unexpectedly or something, which should happen rarely.
Author
Owner

@sewnie commented on GitHub (Mar 26, 2023):

I had no dbus session. And spotify-player was built with the features that depend on Spotify, such as mpris and notify.

<!-- gh-comment-id:1483961279 --> @sewnie commented on GitHub (Mar 26, 2023): I had no dbus session. And spotify-player was built with the features that depend on Spotify, such as mpris and notify.
Author
Owner

@aome510 commented on GitHub (Mar 26, 2023):

Wait, it used to work fine for you right? Like the notify and media-control feature. I'm not familiar with dbus, so I don't know how you have no dbus session.

<!-- gh-comment-id:1483962604 --> @aome510 commented on GitHub (Mar 26, 2023): Wait, it used to work fine for you right? Like the `notify` and `media-control` feature. I'm not familiar with `dbus`, so I don't know how you have no dbus session.
Author
Owner

@aome510 commented on GitHub (Mar 26, 2023):

FYI, spotify_player with notify and media-control still works for me on my other Ubuntu machine.

<!-- gh-comment-id:1483962685 --> @aome510 commented on GitHub (Mar 26, 2023): FYI, `spotify_player` with `notify` and `media-control` still works for me on my other Ubuntu machine.
Author
Owner

@sewnie commented on GitHub (Mar 26, 2023):

I had no dbus session.

One would revoke all possible starting sessions, a way to do this is to unset the DBUS environmental variables.

<!-- gh-comment-id:1483964013 --> @sewnie commented on GitHub (Mar 26, 2023): > I had no dbus session. One would revoke all possible starting sessions, a way to do this is to unset the DBUS environmental variables.
Author
Owner

@Sinono3 commented on GitHub (Jan 5, 2024):

This was just fixed in the latest version of Souvlaki. If dbus was not detected when attaching the media controls, it will return an error.

<!-- gh-comment-id:1879286486 --> @Sinono3 commented on GitHub (Jan 5, 2024): This was just fixed in the latest version of Souvlaki. If dbus was not detected when attaching the media controls, it will return an error.
Author
Owner

@sewnie commented on GitHub (Jan 6, 2024):

yay htanks

<!-- gh-comment-id:1879574392 --> @sewnie commented on GitHub (Jan 6, 2024): yay htanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#86
No description provided.