Androz2091 / discord-player

🎧 Complete framework to simplify the implementation of music commands using discord.js v14
https://discord-player.js.org/
MIT License
588 stars 191 forks source link

Player wont start to play the music #1921

Closed PenDZ-Alter closed 2 weeks ago

PenDZ-Alter commented 2 weeks ago

Description Since yesterday, when i tried to play the music, the player wont start the music. But, the music is actually inserted into queue.

Screenshots Here's my code in play.js : image image

And here's the debug log file : debug-log.txt

Additional context I tried the debug too. But, seems like the status wont changed into "playing" but "buffering" and stuck at "Dispatching Audio ..."

LakhindarPal commented 2 weeks ago

I was facing similar issues, for me it was only for YouTube links. Try using SoundCloud links. If it works for SoundCloud, then your problem is related to youtube too. In that case you can try the discord-player-youtubei plugin.

PenDZ-Alter commented 2 weeks ago

@LakhindarPal You're right, but not only youtube, when i tried to play using spotify, is facing the same problem.

retrouser955 commented 2 weeks ago

@PenDZ-Alter Discord Player cannot stream from Spotify. It uses Spotify info to stream from youtube.

Duda02 commented 2 weeks ago

I can confirm, since yesterday Youtube/Spotify playback is broken. Seems like Youtube might be taking some actions against bots as other libs/bots are also affected. I've tried implementing discord-player-youtubei but the issue persisted.

Here are some debug logs that were printed after I tried to play a track:

Debug Searching https://www.youtube.com/watch?v=dQw4w9WgXcQ
Debug Search engine set to youtubeVideo, fallback search engine set to autoSearch
Debug Protocol https detected in query
Debug Could not find an extractor that supports https protocol. Falling back to default behavior...
Debug Query type identified as youtubeVideo
Debug Checking cache...
Debug Cache miss for query https://www.youtube.com/watch?v=dQw4w9WgXcQ
Debug Executing extractors...
Debug Executing extractor com.discord-player.spotifyextractor...
Debug Executing extractor com.discord-player.applemusicextractor...
Debug Executing extractor com.discord-player.soundcloudextractor...
Debug Executing extractor com.discord-player.youtubeextractor...
Debug Extractor com.discord-player.youtubeextractor executed successfully!
Debug Executing metadata query using com.discord-player.youtubeextractor extractor...
Debug Metadata query was successful!
Debug Adding data to cache...
Debug Executing extractor com.discord-player.spotifyextractor...
Debug Executing extractor com.discord-player.applemusicextractor...
Debug Executing extractor com.discord-player.soundcloudextractor...
Debug Executing extractor com.discord-player.youtubeextractor...
Debug Extractor com.discord-player.youtubeextractor executed successfully!
twlite commented 2 weeks ago

I can confirm, since yesterday Youtube/Spotify playback is broken. Seems like Youtube might be taking some actions against bots as other libs/bots are also affected. I've tried implementing discord-player-youtubei but the issue persisted.

Here are some debug logs that were printed after I tried to play a track:

Debug Searching https://www.youtube.com/watch?v=dQw4w9WgXcQ
Debug Search engine set to youtubeVideo, fallback search engine set to autoSearch
Debug Protocol https detected in query
Debug Could not find an extractor that supports https protocol. Falling back to default behavior...
Debug Query type identified as youtubeVideo
Debug Checking cache...
Debug Cache miss for query https://www.youtube.com/watch?v=dQw4w9WgXcQ
Debug Executing extractors...
Debug Executing extractor com.discord-player.spotifyextractor...
Debug Executing extractor com.discord-player.applemusicextractor...
Debug Executing extractor com.discord-player.soundcloudextractor...
Debug Executing extractor com.discord-player.youtubeextractor...
Debug Extractor com.discord-player.youtubeextractor executed successfully!
Debug Executing metadata query using com.discord-player.youtubeextractor extractor...
Debug Metadata query was successful!
Debug Adding data to cache...
Debug Executing extractor com.discord-player.spotifyextractor...
Debug Executing extractor com.discord-player.applemusicextractor...
Debug Executing extractor com.discord-player.soundcloudextractor...
Debug Executing extractor com.discord-player.youtubeextractor...
Debug Extractor com.discord-player.youtubeextractor executed successfully!

Lol this feels like the words of @mariusbegby, anyways I'd suggest you to join https://androz2091.fr/discord for discussions related to youtubei package.

mariusbegby commented 2 weeks ago

Using youtubei worked fine for my bot, this is what I did: https://github.com/mariusbegby/cadence-discord-bot/commit/bf9c662835a344c2f9fe803f72b6694066ffad83

