Skip to content

14.0.0 - Error: PlayerCaptchaView not found! #978

@Fijxu

Description

@Fijxu

Steps to reproduce

Hard to reproduce, is inconsistent and it only happens on a set of IP addresses for a while, so this seems to be A/B testing.

Failure Logs

[YOUTUBEJS][Parser]: Error: PlayerCaptchaView not found!
This is a bug, want to help us fix it? Follow the instructions at https://github.com/LuanRT/YouTube.js/blob/main/docs/updating-the-parser.md or report it at https://github.com/LuanRT/YouTube.js/issues!
Introspected and JIT generated this class in the meantime:
class PlayerCaptchaView extends YTNode {
  static type = 'PlayerCaptchaView';

  captcha_loading_message: {
    content: string,
    style_runs: {
      start_index: number,
      length: number
    }[]
  };
  challenge_reason: {
    content: string,
    style_runs: {
      start_index: number,
      length: number
    }[]
  };
  captcha_successful_message: {
    content: string,
    style_runs: {
      start_index: number,
      length: number
    }[]
  };
  captcha_cookie_set_failure_message: {
    content: string,
    style_runs: {
      start_index: number,
      length: number
    }[]
  };
  captcha_failed_message: {
    content: string,
    style_runs: {
      start_index: number,
      length: number
    }[]
  };

  constructor(data: RawNode) {
    super();
    this.captcha_loading_message = {
      content: data.captchaLoadingMessage.content,
      style_runs: data.captchaLoadingMessage.styleRuns.map((item: any) => ({
        start_index: item.startIndex,
        length: item.length
      }))
    };
    this.challenge_reason = {
      content: data.challengeReason.content,
      style_runs: data.challengeReason.styleRuns.map((item: any) => ({
        start_index: item.startIndex,
        length: item.length
      }))
    };
    this.captcha_successful_message = {
      content: data.captchaSuccessfulMessage.content,
      style_runs: data.captchaSuccessfulMessage.styleRuns.map((item: any) => ({
        start_index: item.startIndex,
        length: item.length
      }))
    };
    this.captcha_cookie_set_failure_message = {
      content: data.captchaCookieSetFailureMessage.content,
      style_runs: data.captchaCookieSetFailureMessage.styleRuns.map((item: any) => ({
        start_index: item.startIndex,
        length: item.length
      }))
    };
    this.captcha_failed_message = {
      content: data.captchaFailedMessage.content,
      style_runs: data.captchaFailedMessage.styleRuns.map((item: any) => ({
        start_index: item.startIndex,
        length: item.length
      }))
    };
  }
}

    at ERROR_HANDLER (https://cdn.jsdelivr.net/gh/LuanRT/YouTube.js@v14.0.0-deno/deno/src/parser/parser.ts:140:9)
    at createRuntimeClass (https://cdn.jsdelivr.net/gh/LuanRT/YouTube.js@v14.0.0-deno/deno/src/parser/generator.ts:412:3)
    at generateRuntimeClass (https://cdn.jsdelivr.net/gh/LuanRT/YouTube.js@v14.0.0-deno/deno/src/parser/generator.ts:480:19)
    at parseItem (https://cdn.jsdelivr.net/gh/LuanRT/YouTube.js@v14.0.0-deno/deno/src/parser/parser.ts:553:9)
    at Module.parseResponse (https://cdn.jsdelivr.net/gh/LuanRT/YouTube.js@v14.0.0-deno/deno/src/parser/parser.ts:392:19)
    at new MediaInfo (https://cdn.jsdelivr.net/gh/LuanRT/YouTube.js@v14.0.0-deno/deno/src/core/mixins/MediaInfo.ts:52:25)
    at new VideoInfo (https://cdn.jsdelivr.net/gh/LuanRT/YouTube.js@v14.0.0-deno/deno/src/parser/youtube/VideoInfo.ts:55:5)
    at youtubePlayerParsing (file:///tmp/deno-compile-invidious_companion/src/lib/helpers/youtubePlayerHandling.ts:84:23)
    at eventLoopTick (ext:core/01_core.js:178:7)
    at async checkToken (file:///tmp/deno-compile-invidious_companion/src/lib/jobs/potoken.ts:164:47) {
  date: 2025-06-12T20:21:21.189Z,
  version: "14.0.0",
  info: undefined
}

Expected behavior

Youtube player response returns OK playabilityStatus.status.

Current behavior

playabilityStatus looks like this, returning a Captcha:

  "playabilityStatus": {
    "status": "UNPLAYABLE",
    "reason": "Video unavailable",
    "errorScreen": {
      "playerCaptchaViewModel": {
        "captchaLoadingMessage": {
          "content": "To continue, complete the task below",
          "styleRuns": [
            {
              "startIndex": 0,
              "length": 36
            }
          ]
        },
        "challengeReason": {
          "content": "To continue, complete the task below",
          "styleRuns": [
            {
              "startIndex": 0,
              "length": 36
            }
          ]
        },
        "captchaSuccessfulMessage": {
          "content": "To continue, complete the task below",
          "styleRuns": [
            {
              "startIndex": 0,
              "length": 36
            }
          ]
        },
        "captchaCookieSetFailureMessage": {
          "content": "Please enable cookies and try again",
          "styleRuns": [
            {
              "startIndex": 0,
              "length": 35
            }
          ]
        },
        "captchaFailedMessage": {
          "content": "Something went wrong",
          "styleRuns": [
            {
              "startIndex": 0,
              "length": 20
            }
          ]
        },
        "accessibility": {
          "accessibilityData": {
            "label": "Video playback paused with a verification dialog."
          }
        }
      }
    },
    "contextParams": "Q0FFU0FnZ0M="
  },

playerCaptchaResponse2.json

Version

Default

Anything else?

Detected while using https://github.com/iv-org/invidious-companion

yt-dlp handled it like this: yt-dlp/yt-dlp#12939

JIT generated class here: Fijxu@a0309bb

Checklist

  • I am running the latest version.
  • I checked the documentation and found no answer.
  • I have searched the existing issues and made sure this is not a duplicate.
  • I have provided sufficient information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions