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

10.0.0 [YOUTUBEJS][Parser]: InnertubeError: MiniGameCardView not found! #685

Closed
3 of 4 tasks
iBicha opened this issue Jul 10, 2024 · 3 comments · Fixed by #692
Closed
3 of 4 tasks

10.0.0 [YOUTUBEJS][Parser]: InnertubeError: MiniGameCardView not found! #685

iBicha opened this issue Jul 10, 2024 · 3 comments · Fixed by #692
Labels
bug Something isn't working

Comments

@iBicha
Copy link
Contributor

iBicha commented Jul 10, 2024

Steps to reproduce

Getting home feed

const feed = await innertube.getHomeFeed();

Failure Logs

[YOUTUBEJS][Parser]: InnertubeError: MiniGameCardView 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 MiniGameCardView extends YTNode {
  static type = 'MiniGameCardView';

  image: {
    sources: {
      url: string,
      width: number,
      height: number
    }[]
  };
  title: string;
  genre: string;
  on_tap: {
    innertube_command: NavigationEndpoint
  };
  accessibility_text: string;
  overflow_button: YTNodes.ButtonView | null;
  layout: string;
  color_palette: {
    text_primary_color: number,
    section_two_color: number,
    section_four_color: number
  };
  action_button: YTNodes.ButtonView | null;
  style: string;
  inline_playback_experiments: {
    enable_simplified_android_ui: boolean,
    disable_cinematic_container: boolean,
    enable_squared_thumbnails: boolean
  };
  index_in_shelf: number;
  logging_directives: {
    tracking_params: string,
    visibility: {
      types: string
    },
    gestures: {
      types: string
    },
    enable_displaylogger_experiment: boolean
  };

  constructor(data: RawNode) {
    super();
    this.image = {
      sources: data.image.sources.map((item: any) => ({
        url: item.url,
        width: item.width,
        height: item.height
      }))
    };
    this.title = data.title;
    this.genre = data.genre;
    this.on_tap = {
      innertube_command: new NavigationEndpoint(data.onTap.innertubeCommand)
    };
    this.accessibility_text = data.accessibilityText;
    this.overflow_button = Parser.parseItem(data.overflowButton, YTNodes.ButtonView);
    this.layout = data.layout;
    this.color_palette = {
      text_primary_color: data.colorPalette.textPrimaryColor,
      section_two_color: data.colorPalette.sectionTwoColor,
      section_four_color: data.colorPalette.sectionFourColor
    };
    this.action_button = Parser.parseItem(data.actionButton, YTNodes.ButtonView);
    this.style = data.style;
    this.inline_playback_experiments = {
      enable_simplified_android_ui: data.inlinePlaybackExperiments.enableSimplifiedAndroidUi,
      disable_cinematic_container: data.inlinePlaybackExperiments.disableCinematicContainer,
      enable_squared_thumbnails: data.inlinePlaybackExperiments.enableSquaredThumbnails
    };
    this.index_in_shelf = data.indexInShelf;
    this.logging_directives = {
      tracking_params: data.loggingDirectives.trackingParams,
      visibility: {
        types: data.loggingDirectives.visibility.types
      },
      gestures: {
        types: data.loggingDirectives.gestures.types
      },
      enable_displaylogger_experiment: data.loggingDirectives.enableDisplayloggerExperiment
    };
  }
}

    at ERROR_HANDLER (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/parser.js:67:27)
    at createRuntimeClass (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/generator.js:322:5)
    at generateRuntimeClass (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/generator.js:374:21)
    at Module.parseItem (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/parser.js:365:17)
    at new RichItem (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/classes/RichItem.js:6:31)
    at parseItem (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/parser.js:388:28)
    at Module.parseArray (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/parser.js:408:28)
    at new RichShelf (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/classes/RichShelf.js:9:32)
    at Module.parseItem (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/parser.js:388:28)
    at new RichSection (file:///Users/path/to/yt2alt/node_modules/youtubei.js/dist/src/parser/classes/RichSection.js:6:31) {
  date: 2024-07-10T21:47:35.950Z,
  version: '10.0.0'
}

Expected behavior

No error

Current behavior

Error

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.
@iBicha iBicha added the bug Something isn't working label Jul 10, 2024
@iBicha
Copy link
Contributor Author

iBicha commented Jul 13, 2024

I guess this is the view
Screen Shot 2024-07-13 at 11 23 19 AM

@LuanRT
Copy link
Owner

LuanRT commented Jul 13, 2024

Maybe we should just add it to the list of ignored nodes? I don't see anyone wanting to get any info from this.

@iBicha
Copy link
Contributor Author

iBicha commented Jul 13, 2024

Maybe we should just add it to the list of ignored nodes? I don't see anyone wanting to get any info from this.

Yeah unlikely that anyone cares about it

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