retrouser955 / discord-player-youtubei

Super charging your bot. dpy is a tiny extractor module to test the validity of youtubei.js in discord-player version 7.
https://discord-player.js.org
Creative Commons Zero v1.0 Universal
16 stars 5 forks source link

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

Closed BhaveshBasrani closed 1 month ago

BhaveshBasrani commented 1 month ago

image Nodejs v20 Was working fine until 2 seconds ago

retrouser955 commented 1 month ago

Just restart your bot. It should fix it.

Zythoxic commented 1 month ago

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 commented 1 month ago

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

View: LuanRT/youtube.js#698

retrouser955 commented 1 month ago

@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 commented 1 month ago

try using the ANDROID client in the useClient option

This didn't work for me sadly

retrouser955 commented 1 month ago

@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 commented 1 month ago

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

Zythoxic commented 1 month ago

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

BhaveshBasrani commented 1 month ago

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

BhaveshBasrani commented 1 month ago

image

iTsMaaT commented 1 month ago

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

BhaveshBasrani commented 1 month ago

Lavalink then ig

iTsMaaT commented 1 month ago

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

retrouser955 commented 1 month ago

Lavalink then ig

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

retrouser955 commented 1 month ago

image

ignore this. it should play music

retrouser955 commented 1 month ago

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 commented 1 month ago

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

Zythoxic commented 1 month ago

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

retrouser955 commented 1 month ago

This is happening again as YouTube changed their validation.

retrouser955 commented 1 month ago

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

retrouser955 commented 1 month ago

See LuanRT/YouTube.js#713

retrouser955 commented 1 month ago

npm i discord-player-youtubei@latest