LuanRT / YouTube.js

A JavaScript client for YouTube's private API, known as InnerTube.
https://www.npmjs.com/package/youtubei.js
MIT License
3.5k stars 221 forks source link

v10.3.0 - ClientSideToggleMenuItem not found #727

Open mrd83 opened 1 month ago

mrd83 commented 1 month ago

Steps to reproduce

NOTE: the issue is directly caused by @Andrews54757 's FastStream extension - but since it uses all of the classes from YouTube.js I sincerely hope this report is actually valid. Normally I'd create a PR instead - but since I don't use YouTube.js >directly< - I'm unable to test the code.

  1. Start yt video with debugging console opened
  2. Wait for the message to appear.

Failure Logs

[YOUTUBEJS][Parser]: Error: ClientSideToggleMenuItem 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:
(...)

Expected behavior

No such error

Current behavior

Here's auto-generated class:

class ClientSideToggleMenuItem extends YTNode {
  static type = 'ClientSideToggleMenuItem';
  default_text: Text;
  default_icon: {
    icon_type: string
  };
  toggled_text: Text;
  toggled_icon: {
    icon_type: string
  };
  menu_item_identifier: string;
  command: {
    click_tracking_params: string,
    toggle_live_chat_timestamps_endpoint: NavigationEndpoint
  };
  constructor(data: RawNode) {
    super();
    this.default_text = new Text(data.defaultText);
    this.default_icon = {
      icon_type: data.defaultIcon.iconType
    };
    this.toggled_text = new Text(data.toggledText);
    this.toggled_icon = {
      icon_type: data.toggledIcon.iconType
    };
    this.menu_item_identifier = data.menuItemIdentifier;
    this.command = {
      click_tracking_params: data.command.clickTrackingParams,
      toggle_live_chat_timestamps_endpoint: new NavigationEndpoint(data.command.toggleLiveChatTimestampsEndpoint)
    };
  }
}

Proof: issue 1 - ClientSideToggleMenuItem

Version

Default

Anything else?

There's another: "ShortsLockupView". Should I also report it? issue 2a - ShortsLockupView

Checklist

iBicha commented 1 month ago

https://github.com/LuanRT/YouTube.js/issues/595