fix(lavalink): pin youtube-plugin to the snapshot carrying the TV User-Agent fix - #40
Merged
Merged
Conversation
…r-Agent fix Around 2026-08-18 YouTube began rejecting Cobalt-family User-Agents on the TVHTML5 player endpoint, answering `UNPLAYABLE` with `reason = "The page needs to be reloaded."` TV is the only OAuth-capable client, so this takes out authenticated playback entirely: with a valid refresh token applied and TVHTML5 tried first, /play still joins the channel and stays silent. Reported upstream as #226, with a controlled reproduction showing the User-Agent is the sole trigger - any Cobalt UA yields UNPLAYABLE and 0 formats, a PlayStation 4 UA yields OK and 27 formats, with client version, params and signatureTimestamp held constant. Fixed upstream by #233, merged 2026-08-19, but no release carries it: 1.18.2 is from 2026-07-27. Pinning the merge commit's descendant (f45bbb7a, which also carries #235) is the only way to get the fix today. Snapshot builds are published per commit, so the pin is exact and reproducible. Verified against Lavalink 4.2.2 by driving a player over REST/WebSocket: the snapshot downloads and loads, TVHTML5 resolves and initialises, and the TVHTML5 failure changes from "The page needs to be reloaded" to a later-stage error, confirming the request now gets past the playability check that was blocking it. The authenticated path cannot be verified here without using the deployment's own account. Also document that bot code changes need `docker compose up -d --build bot`, since `--force-recreate lavalink` restarts Lavalink alone and a plain `up -d bot` reuses the existing image - a pulled fix to src/ can otherwise sit undeployed with no visible sign beyond the CREATED column in `docker compose ps`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After #39 the OAuth setup is correct and live — Lavalink logs
YouTube access token refreshed successfullyat startup and triesTVHTML5first — and/playstill joins the channel and plays nothing:This is not a configuration problem. Around 2026-08-18 YouTube began rejecting Cobalt-family User-Agents on the TVHTML5 player endpoint, answering
UNPLAYABLEwithreason = "The page needs to be reloaded."SinceTVis the only OAuth-capable client, that takes out authenticated playback outright — a valid refresh token buys nothing, because the one client that would send it is refused before it gets to the formats.Upstream #226 carries a controlled reproduction isolating the User-Agent as the sole trigger: holding client name, version,
paramsandsignatureTimestampconstant, any Cobalt UA yieldsUNPLAYABLEwith 0 formats, while a PlayStation 4 UA yieldsOKwith 27.Fix
#233 switches the TV client to a PlayStation 4 User-Agent. It was merged 2026-08-19 — but no release carries it: 1.18.2 is from 2026-07-27, three weeks earlier. Pinning a snapshot is the only way to get the fix today.
The pin is
f45bbb7a, the currentmaintip, which carries #233 plus #235 (recover total length whencontentLengthis omitted). Snapshot builds are published per commit, so the pin is exact and reproducible rather than a floating-SNAPSHOT.The comment in
application.ymland the new docs section both say to return to a released version once one ships the fix (>= 1.18.3), so this does not quietly become permanent.Verification
Driven against Lavalink 4.2.2 over REST/WebSocket:
TVHTML5present in the client list.TVHTML5failure changes from "The page needs to be reloaded" to a later-stage error, confirming the request now clears the playability check that was blocking it.The authenticated path cannot be verified here — that needs the deployment's own linked account, which is not mine to use. If playback still fails after this, the next error will be from a later stage and the documented remedy is a remote cipher server (yt-cipher,
plugins.youtube.remoteCipher), which is what the person who diagnosed #226 runs.Also
Documents that bot code changes need
docker compose up -d --build bot.--force-recreate lavalinkrestarts Lavalink alone and a plainup -d botreuses the existing image, so a pulled fix tosrc/can sit undeployed with no visible sign beyond theCREATEDcolumn indocker compose ps— which is exactly what happened to #39's playback-failure notice on the live deployment.🤖 Generated with Claude Code