Skip to content

Fix silent native streaming (Spotify CDN HTTP 530)#315

Merged
LargeModGames merged 4 commits into
mainfrom
fix/native-streaming-cdn530-fallback
Jun 22, 2026
Merged

Fix silent native streaming (Spotify CDN HTTP 530)#315
LargeModGames merged 4 commits into
mainfrom
fix/native-streaming-cdn530-fallback

Conversation

@LargeModGames

Copy link
Copy Markdown
Owner

Problem

Native streaming showed tracks as "playing" but produced no audio: librespot 0.8.0 logged Unable to load encrypted file: FailedPrecondition, StatusCode(530) and skipped every track.

Root cause

Spotify storage-resolve returns several CDN URLs per track. The first can return HTTP 530 (Cloudflare "origin unreachable") while the others serve valid audio. librespot 0.8.0 only falls back to the next URL on connection errors, not on a non-206 HTTP status, so it aborted on the first 530. Upstream issue #1725 / PR #1722 (open, unmerged, unreleased).

Fix

  • Point librespot at our maintained fork LargeModGames/spotatui-librespot (branch spotatui) via [patch.crates-io]. It backports PR #1722 onto the v0.8.0 tag: the 206 check moves inside the CDN-URL retry loop, so a non-206 (530) falls through to the next URL. Cargo.lock pins the exact commit.
  • Halt native playback after repeated consecutive Unavailable tracks instead of letting librespot stampede the queue (which can rate-limit the account); reword the now-stale status message.
  • CHANGELOG + README updated.

Verification

Built with default features; confirmed audible playback on a Premium account. Logs show Fetching <url> returned 530 ... trying next then a successful fetch, with no Unable to load encrypted file.

Notes

  • The slim CI build (--no-default-features --features telemetry) does not compile librespot, so the patch is unused there (harmless warning).
  • cargo install from crates.io still gets unpatched librespot (crates.io ignores [patch]); GitHub-release/CI/source builds get the fix. Drop the patch and bump the version once upstream ships a fixed librespot release.

LargeModGames and others added 4 commits June 21, 2026 23:23
Some Spotify CDN nodes return HTTP 530; librespot 0.8.0 aborts the track instead of trying the other URLs from storage-resolve, leaving native playback silent. Patch librespot to a fork that backports upstream PR #1722 (move the 206 check inside the CDN-URL retry loop). Also correct the investigation doc, whose "unfixable upstream" verdict missed the open upstream PR.
After several consecutive Unavailable tracks, pause instead of letting librespot auto-skip the whole queue at machine speed (which can rate-limit the account). Reword the escalation message and comment now that the CDN 530 cause is fixed upstream-in-fork.
@LargeModGames LargeModGames merged commit 6c126cc into main Jun 22, 2026
9 checks passed
@LargeModGames LargeModGames deleted the fix/native-streaming-cdn530-fallback branch June 22, 2026 11:16
@Tanish431

Copy link
Copy Markdown

Just wanted to say I was going to report same thing... this spotify CDN error is happening to all the songs (I am suffering from it currently) probably account related (and librespot) error... still thanks for the rate-limitation.

@LargeModGames

Copy link
Copy Markdown
Owner Author

I also had it happen to all songs, its librespot related. there currently is a PR open in the librespot repo but idk when it is going to get merged so i just forked librespot with the fix applied. this PR should fix the songs not playing

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

Successfully merging this pull request may close these issues.

2 participants