Skip to content

[Bug]: YouTube SABR playback fails on UMP Part 46 (RELOAD_PLAYER_RESPONSE) — 3-layer decode mismatch, reload UNPLAYABLE, and silent pump/watchdog stall #412

Open

Description

@Aquarius-Situla

What happened?

YouTube SABR playback fails across multiple videos (e.g. kIo2BAubO6k, 3T0ayXcUAhE, R1-j8TFlqCo) under both MWEB and WEB profiles when YouTube returns UMP part 46 (RELOAD_PLAYER_RESPONSE).

I tried debugging and patching Part 46 locally, but ran into a deeper UNPLAYABLE rejection on reload and couldn't get playback working end-to-end. I am sharing my live traces and findings below so you can hopefully take a look when you have a moment:

  1. PipePipeExtractor: SabrReloadPlayerResponse decodes 3 protobuf layers instead of 2

    • SabrReloadPlayerResponse.decode(byte[]) expects 3 nested messages (1 -> 1 -> 1), whereas live UMP part 46 only has 2 layers (parts=[46:148], wireFields=[46={1=bytes(145)}], where inner field 1 is directly the 142-byte UTF-8 token string Cj8a...%3D).
    • Treating the token string as a nested protobuf message causes ASCII '3' (0x33) to throw SabrProtocolException: Unsupported protobuf wire type: 3, which SabrResponseDecoder swallows into malformedParts without setting reloadRequested = true.
  2. PipePipeExtractor: After fixing Part 46 decoding, reloadSabrInfo returns UNPLAYABLE

    • When I patched SabrReloadPlayerResponse locally to 2 layers (malformedParts=[], reload=true), YoutubeSabrSession.maybeReload(...) called YoutubeSabrProbe.reloadSabrInfo(...) sending playbackContext.reloadPlaybackContext.reloadPlaybackParams.token.
    • /youtubei/v1/player returned HTTP 200 with playabilityStatus.status = UNPLAYABLE ("Video unavailable" / "This content isn't available."), adaptiveFormats = 0, and serverAbrStreamingUrl = null.
    • Consequently, maybeReload returns false on the very first reload (reloads=1) and throws a misleading SabrReloadException: SABR requested player reload ... (reload budget spent).
    • Additionally, maybeReload passes poTokenProvider = null (unlike rotatePendingAttestationIdentity) and does not call streamState.resetServerSessionState() or reset requestNumber.
  3. TypeType-Server: Silent pump ExtractionException & VOD watchdog retry loop

    • SabrSessionPumpLoop.kt catches ExtractionException (including SabrReloadException) and calls holder.failTerminal(error.message) without logging through SabrPumpLogger, leaving no pump error trace in server logs on initial playback (startTimeMs=0).
    • SabrVodDemandExpiration.expireInFlight interrupts with RESTART and clears the demand without counting consecutive zero-progress expirations, causing POST /sabr/playback/{sessionId} to keep polling 202 until client timeout when Part 46 is swallowed.

Steps to reproduce

  1. Attempt to play YouTube videos kIo2BAubO6k, 3T0ayXcUAhE, or R1-j8TFlqCo via SABR (reproduced under both MWEB and WEB profiles, both via typetype-token and direct YoutubeSabrProbe.fetchSabrInfo).
  2. Observe YouTube returning UMP Part 46 (RELOAD_PLAYER_RESPONSE) on n=1 (after n=0 Part 43 SABR_REDIRECT or Part 57/67/35 backoff).
  3. In unpatched code, Part 46 is swallowed as malformedParts and the player polls 202 indefinitely until timeout.
  4. With Part 46 patched to 2-layer decoding, YoutubeSabrSession.maybeReload sends playbackContext.reloadPlaybackContext.reloadPlaybackParams.token to /youtubei/v1/player and receives UNPLAYABLE (serverAbrStreamingUrl = null), failing immediately with (reload budget spent).

Area

Backend (API / extraction)

Channel

beta

Anything else?

