LuanRT / YouTube.js

A wrapper around YouTube's internal API — reverse engineering InnerTube
https://www.npmjs.com/package/youtubei.js
MIT License
3.47k stars 218 forks source link

6.4.1 - InnertubeError: Counterfactual not found #519

Open walanjak opened 11 months ago

walanjak commented 11 months ago

Steps to reproduce

I use Vercel to deploy my app, but the build log shows error log and says its a bug

Failure Logs

InnertubeError: Counterfactual 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 Counterfactual extends YTNode {
  static type = 'Counterfactual';
  impression_endpoints: {
    0: {
      click_tracking_params: string,
      command_metadata: {
        web_command_metadata: {
          send_post: boolean,
          api_url: string
        }
      },
      feedback_endpoint: NavigationEndpoint
    }
  };
  enable_shared_feature_for_impression_handling: boolean;
  constructor(data: RawNode) {
    super();
    this.impression_endpoints = {
      0: {
        click_tracking_params: data.impressionEndpoints.0.clickTrackingParams,
        command_metadata: {
          web_command_metadata: {
            send_post: data.impressionEndpoints.0.commandMetadata.webCommandMetadata.sendPost,
            api_url: data.impressionEndpoints.0.commandMetadata.webCommandMetadata.apiUrl
          }
        },
        feedback_endpoint: new NavigationEndpoint(data.impressionEndpoints.0.feedbackEndpoint)
      }
    };
    this.enable_shared_feature_for_impression_handling = data.enableSharedFeatureForImpressionHandling;
  }
}

Expected behavior

I didn't know what to expect cause this error happen on build process, in local i didn't see this error

Current behavior

I can't deploy it to Vercel, working only on local

Version

Default

Anything else?

No response

Checklist

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

meghe2000 commented 6 months ago

image I have this problem recently.