Repository navigation
YouTube streaming broken: HTTP 403 - proxy fetches googlevideo URLs before YouTube's ~4–5s post-issuance wait #2218
Closed
EduRomero13
started this conversation in
General
Replies: 2 comments 1 reply
|
Ain't nobody gonna read that buddy. Don't paste an essay written by claude in place of a bug report. |
0 replies
|
Read it and fix your shit
El lun, 12 de oct de 2026, 3:40 a. m., nukeop ***@***.***>
escribió:
… Ain't nobody gonna read that buddy. Don't paste an essay written by claude
in place of a bug report.
—
Reply to this email directly, view it on GitHub
<#2218?email_source=notifications&email_token=BRNM3VIBPHOQDXNBTDFXG5T5TSKGRA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOBYG43TCNJQUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-18877150>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BRNM3VPYOD5KE7RVXBAWW6L5TSKGRAVCNFSNUABHKJSXA33TNF2G64TZHM3DQOJWHA4TOOJ3IRUXGY3VONZWS33OHMYTAOJZHA2DKONBOYBA>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BRNM3VL3RENJF65626AXTBT5TSKGRA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOBYG43TCNJQUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/BRNM3VJPJ6BUX6FJMJDKPDT5TSKGRA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOBYG43TCNJQUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Since (approximately) early October 2026, YouTube rejects immediate first requests to freshly extracted
googlevideo.com/videoplaybackURLs with HTTP 403, unless the request is made ~4–5 seconds or more after the URL was issued. The URL does not expire; it is not invalid; it simply is not yet usable.yt-dlpalready handles this: its downloader always sleeps ~5s before the first media request ([download] Sleeping 5.00 seconds as required by the site...). Nuclear does not. The flow is:ytdlp_get_stream(packages/player/src-tauri/src/ytdlp.rs) runsyt-dlp -f bestaudio... --dump-jsonand returnsinfo.urlto the plugin.packages/player/src-tauri/src/stream_server.rs, port 9100).reqwest→ 403.packages/hifi/src/fmp4/openMseSession.ts) logsHeader fetch rejected with status 403; the stream URL is no longer valid— this message is incorrect: the URL is fine, it is just too young.useStreamRecoveryresolves a fresh URL and fetches it immediately again → 403 → after 2 attempts it gives up.So every YouTube track fails to play, even though search and metadata work, and even though plain
yt-dlp --test <watch-url>on the same machine/version succeeds.Environment
nuclear-player-bin 1.50.0-1(Arch Linux)nightly@2026.10.10(~/.local/share/com.nuclearplayer/ytdlp/yt-dlp_linux)nuclear-plugin-youtube@0.1.2api.Ytdlp.getStream→ same core proxy path)Evidence (reproduced on the affected machine)
Header/User-Agent and IP family were ruled out as causes:
http_headersfrom the JSON → still 403 when immediate.The URL parameters are structurally identical before and after the wait (same
c=TVHTML5, nopot=, etc.). The only variable is time since issuance.This matches the client set currently selected by yt-dlp nightlies:
_DEFAULT_CLIENTS = ('tv_samsung', 'visionos', 'web')— extraction here used thevisionosclient (c=TVHTML5in the googlevideo URL).Root cause in Nuclear code
stream_server.rsproxies with no notion of URL age and no retry-after-wait on 403:And
useStreamRecoveryretries immediately with a fresh URL, so every attempt hits the same gate.Proposed fix (minimal)
Any one of these restores playback; combining 1+2 is more robust:
stream_server.rs: on upstream 403 from agooglevideo.comURL, wait ~5–6s and retry once before returning the error. This mirrors yt-dlp's own"Sleeping 5.00 seconds as required by the site"behavior and fixes all providers that go through the proxy.ytdlp.rs/ytdlp_get_stream: after a successful--dump-jsonstream extraction (not search/playlist), sleep ~5–6s before returning the URL to the plugin, so the URL is already "aged" when the webview requests it.http_headersmap that yt-dlp already returns in the JSON (it currently includes a current Chrome UA) instead of the hardcodedChrome/138UA in the proxy client. Not the cause of this bug, but it removes another future foot-gun.the stream URL is no longer validis misleading for this class of 403; a distinct "upstream not ready / retrying after wait" path would make future reports much easier to triage.Local workaround (not for upstream, only to keep playing)
We verified the diagnosis with a local wrapper around the bundled
yt-dlp_linuxthat sleeps 6s after stream extractions (--dump-jsonwithout--flat-playlist) before returning, plus a systemd path unit that restores the wrapper whenever Nuclear's yt-dlp auto-updater overwrites it. With that wrapper, an immediate fetch of the extracted URL returns 206 instead of 403. This is only a client-side bridge; the real fix belongs in the stream server / yt-dlp command layer.Relevant log lines
Why this looked like "YouTube broke the plugin"
Search works (it only needs the video id). Metadata works (Spotify).
yt-dlp -g/--dump-jsonstill returns a URL. The URL is valid — Nuclear just spends it too early. The MSE error text then incorrectly blamed URL expiry, which sent investigations down the wrong path (headers, PO tokens, IP binding, provider plugins).Happy to test a nightly/PR that adds the wait or the retry-on-403.
All reactions