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

9.0.2 [YOUTUBEJS][Parser]: InnertubeError: ButtonCardView not found! #592

Open
4 tasks done
githubwan01 opened this issue Feb 2, 2024 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@githubwan01
Copy link

Steps to reproduce

Use Innertube.search()

Search for alan walker

Got:

[YOUTUBEJS][Parser]: 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:105:72)
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:394:148)
at Module.parseArray (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:435: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:416: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:416:28)
at Module.parseArray (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:435: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:416:28)
at Module.parseArray (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:435: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:416:28)
at Module.parse (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:461:75)
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:416:28)
at parse (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:461:75)
at Module.parseResponse (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:168: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:141: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-02-02T15:29:59.412Z,
version: '9.0.2'
}

Failure Logs

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:105:72)
    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:394:148)
    at Module.parseArray (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:435: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:416: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:416:28)
    at Module.parseArray (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:435: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:416:28)
    at Module.parseArray (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:435: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:416:28)
    at Module.parse (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:461:75)
    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:416:28)
    at parse (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:461:75)
    at Module.parseResponse (/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/dist/src/parser/parser.js:168: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:141: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-02-02T15:29:59.412Z,
  version: '9.0.2'
}

Expected behavior

Receive results for "alan walker"

Current behavior

[YOUTUBEJS][Parser]: 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 Feb 2, 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
Projects
None yet
Development

No branches or pull requests

1 participant