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

8.2.0 InnertubeError: ButtonCardView not found! #585

Closed
4 tasks done
githubwan01 opened this issue Jan 17, 2024 · 0 comments · Fixed by #834
Closed
4 tasks done

8.2.0 InnertubeError: ButtonCardView not found! #585

githubwan01 opened this issue Jan 17, 2024 · 0 comments · Fixed by #834
Labels
bug Something isn't working good first issue Good for newcomers priority: medium

Comments

@githubwan01
Copy link

Steps to reproduce

  1. innertube.search('music')
  2. filter type => 'Shelf' data
  3. sometime it happend randomly

Failure Logs

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

  title: string;
  image: {
    sources: {
      client_resource: {
        image_name: string
      }
    }[]
  };
  renderer_context: {
    command_context: {
      on_tap: {
        innertube_command: NavigationEndpoint
      }
    }
  };

  constructor(data: RawNode) {
    super();
    this.title = data.title;
    this.image = {
      sources: data.image.sources.map((item: any) => ({
        client_resource: {
          image_name: item.clientResource.imageName
        }
      }))
    };
    this.renderer_context = {
      command_context: {
        on_tap: {
          innertube_command: new NavigationEndpoint(data.rendererContext.commandContext.onTap.innertubeCommand)
        }
      }
    };
  }
}

    at ERROR_HANDLER (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:102:26)
    at createRuntimeClass (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/generator.js:346:5)
    at generateRuntimeClass (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/generator.js:398:21)
    at parseItem (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:391:149)
    at Module.parseArray (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:432:28)
    at new HorizontalList (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/classes/HorizontalList.js:13:68)
    at Module.parseItem (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:413:28)
    at new Shelf (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/classes/Shelf.js:22:70)
    at parseItem (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:413:28)
    at Module.parseArray (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:432:28)
    at new ItemSection (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/classes/ItemSection.js:27:71)
    at parseItem (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:413:28)
    at Module.parseArray (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:432:28)
    at new SectionList (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/classes/SectionList.js:12:71)
    at parseItem (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:413:28)
    at Module.parse (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:458:76)
    at new TwoColumnSearchResults (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/classes/TwoColumnSearchResults.js:12:79)
    at parseItem (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:413:28)
    at parse (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:458:76)
    at Module.parseResponse (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:165:22)
    at new Feed (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/core/mixins/Feed.js:66:147)
    at new Search (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/youtube/Search.js:28:9)
    at Innertube.eval (/./node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/Innertube.js:164:20)
    at Generator.next (<anonymous>)
    at fulfilled (/./node_modules/.pnpm/[email protected]/node_modules/tslib/tslib.es6.mjs:164:32)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  date: 2024-01-17T09:07:56.206Z,
  version: '8.2.0'
}

Expected behavior

Get the search result for all type

Current behavior

Error InnertubeError: ButtonCardView not found!

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.
@githubwan01 githubwan01 added the bug Something isn't working label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers priority: medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants