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

[YOUTUBEJS][Player]: Failed to extract n-token decipher algorithm #15

Closed
BhaveshBasrani opened this issue Jul 24, 2024 · 22 comments
Closed
Labels
bug Something isn't working

Comments

@BhaveshBasrani
Copy link

image
Nodejs v20
Was working fine until 2 seconds ago

@retrouser955
Copy link
Owner

Just restart your bot. It should fix it.

@Zythoxic
Copy link

Having the same issue and restarted the bot multiple times. Also tried down- and upgrading the package, same issue in all versions.

Was working completely fine yesterday, today it's not working anymore and just giving the n-token error.

@retrouser955
Copy link
Owner

AFAIK I can't do anything until youtubei.js fixes this as it's an internal error.

View: LuanRT/YouTube.js#698

@retrouser955
Copy link
Owner

@Zythoxic @BhaveshBasrani try using the ANDROID client in the useClient option

player.extractors.register(YoutubeiExtractor, {
   ...otherOptions,
   useClient: "ANDROID"
})

Ignore the error after doing this and see if streaming works as intended

@L-uu
Copy link

L-uu commented Jul 25, 2024

try using the ANDROID client in the useClient option

This didn't work for me sadly

@retrouser955
Copy link
Owner

@L-uu This is actually my bad. It seems I'm lost in my own code also. The correct syntax is

player.extractors.register(YoutubeiExtractor, {
   ...otherOptions,
   streamOptions: {
      useClient: "ANDROID"
   } 
})

@L-uu
Copy link

L-uu commented Jul 25, 2024

Tbf I should've probably figured that out myself too lmao, but while still displaying the same error it does play music.

@Zythoxic
Copy link

Can confirm using the Android client it does play the music again, despite the error.

@BhaveshBasrani
Copy link
Author

Damm its actually a big issue
y does it occur tho?
shld i switch to spotify?

@BhaveshBasrani
Copy link
Author

image

@iTsMaaT
Copy link

iTsMaaT commented Jul 25, 2024

@BhaveshBasrani You cannot just switch to spotify, as it uses youtube to get the sound, or soundcloud if youtube is disabled

@BhaveshBasrani
Copy link
Author

Lavalink then ig

@iTsMaaT
Copy link

iTsMaaT commented Jul 25, 2024

adding the android client will still log this error, but the bot will work as intented so its not really an issue

@retrouser955
Copy link
Owner

Lavalink then ig

switching to lavalink is not a fix as they also need to scrape youtube for streaming.

@retrouser955
Copy link
Owner

image

ignore this. it should play music

@retrouser955
Copy link
Owner

retrouser955 commented Jul 26, 2024

I released 1.2.0. This might fix it. Install it via npm install discord-player-youtubei@latest

Edit: Here are the change logs

@retrouser955
Copy link
Owner

This issue is identified to be fixed in the latest version of discord-player-youtubei

@Zythoxic
Copy link

I've updated the youtubei.js package, after that it was fixed.

@retrouser955
Copy link
Owner

This is happening again as YouTube changed their validation.

@retrouser955
Copy link
Owner

retrouser955 commented Aug 1, 2024

Identified the issue. Nothing I can do until youtubei.js releases 10.3.0

@retrouser955
Copy link
Owner

See LuanRT/YouTube.js#713

@retrouser955
Copy link
Owner

npm i discord-player-youtubei@latest

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

5 participants