tm-frs commented 2 weeks ago

I can confirm, since yesterday Youtube/Spotify playback is broken. Seems like Youtube might be taking some actions against bots as other libs/bots are also affected. I've tried implementing discord-player-youtubei but the issue persisted.

Here are some debug logs that were printed after I tried to play a track:

Debug Searching https://www.youtube.com/watch?v=dQw4w9WgXcQ
Debug Search engine set to youtubeVideo, fallback search engine set to autoSearch
Debug Protocol https detected in query
Debug Could not find an extractor that supports https protocol. Falling back to default behavior...
Debug Query type identified as youtubeVideo
Debug Checking cache...
Debug Cache miss for query https://www.youtube.com/watch?v=dQw4w9WgXcQ
Debug Executing extractors...
Debug Executing extractor com.discord-player.spotifyextractor...
Debug Executing extractor com.discord-player.applemusicextractor...
Debug Executing extractor com.discord-player.soundcloudextractor...
Debug Executing extractor com.discord-player.youtubeextractor...
Debug Extractor com.discord-player.youtubeextractor executed successfully!
Debug Executing metadata query using com.discord-player.youtubeextractor extractor...
Debug Metadata query was successful!
Debug Adding data to cache...
Debug Executing extractor com.discord-player.spotifyextractor...
Debug Executing extractor com.discord-player.applemusicextractor...
Debug Executing extractor com.discord-player.soundcloudextractor...
Debug Executing extractor com.discord-player.youtubeextractor...
Debug Extractor com.discord-player.youtubeextractor executed successfully!

I had the same issue, implementing discord-player-youtubei fixed the issue, but when I entered a URL (which is what you did here) it wouldn't work. Does it work for you when you don't use a URL but search instead? @Duda02

Duda02 commented 2 weeks ago

@mariusbegby Turns out I had outdated versions of @discord-player, discord-player-youtubei and was missing the @discord-player/extractor package. Now that I updated/installed them I can confirm that using discord-player-youtubei works perfectly. Thanks for linking your commit, it helped me too!

Duda02 commented 2 weeks ago

I can confirm, since yesterday Youtube/Spotify playback is broken. Seems like Youtube might be taking some actions against bots as other libs/bots are also affected. I've tried implementing discord-player-youtubei but the issue persisted. Here are some debug logs that were printed after I tried to play a track:

Debug Searching https://www.youtube.com/watch?v=dQw4w9WgXcQ
Debug Search engine set to youtubeVideo, fallback search engine set to autoSearch
Debug Protocol https detected in query
Debug Could not find an extractor that supports https protocol. Falling back to default behavior...
Debug Query type identified as youtubeVideo
Debug Checking cache...
Debug Cache miss for query https://www.youtube.com/watch?v=dQw4w9WgXcQ
Debug Executing extractors...
Debug Executing extractor com.discord-player.spotifyextractor...
Debug Executing extractor com.discord-player.applemusicextractor...
Debug Executing extractor com.discord-player.soundcloudextractor...
Debug Executing extractor com.discord-player.youtubeextractor...
Debug Extractor com.discord-player.youtubeextractor executed successfully!
Debug Executing metadata query using com.discord-player.youtubeextractor extractor...
Debug Metadata query was successful!
Debug Adding data to cache...
Debug Executing extractor com.discord-player.spotifyextractor...
Debug Executing extractor com.discord-player.applemusicextractor...
Debug Executing extractor com.discord-player.soundcloudextractor...
Debug Executing extractor com.discord-player.youtubeextractor...
Debug Extractor com.discord-player.youtubeextractor executed successfully!

I had the same issue, implementing discord-player-youtubei fixed the issue, but when I entered a URL (which is what you did here) it wouldn't work. Does it work for you when you don't use a URL but search instead? @Duda02

Hi, I followed @mariusbegby's implementation and both URL and search work fine.

PenDZ-Alter commented 2 weeks ago

@PenDZ-Alter Discord Player cannot stream from Spotify. It uses Spotify info to stream from youtube.

Oh really, Thanks for the information.

retrouser955 commented 2 weeks ago

If you are having any more problems with discord-player-youtubei, please come open an issue on our repo

retrouser955 commented 2 weeks ago

Checking a lot of the issues here, it seems you guys both have youtubei and the default extractors activated. I will release 1.1.0 in a while which should fix it even if you accidently registered both.

PenDZ-Alter commented 2 weeks ago

I think this problem solved using youtubei plugin. I will close the issue, because i think there's no discussion anymore. Thanks to everyone and developers who helped me to solve the problem! :)