Skip to content

fix(lavalink): pin youtube-plugin to the snapshot carrying the TV User-Agent fix - #40

Merged
Magalvo merged 1 commit into
mainfrom
fix/youtube-plugin-tv-user-agent-snapshot
Aug 22, 2026
Merged

fix(lavalink): pin youtube-plugin to the snapshot carrying the TV User-Agent fix#40
Magalvo merged 1 commit into
mainfrom
fix/youtube-plugin-tv-user-agent-snapshot

Conversation

@Magalvo

@Magalvo Magalvo commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Problem

After #39 the OAuth setup is correct and live — Lavalink logs YouTube access token refreshed successfully at startup and tries TVHTML5 first — and /play still joins the channel and plays nothing:

Client [TVHTML5] failed: The page needs to be reloaded.
Client [ANDROID_VR] failed: This video requires login.
Client [WEB] failed: No supported audio streams available, available types:
Client [WEB_EMBEDDED_PLAYER] failed: Video player configuration error

This is not a configuration problem. 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." Since TV is 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, params and signatureTimestamp constant, any Cobalt UA yields UNPLAYABLE with 0 formats, while a PlayStation 4 UA yields OK with 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 current main tip, which carries #233 plus #235 (recover total length when contentLength is omitted). Snapshot builds are published per commit, so the pin is exact and reproducible rather than a floating -SNAPSHOT.

The comment in application.yml and 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:

  • The snapshot downloads from the snapshots repository, loads, and initialises with TVHTML5 present in the client list.
  • The TVHTML5 failure 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 lavalink restarts Lavalink alone and a plain up -d bot reuses the existing image, so a pulled fix to src/ can sit undeployed with no visible sign beyond the CREATED column in docker compose ps — which is exactly what happened to #39's playback-failure notice on the live deployment.

🤖 Generated with Claude Code

…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>
@Magalvo
Magalvo merged commit 38c6b81 into main Aug 22, 2026
2 checks passed
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.

1 participant