[GH-ISSUE #1173] Errors when downloading from YouTube #9607

Closed
opened 2026-04-24 15:48:15 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @wukko on GitHub (Mar 19, 2025).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/1173

approx a week ago youtube pushed an update that enforced the po token for ±all googlevideo links from the android client, so we switched to the ios client to go around it on the main instance. today, it seems like youtube increased the ratio of an a/b test that makes the current ios client fail the precondition check when requesting the player (due to an old client version, now confirmed).

in cobalt it's displayed as this error (error.api.fetch.fail):

Image

if you log the actual error from youtube.js, you see this:

InnertubeError: Request to https://www.youtube.com/youtubei/v1/player?prettyPrint=false&alt=json failed with status 400
{
  "error": {
    "code": 400,
    "message": "Precondition check failed.",
    "errors": [
      {
        "message": "Precondition check failed.",
        "domain": "global",
        "reason": "failedPrecondition"
      }
    ],
    "status": "FAILED_PRECONDITION"
  }
}

any help is very welcome!

Originally created by @wukko on GitHub (Mar 19, 2025). Original GitHub issue: https://github.com/imputnet/cobalt/issues/1173 approx a week ago youtube pushed an update that enforced the po token for ±all googlevideo links from the android client, so we switched to the ios client to go around it on the main instance. today, it seems like youtube increased the ratio of an a/b test that makes the current ios client fail the precondition check when requesting the player (due to an old client version, now confirmed). in cobalt it's displayed as this error (`error.api.fetch.fail`): <img width="469" alt="Image" src="https://github.com/user-attachments/assets/4cfec4c6-2d64-454a-8961-ee85a1fd41ad" /> if you log the actual error from youtube.js, you see this: ``` InnertubeError: Request to https://www.youtube.com/youtubei/v1/player?prettyPrint=false&alt=json failed with status 400 { "error": { "code": 400, "message": "Precondition check failed.", "errors": [ { "message": "Precondition check failed.", "domain": "global", "reason": "failedPrecondition" } ], "status": "FAILED_PRECONDITION" } } ``` any help is very welcome!
GiteaMirror added the main instance issuebug labels 2026-04-24 15:48:15 -05:00
Author
Owner

@CimkNoYAP commented on GitHub (Mar 19, 2025):

yeah same, im getting this issue too, wonder when they realize lol

<!-- gh-comment-id:2735938258 --> @CimkNoYAP commented on GitHub (Mar 19, 2025): yeah same, im getting this issue too, wonder when they realize lol
Author
Owner

@CimkNoYAP commented on GitHub (Mar 19, 2025):

NVM I TRIED TO DO IT LIKE 5 TIMES IDDNT WORK AND THEN I WENT TO THIS PAGE WROTE THE BEFORE COMMENT, WENT BACK TO TRY AGAIN AND IT WORKED... you just gotta fiddle with it rn

<!-- gh-comment-id:2735944608 --> @CimkNoYAP commented on GitHub (Mar 19, 2025): NVM I TRIED TO DO IT LIKE 5 TIMES IDDNT WORK AND THEN I WENT TO THIS PAGE WROTE THE BEFORE COMMENT, WENT BACK TO TRY AGAIN AND IT WORKED... you just gotta fiddle with it rn
Author
Owner

@rubiopedro commented on GitHub (Mar 19, 2025):

you can generate po_token/visitor_data using BgUtils

that way, it will be generated in the API itself instead of using an external service which can make hosting instances a bit complex

<!-- gh-comment-id:2737603295 --> @rubiopedro commented on GitHub (Mar 19, 2025): you can generate po_token/visitor_data using [BgUtils](https://github.com/LuanRT/BgUtils) that way, it will be generated in the API itself instead of using an external service which can make hosting instances a bit complex
Author
Owner

@wukko commented on GitHub (Mar 19, 2025):

you can generate po_token/visitor_data using BgUtils

you're welcome to make a pull request!

<!-- gh-comment-id:2737607821 --> @wukko commented on GitHub (Mar 19, 2025): > you can generate po_token/visitor_data using [BgUtils](https://github.com/LuanRT/BgUtils) you're welcome to make a pull request!
Author
Owner

@OriDiwa commented on GitHub (Mar 19, 2025):

I'm also having this issue with this video: https://www.youtube.com/watch?v=Px-NQmdeeGU

<!-- gh-comment-id:2737630914 --> @OriDiwa commented on GitHub (Mar 19, 2025): I'm also having this issue with this video: https://www.youtube.com/watch?v=Px-NQmdeeGU
Sign in to join this conversation.