Observed Live SABR Exchange

  • Path A (MWEB via typetype-token):
    • n=0 -> HTTP 200 UMP parts=[43:1089] (SABR_REDIRECT, urlLength=1086)
    • n=1 (to redirected URL, poTokenBytes=92) -> HTTP 200 UMP parts=[46:148] (RELOAD_PLAYER_RESPONSE, reloadPlaybackParamsTokenLength=142)
  • Path B (direct YoutubeSabrProbe.fetchSabrInfo for MWEB or WEB):
    • n=0 -> HTTP 200 UMP parts=[57:92, 67:2, 35:5]
      • 57=[type=5, scope=4, valueBytes=82, sendByDefault=true, writePolicy=2, value=timing=timestampMs=.../durationMs=4000/content=contentIdLength=23/contentType=1, signatureBytes=37, field5=2]
      • 67=[id=1]
      • 35=[backoff=4000, cookie=bytes(0)]
    • n=1 (after 4s backoff) -> HTTP 200 UMP parts=[46:148] (RELOAD_PLAYER_RESPONSE, reload=true)

Decoded reloadPlaybackParams.token Payload

Sample token (142 chars):

Cj8aAwoBASILa0lvMkJBdWJPNmsqJDNpMnUvSzlvemdseURUUy9qZ1NtSklnVUFEcjNveDFWcTU0djCQteCVnjQSJQEyjDJ5oJTjWD6MZq1_Q_dvW6YDrTBPJh4ed9vXps3v80eL_R4%3D

URL-decoding & Base64-decoding it shows valid protobuf containing the videoId, a 36-char token ID, a future expiry timestamp, and a signature.

/youtubei/v1/player Comparison (same IP, same MWEB/WEB client, visitorData, and poToken)

  • Without reloadPlaybackContext:
    • HTTP 200, playabilityStatus.status = OK, adaptiveFormats = 31 (MWEB) / 30 (WEB), serverAbrStreamingUrl = present
  • With playbackContext.reloadPlaybackContext.reloadPlaybackParams.token:
    • HTTP 200, playabilityStatus.status = UNPLAYABLE (reason: "Video unavailable", "This content isn't available."), adaptiveFormats = 0, serverAbrStreamingUrl = null
    • Reproduced across both MWEB and WEB, with same cpn vs fresh cpn, with serviceIntegrityDimensions.poToken vs without, and both with raw %3D and URLDecoder.decode-ed =.
    • (Note: If reloadPlaybackContext is placed at top-level instead of under playbackContext, /player ignores it and returns OK, but the fresh SABR session immediately hits the same 43/57 -> 46 cycle.)

Relevant Code Locations

  • PipePipeExtractor: SabrReloadPlayerResponse.java (L15–37), SabrResponseDecoder.java, YoutubeSabrSession.java (L614–647, L2013–2016), YoutubeSabrProbe.java (L780–786)
  • TypeType-Server: SabrVodDemandExpiration.kt (L6–37), SabrSessionPumpLoop.kt (L62–64)

Notes for Investigation

Based on my debugging, here are the areas that seem to be involved if you have a chance to look into it:

  1. Updating SabrReloadPlayerResponse to decode 2 protobuf layers instead of 3.
  2. Figuring out how YouTube expects the Part 57 (type=5, scope=4, contentType=1) -> Part 46 reload flow (and sabrContext) to be handled so /youtubei/v1/player returns playable streamingData instead of UNPLAYABLE, as well as passing this.poTokenProvider and resetting streamState / requestNumber in YoutubeSabrSession.maybeReload.
  3. In TypeType-Server, logging ExtractionException via SabrPumpLogger in SabrSessionPumpLoop.kt, and handling consecutive zero-progress expirations recoverably in SabrVodDemandExpiration.kt instead of polling 202 indefinitely.

Activity

  1. Priveetee commented on Nov 15, 2026

    @Priveetee
    Member

    man i dont know how u got this, but this, this is a real diamond thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendTypeType-Server API or extractionbugSomething isn't workingpriority: highHigh priority

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions