[GH-ISSUE #496] Can only play audio via Spotifyd (can't use librespot to create a device) #1216

Closed
opened 2026-03-14 13:58:54 +03:00 by kerem · 10 comments
Owner

Originally created by @platorotto on GitHub (Jul 8, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/496

Describe the bug
I've been trying to get to play audio via the terminal using the spotify-player AUR binary but I can't seem to find the spotify-player device in the devices tab. I already added my own client_id so I can control the music if it's playing in another device, hence, I've been using the spotifyd daemon to make it work.
Not sure if I'm missing something or it should work out of the box. I've already re-read the config.md but it still doesn't work. Maybe the streaming tab could help but I already downloaded librespot directly from the AUR and it's the same.

Expected behaviour
Play audio via the spotify-player device in spotify connect.

Screenshots
If spotifyd isn't on, this is what it shows.
1720403986

Environment

  • OS: ArchLinux
  • Application version: 0.18.2
  • Application features: pulseaudio-backend
Originally created by @platorotto on GitHub (Jul 8, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/496 **Describe the bug** I've been trying to get to play audio via the terminal using the spotify-player AUR binary but I can't seem to find the `spotify-player` device in the devices tab. I already added my own `client_id` so I can control the music if it's playing in another device, hence, I've been using the `spotifyd` daemon to make it work. Not sure if I'm missing something or it should work out of the box. I've already re-read the [config.md](https://github.com/aome510/spotify-player/blob/master/docs/config.md#general) but it still doesn't work. Maybe the [streaming](https://github.com/aome510/spotify-player/blob/master/docs/config.md#general) tab could help but I already downloaded librespot directly from the AUR and it's the same. **Expected behaviour** Play audio via the `spotify-player` device in spotify connect. **Screenshots** If spotifyd isn't on, this is what it shows. ![1720403986](https://github.com/aome510/spotify-player/assets/172345025/ad7406ec-3757-455c-8843-b5a5d7cbc1ed) **Environment** - OS: ArchLinux - Application version: 0.18.2 - Application features: pulseaudio-backend
kerem 2026-03-14 13:58:54 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Jul 8, 2024):

Maybe related to https://github.com/aome510/spotify-player/issues/463

Not sure if I'm missing something or it should work out of the box

It should work out of the box. Can you share logs/backtraces if applicable?

Tbf, it's difficult for me to debug this kind of streaming issue because I cannot reproduce the error on my end. Normally, it happened because of some broken/missing system dependencies and is specific to each user's environment.

I would suggest you try other audio backends as described in https://github.com/aome510/spotify-player?tab=readme-ov-file#audio-backend to find one that works

<!-- gh-comment-id:2212862946 --> @aome510 commented on GitHub (Jul 8, 2024): Maybe related to https://github.com/aome510/spotify-player/issues/463 > Not sure if I'm missing something or it should work out of the box It should work out of the box. Can you share [logs/backtraces ](https://github.com/aome510/spotify-player?tab=readme-ov-file#logging) if applicable? Tbf, it's difficult for me to debug this kind of streaming issue because I cannot reproduce the error on my end. Normally, it happened because of some broken/missing system dependencies and is specific to each user's environment. I would suggest you try other audio backends as described in https://github.com/aome510/spotify-player?tab=readme-ov-file#audio-backend to find one that works
Author
Owner

@aome510 commented on GitHub (Jul 8, 2024):

Note that spotifyd and spotify_player use the same library to handle streaming, so it's very weird that one works but another doesn't. What audio backend does spotifyd use?

<!-- gh-comment-id:2212865319 --> @aome510 commented on GitHub (Jul 8, 2024): Note that `spotifyd` and `spotify_player` use [the same library](https://github.com/librespot-org/librespot) to handle streaming, so it's very weird that one works but another doesn't. What audio backend does `spotifyd` use?
Author
Owner

@platorotto commented on GitHub (Jul 8, 2024):

Note that spotifyd and spotify_player use the same library to handle streaming, so it's very weird that one works but another doesn't. What audio backend does spotifyd use?

do you mind showing me how to check for the spotifyd backend?

first I downloaded the AUR binary the normal way, I suppose it came with the rodio-backend but when I checked the streaming tab i tried cargo install spotify_player --no-default-features --features pulseaudio-backend

edit: adding the second paragraph

<!-- gh-comment-id:2212868583 --> @platorotto commented on GitHub (Jul 8, 2024): > Note that `spotifyd` and `spotify_player` use [the same library](https://github.com/librespot-org/librespot) to handle streaming, so it's very weird that one works but another doesn't. What audio backend does `spotifyd` use? do you mind showing me how to check for the spotifyd backend? first I downloaded the AUR binary the normal way, I suppose it came with the `rodio-backend` but when I checked the [streaming tab](https://github.com/aome510/spotify-player?tab=readme-ov-file#streaming) i tried `cargo install spotify_player --no-default-features --features pulseaudio-backend` edit: adding the second paragraph
Author
Owner

@platorotto commented on GitHub (Jul 8, 2024):

It should work out of the box. Can you share logs/backtraces if applicable?

This is it. I don't think there's anything memorable since the first line is the config and it only shows the that there was no playback device available.
1720406067

I would suggest you try other audio backends as described in https://github.com/aome510/spotify-player?tab=readme-ov-file#audio-backend to find one that works

i'll try the one spotifyd says

<!-- gh-comment-id:2212870927 --> @platorotto commented on GitHub (Jul 8, 2024): > It should work out of the box. Can you share [logs/backtraces ](https://github.com/aome510/spotify-player?tab=readme-ov-file#logging) if applicable? This is it. I don't think there's anything memorable since the first line is the config and it only shows the that there was no playback device available. ![1720406067](https://github.com/aome510/spotify-player/assets/172345025/304be153-a011-49a0-8d4a-83dcb1e6e6c1) > I would suggest you try other audio backends as described in https://github.com/aome510/spotify-player?tab=readme-ov-file#audio-backend to find one that works i'll try the one spotifyd says
Author
Owner

@platorotto commented on GitHub (Jul 8, 2024):

Note that spotifyd and spotify_player use the same library to handle streaming, so it's very weird that one works but another doesn't. What audio backend does spotifyd use?

i just checked. spotifyd uses pulseaudio so there must be something i did wrong. do you recommend uninstalling and reinstalling? if so, should I do it via cargo or aur?

<!-- gh-comment-id:2212877469 --> @platorotto commented on GitHub (Jul 8, 2024): > Note that `spotifyd` and `spotify_player` use [the same library](https://github.com/librespot-org/librespot) to handle streaming, so it's very weird that one works but another doesn't. What audio backend does `spotifyd` use? i just checked. spotifyd uses pulseaudio so there must be something i did wrong. do you recommend uninstalling and reinstalling? if so, should I do it via cargo or aur?
Author
Owner

@aome510 commented on GitHub (Jul 8, 2024):

if so, should I do it via cargo or aur?

Did it work with aur before with the rodio backend? Otherwise, you can try to install with default features from cargo with cargo install spotify_player.

The linked log looks wrong to me. There should be a step to initialize the integrated player after getting token, for example:

2024-07-08T02:39:20.664290Z  INFO spotify_player::token: Got new token: Token { access_token: "$TOKEN", expires_in: TimeDelta { secs: 3600, nanos: 0 }, expires_at: Some(2024-07-08T03:39:20.664253Z), refresh_token: None, scopes: {} }
2024-07-08T02:39:20.665227Z  INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name: "spotify-player", device_type: Speaker, initial_volume: Some(45875), has_volume_ctrl: true, autoplay: false }
2024-07-08T02:39:20.666979Z  INFO spotify_player::streaming: Initializing a new integrated player with device_id=4853b9db-96c0-4278-b8e1-bf686f3dd22a
2024-07-08T02:39:20.667182Z  INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spirc protocol

Look like the app is run w/o any audio device 🤔 . Can you try re-install?

<!-- gh-comment-id:2212885479 --> @aome510 commented on GitHub (Jul 8, 2024): > if so, should I do it via cargo or aur? Did it work with `aur` before with the `rodio` backend? Otherwise, you can try to install with default features from `cargo` with `cargo install spotify_player`. The linked log looks wrong to me. There should be a step to initialize the integrated player after getting token, for example: ``` 2024-07-08T02:39:20.664290Z INFO spotify_player::token: Got new token: Token { access_token: "$TOKEN", expires_in: TimeDelta { secs: 3600, nanos: 0 }, expires_at: Some(2024-07-08T03:39:20.664253Z), refresh_token: None, scopes: {} } 2024-07-08T02:39:20.665227Z INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name: "spotify-player", device_type: Speaker, initial_volume: Some(45875), has_volume_ctrl: true, autoplay: false } 2024-07-08T02:39:20.666979Z INFO spotify_player::streaming: Initializing a new integrated player with device_id=4853b9db-96c0-4278-b8e1-bf686f3dd22a 2024-07-08T02:39:20.667182Z INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spirc protocol ``` Look like the app is run w/o any audio device 🤔 . Can you try re-install?
Author
Owner

@aome510 commented on GitHub (Jul 8, 2024):

Also, can you make sure that the correct binary with correct set of features is run? From the above log, it seems that you run the binary installed by cargo install spotify_player --no-default-features

<!-- gh-comment-id:2212887241 --> @aome510 commented on GitHub (Jul 8, 2024): Also, can you make sure that the correct binary with correct set of features is run? From the above log, it seems that you run the binary installed by `cargo install spotify_player --no-default-features`
Author
Owner

@platorotto commented on GitHub (Jul 8, 2024):

Also, can you make sure that the correct binary with correct set of features is run? From the above log, it seems that you run the binary installed by cargo install spotify_player --no-default-features

okay, i removed everything and redownloaded using cargo install spotify_player --no-default-features --features pulseaudio-backend but I'm stuck with a cargo problem. I'm getting this error warning: be sure to add /home/alejandro/.cargo/bin to your PATH to be able to run the installed binaries and I'm not quite sure how to fix it. I'm a noob with bash stuff and I'm using zsh as of rn

<!-- gh-comment-id:2212916197 --> @platorotto commented on GitHub (Jul 8, 2024): > Also, can you make sure that the correct binary with correct set of features is run? From the above log, it seems that you run the binary installed by `cargo install spotify_player --no-default-features` okay, i removed everything and redownloaded using `cargo install spotify_player --no-default-features --features pulseaudio-backend` but I'm stuck with a cargo problem. I'm getting this error `warning: be sure to add /home/alejandro/.cargo/bin to your PATH to be able to run the installed binaries` and I'm not quite sure how to fix it. I'm a noob with bash stuff and I'm using zsh as of rn
Author
Owner

@aome510 commented on GitHub (Jul 8, 2024):

Oh it's not an error but just a warning, so that you can run the downloaded binary with spotify_player. You can update $PATH by adding export PATH="$HOME/.cargo/bin:$PATH" to your .zshrc. You should also be able to run the binary directly with ./home/alejandro/.cargo/bin/spotify_player

<!-- gh-comment-id:2212919305 --> @aome510 commented on GitHub (Jul 8, 2024): Oh it's not an error but just a warning, so that you can run the downloaded binary with `spotify_player`. You can update `$PATH` by adding `export PATH="$HOME/.cargo/bin:$PATH"` to your `.zshrc`. You should also be able to run the binary directly with `./home/alejandro/.cargo/bin/spotify_player`
Author
Owner

@platorotto commented on GitHub (Jul 8, 2024):

Oh it's not an error but just a warning, so that you can run the downloaded binary with spotify_player. You can update $PATH by adding export PATH="$HOME/.cargo/bin:$PATH" to your .zshrc. You should also be able to run the binary directly with ./home/alejandro/.cargo/bin/spotify_player

Fixed it! I added that to .zshrc, relogged and it worked. Thanks!!

<!-- gh-comment-id:2212926210 --> @platorotto commented on GitHub (Jul 8, 2024): > Oh it's not an error but just a warning, so that you can run the downloaded binary with `spotify_player`. You can update `$PATH` by adding `export PATH="$HOME/.cargo/bin:$PATH"` to your `.zshrc`. You should also be able to run the binary directly with `./home/alejandro/.cargo/bin/spotify_player` Fixed it! I added that to `.zshrc`, relogged and it worked. Thanks!!
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#1216
No description provided.