[GH-ISSUE #1537] [librespot] Playback fails with spclient HTTP 500 + tracks flagged as NonPlayable (Raspberry Pi / Raspotify) #696

Closed
opened 2026-02-27 19:32:00 +03:00 by kerem · 1 comment
Owner

Originally created by @Sem-disco on GitHub (Aug 14, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1537

[librespot] Playback fails with spclient HTTP 500 + tracks flagged as NonPlayable (Raspberry Pi / Raspotify)

Environment
• Device: Raspberry Pi (ARMv7)
• OS: Debian/Raspberry Pi OS (bullseye)
Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l
• Librespot:
• via Raspotify package: librespot 0.6.0 383a6f6 (Built on 2025-01-17, Profile: release)
• (also tried compiling the dev branch; details below)
• Raspotify: enabled as a systemd service (wrapper script raspotify_token.sh)
• Audio: 3.5mm jack (bcm2835 Headphones) — local audio works fine

aplay -l
card 0: bcm2835 HDMI 1 [...]
card 1: Headphones [bcm2835 Headphones], device 0

•	ALSA test OK:

speaker-test -c2 -D plughw:0,0 -t sine -f 440

sound plays via 3.5mm

Expected behavior
• Play playlists/tracks via Spotify Connect, audio out through 3.5mm, without service errors.

Actual behavior
• Device shows up as Connect target and receives commands from the client (iPhone).
• When trying to play, librespot fetches track metadata from multiple spclient hosts and receives HTTP 500.
• Track is flagged as NonPlayable and skipped; pattern repeats for most content.

Relevant logs (trimmed)

  1. Service active, tokens OK

[... INFO librespot_core::login5] Got auth token: Token { ... token_type: "Bearer" ... }
[... DEBUG librespot_connect::spirc] successfully pre-acquire access_token and client_token

  1. Play/volume commands arriving

[... DEBUG librespot_playback::player] command=Play
[... DEBUG librespot_playback::mixer::mappings] Input volume 62226 mapped to: 94.95%
[... DEBUG librespot_playback::mixer::alsamixer] Setting Alsa volume to 3.55 dB

  1. Metadata fetch fails (500) on multiple spclient POPs

[... DEBUG librespot_playback::player] command=Load(SpotifyId("spotify:track:7HQWMUwLQ1qg0Xbd8AG2qr"), false, 0)
[... DEBUG librespot_core::http_client] Requesting https://gae2-spclient.spotify.com:443/metadata/4/track/fd3d06f2931845d8b0e28ce190cdbb1f?product=0&country=BR&salt=...
[... DEBUG librespot_core::spclient] Error was: Err(Error { kind: Unavailable, error: StatusCode(500) })

tries other POPs:

[... INFO librespot_core::spclient] Resolved "gew1-spclient.spotify.com:443" as spclient access point
[... DEBUG librespot_core::spclient] Error was: ... StatusCode(500)
[... INFO librespot_core::spclient] Resolved "gue1-spclient.spotify.com:443" as spclient access point
[... DEBUG librespot_core::spclient] Error was: ... StatusCode(500)
[... INFO librespot_core::spclient] Resolved "guc3-spclient.spotify.com:443" as spclient access point
[... ERROR librespot_playback::player] Unable to load audio item: Error { kind: Unavailable, error: StatusCode(500) }
[... WARN librespot_playback::player] spotify:track:2EMy05KEE6JLDUSvnklzk6 is not available
[... DEBUG librespot_playback::player] Unable to preload SpotifyId("spotify:track:2EMy05KEE6JLDUSvnklzk6")

  1. Example failing playlist/track
    • Playlist: spotify:playlist:30eqrwAdj5vxvE6faMBqIm
    • Tracks (sample):
    • spotify:track:7HQWMUwLQ1qg0Xbd8AG2qr
    • spotify:track:2EMy05KEE6JLDUSvnklzk6 (“Yeshua”, Julliany Souza / AMÉM / Casa Worship)

Steps to reproduce
1. Stop raspotify and test local audio:

sudo systemctl stop raspotify
speaker-test -c2 -D plughw:0,0 -t sine -f 440 # plays fine

2.	Run librespot manually (no quiet, explicit ALSA device):

librespot
--name "TesteP2"
--backend alsa
--device plughw:0,0
--mixer alsa
--alsa-mixer-control PCM
--volume-ctrl linear
--initial-volume 95

zeroconf service published; device visible in Connect

3.	From Spotify app (iPhone), connect and press Play on any playlist.
4.	Observe logs: repeated spclient HTTP 500 on metadata/4/track and NonPlayable flags.

Already tried (no fix)
• Force P2 output (plughw:0,0), ALSA PCM mixer, linear volume control.
• raspi-config nonint do_audio 1 to default to Headphones.
• Add raspotify to audio group.
• Install librespot to both /usr/bin and /usr/lib/raspotify.
• Run librespot manually (outside service) with same audio options.
• Full toolchain update + compile dev branch of librespot; build succeeded but runtime behavior unchanged (still 500 errors).
• Tried many tracks/playlists; same 500+NonPlayable pattern.
• Network OK; librespot rotates between gae2, gew1, gue1, guc3 POPs, all return 500.

Hypothesis

This looks like a server-side regression or outage in the spclient metadata endpoint for this flow (Connect → librespot), possibly:
• Region-specific (Brazil)
• Related to token/feature flag changes
• Not caused by local audio config (auth works, ALSA works, discovery works)

Can provide if needed
• Full RUST_LOG=trace
• Packet capture (tcpdump) for spclient hosts
• Exact dev commit hash used
• Full systemctl status and journal output

Thanks!

If you want, I can also prepare shorter, more user-friendly wording for the Spotify Community so that regular users and moderators can quickly understand it’s probably a Spotify-side issue.

Quer que eu já escreva essa versão mais simples também?

Originally created by @Sem-disco on GitHub (Aug 14, 2025). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1537 [librespot] Playback fails with spclient HTTP 500 + tracks flagged as NonPlayable (Raspberry Pi / Raspotify) Environment • Device: Raspberry Pi (ARMv7) • OS: Debian/Raspberry Pi OS (bullseye) Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l • Librespot: • via Raspotify package: librespot 0.6.0 383a6f6 (Built on 2025-01-17, Profile: release) • (also tried compiling the dev branch; details below) • Raspotify: enabled as a systemd service (wrapper script raspotify_token.sh) • Audio: 3.5mm jack (bcm2835 Headphones) — local audio works fine aplay -l card 0: bcm2835 HDMI 1 [...] card 1: Headphones [bcm2835 Headphones], device 0 • ALSA test OK: speaker-test -c2 -D plughw:0,0 -t sine -f 440 # sound plays via 3.5mm Expected behavior • Play playlists/tracks via Spotify Connect, audio out through 3.5mm, without service errors. Actual behavior • Device shows up as Connect target and receives commands from the client (iPhone). • When trying to play, librespot fetches track metadata from multiple spclient hosts and receives HTTP 500. • Track is flagged as NonPlayable and skipped; pattern repeats for most content. Relevant logs (trimmed) 1) Service active, tokens OK [... INFO librespot_core::login5] Got auth token: Token { ... token_type: "Bearer" ... } [... DEBUG librespot_connect::spirc] successfully pre-acquire access_token and client_token 2) Play/volume commands arriving [... DEBUG librespot_playback::player] command=Play [... DEBUG librespot_playback::mixer::mappings] Input volume 62226 mapped to: 94.95% [... DEBUG librespot_playback::mixer::alsamixer] Setting Alsa volume to 3.55 dB 3) Metadata fetch fails (500) on multiple spclient POPs [... DEBUG librespot_playback::player] command=Load(SpotifyId("spotify:track:7HQWMUwLQ1qg0Xbd8AG2qr"), false, 0) [... DEBUG librespot_core::http_client] Requesting https://gae2-spclient.spotify.com:443/metadata/4/track/fd3d06f2931845d8b0e28ce190cdbb1f?product=0&country=BR&salt=... [... DEBUG librespot_core::spclient] Error was: Err(Error { kind: Unavailable, error: StatusCode(500) }) # tries other POPs: [... INFO librespot_core::spclient] Resolved "gew1-spclient.spotify.com:443" as spclient access point [... DEBUG librespot_core::spclient] Error was: ... StatusCode(500) [... INFO librespot_core::spclient] Resolved "gue1-spclient.spotify.com:443" as spclient access point [... DEBUG librespot_core::spclient] Error was: ... StatusCode(500) [... INFO librespot_core::spclient] Resolved "guc3-spclient.spotify.com:443" as spclient access point [... ERROR librespot_playback::player] Unable to load audio item: Error { kind: Unavailable, error: StatusCode(500) } [... WARN librespot_playback::player] <spotify:track:2EMy05KEE6JLDUSvnklzk6> is not available [... DEBUG librespot_playback::player] Unable to preload SpotifyId("spotify:track:2EMy05KEE6JLDUSvnklzk6") 4) Example failing playlist/track • Playlist: spotify:playlist:30eqrwAdj5vxvE6faMBqIm • Tracks (sample): • spotify:track:7HQWMUwLQ1qg0Xbd8AG2qr • spotify:track:2EMy05KEE6JLDUSvnklzk6 (“Yeshua”, Julliany Souza / AMÉM / Casa Worship) Steps to reproduce 1. Stop raspotify and test local audio: sudo systemctl stop raspotify speaker-test -c2 -D plughw:0,0 -t sine -f 440 # plays fine 2. Run librespot manually (no quiet, explicit ALSA device): librespot \ --name "TesteP2" \ --backend alsa \ --device plughw:0,0 \ --mixer alsa \ --alsa-mixer-control PCM \ --volume-ctrl linear \ --initial-volume 95 # zeroconf service published; device visible in Connect 3. From Spotify app (iPhone), connect and press Play on any playlist. 4. Observe logs: repeated spclient HTTP 500 on metadata/4/track and NonPlayable flags. Already tried (no fix) • Force P2 output (plughw:0,0), ALSA PCM mixer, linear volume control. • raspi-config nonint do_audio 1 to default to Headphones. • Add raspotify to audio group. • Install librespot to both /usr/bin and /usr/lib/raspotify. • Run librespot manually (outside service) with same audio options. • Full toolchain update + compile dev branch of librespot; build succeeded but runtime behavior unchanged (still 500 errors). • Tried many tracks/playlists; same 500+NonPlayable pattern. • Network OK; librespot rotates between gae2, gew1, gue1, guc3 POPs, all return 500. Hypothesis This looks like a server-side regression or outage in the spclient metadata endpoint for this flow (Connect → librespot), possibly: • Region-specific (Brazil) • Related to token/feature flag changes • Not caused by local audio config (auth works, ALSA works, discovery works) Can provide if needed • Full RUST_LOG=trace • Packet capture (tcpdump) for spclient hosts • Exact dev commit hash used • Full systemctl status and journal output Thanks! ⸻ If you want, I can also prepare shorter, more user-friendly wording for the Spotify Community so that regular users and moderators can quickly understand it’s probably a Spotify-side issue. Quer que eu já escreva essa versão mais simples também?
kerem 2026-02-27 19:32:00 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@photovoltex commented on GitHub (Aug 14, 2025):

First of all... There is a prepare issue template, use that if you want to report an issue.
Second, before creating an issue, look through previous issues. The template previously mentioned also reminds you of that. By that you would have discovered #1527 which is already resolved on the dev branch.

<!-- gh-comment-id:3188916665 --> @photovoltex commented on GitHub (Aug 14, 2025): First of all... There is a prepare issue template, use that if you want to report an issue. Second, before creating an issue, look through previous issues. The template previously mentioned also reminds you of that. By that you would have discovered #1527 which is already resolved on the `dev` branch.
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/librespot#696
No description provided.