Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.0.0 - InnertubeError: VideoAttributeView not found! #534

Closed
4 tasks done
gtas843 opened this issue Nov 2, 2023 · 1 comment · Fixed by #531
Closed
4 tasks done

7.0.0 - InnertubeError: VideoAttributeView not found! #534

gtas843 opened this issue Nov 2, 2023 · 1 comment · Fixed by #531
Labels
bug Something isn't working

Comments

@gtas843
Copy link

gtas843 commented Nov 2, 2023

Steps to reproduce

  1. getInfo(video_id)
  2. I use age-restricted video id from Rihanna => vr1VMr28ldo

Failure Logs

InnertubeError: VideoAttributeView 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 VideoAttributeView extends YTNode {
  static type = 'VideoAttributeView';

  image: {
    sources: {
      0: {
        url: string
      }
    }
  };
  image_style: string;
  title: string;
  subtitle: string;
  secondary_subtitle: {
    content: string
  };
  orientation: string;
  sizing_rule: string;
  overflow_menu_on_tap: {
    innertube_command: NavigationEndpoint
  };
  overflow_menu_a11y_label: string;
  logging_directives: {
    tracking_params: string,
    visibility: {
      types: string
    },
    enable_displaylogger_experiment: boolean
  };

  constructor(data: RawNode) {
    super();
    this.image = {
      sources: {
        0: {
          url: data.image.sources.0.url
        }
      }
    };
    this.image_style = data.imageStyle;
    this.title = data.title;
    this.subtitle = data.subtitle;
    this.secondary_subtitle = {
      content: data.secondarySubtitle.content
    };
    this.orientation = data.orientation;
    this.sizing_rule = data.sizingRule;
    this.overflow_menu_on_tap = {
      innertube_command: new NavigationEndpoint(data.overflowMenuOnTap.innertubeCommand)
    };
    this.overflow_menu_a11y_label = data.overflowMenuA11yLabel;
    this.logging_directives = {
      tracking_params: data.loggingDirectives.trackingParams,
      visibility: {
        types: data.loggingDirectives.visibility.types
      },
      enable_displaylogger_experiment: data.loggingDirectives.enableDisplayloggerExperiment
    };
  }
}

    at ERROR_HANDLER (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10488:20)
    at createRuntimeClass (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:9968:3)
    at generateRuntimeClass (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10011:19)
    at parseItem (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10754:75)
    at Object.parseArray (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10796:22)
    at new HorizontalCardList (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:1351:33)
    at parseItem (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10776:22)
    at Object.parseArray (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10796:22)
    at new StructuredDescriptionContent (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:1570:33)
    at Object.parseItem (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10776:22) {
  date: 2023-11-02T01:37:21.087Z,
  version: '7.0.0'
}
ParsingError: Type mismatch, got VideoAttributeView expected SearchRefinementCard | MacroMarkersListItem | GameCard | VideoCard.
    at ERROR_HANDLER (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10477:20)
    at parseItem (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10758:13)
    at Object.parseArray (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10796:22)
    at new HorizontalCardList (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:1351:33)
    at parseItem (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10776:22)
    at Object.parseArray (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10796:22)
    at new StructuredDescriptionContent (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:1570:33)
    at Object.parseItem (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10776:22)
    at new EngagementPanelSectionList (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:1591:35)
    at parseItem (D:\xampp\htdocs\node_modules\.pnpm\y[email protected]\node_modules\youtubei.js\bundle\node.cjs:10776:22) {
  info: {
    image: { sources: [Array] },
    imageStyle: 'VIDEO_ATTRIBUTE_IMAGE_STYLE_SQUARE',
    title: 'Bitch Better Have My Money',
    subtitle: 'Rihanna',
    secondarySubtitle: { content: 'Bitch Better Have My Money' },
    orientation: 'VIDEO_ATTRIBUTE_ORIENTATION_HORIZONTAL',
    sizingRule: 'VIDEO_ATTRIBUTE_SIZING_RULE_RESPONSIVE',
    overflowMenuOnTap: { innertubeCommand: [Object] },
    overflowMenuA11yLabel: 'More actions',
    loggingDirectives: {
      trackingParams: 'CCgQyMoHGAAiEwiixZDzlqSCAxVEqksFHbhfAm4=',
      visibility: [Object],
      enableDisplayloggerExperiment: true
    }
  },
  date: 2023-11-02T01:37:21.093Z,
  version: '7.0.0'
}

Expected behavior

A json response with no error

Current behavior

Got error it say's it was a bug

Version

Default

Anything else?

No response

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.
@gtas843 gtas843 added the bug Something isn't working label Nov 2, 2023
@JellyBrick
Copy link
Contributor

It should fixed in #531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants