mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1537] [librespot] Playback fails with spclient HTTP 500 + tracks flagged as NonPlayable (Raspberry Pi / Raspotify) #696
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#696
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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)
[... INFO librespot_core::login5] Got auth token: Token { ... token_type: "Bearer" ... }
[... DEBUG librespot_connect::spirc] successfully pre-acquire access_token and client_token
[... 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
[... 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")
• 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
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
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?
@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
devbranch.