Androz2091 / discord-player

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

ERR_NO_RESULT: Could not extract stream for this track #1844

Closed nobuuuuuu closed 8 months ago

nobuuuuuu commented 10 months ago

Describe the bug Hello, I'm having the same problem as in this issue : https://github.com/Androz2091/discord-player/issues/1800 with Spotify playlists.

I was originally using this code to load extractors from the main package:

const { Player } = require("discord-player");
// [...]
const player = new Player(client, {});
// [...]
await player.extractors.loadDefault((ext) => ext === 'YouTubeExtractor' || ext === 'SpotifyExtractor' || ext === 'AttachmentExtractor');

But since you said that there might be a difference between the version of the extractors and youtube-ext I installed @discord-player/extractor and loaded the extractors as follows :

const { Player } = require("discord-player");
const { AppleMusicExtractor,VimeoExtractor,SoundCloudExtractor,ReverbnationExtractor, YoutubeExtractor, SpotifyExtractor, AttachmentExtractor } = require("@discord-player/extractor")
// [...]
const player = new Player(client, {
  blockStreamFrom: [
    AppleMusicExtractor.identifier,
    VimeoExtractor.identifier,
    SoundCloudExtractor.identifier,
    ReverbnationExtractor.identifier
],
blockExtractors: [
    AppleMusicExtractor.identifier,
    VimeoExtractor.identifier,
    SoundCloudExtractor.identifier,
    ReverbnationExtractor.identifier
]});
// [...]
await player.extractors.register(YoutubeExtractor);
await player.extractors.register(SpotifyExtractor);
await player.extractors.register(AttachmentExtractor);

But I'm still having the same error... It works if I play the music directly via its URL, the problem only occurs when I skip the music that precedes it.

I may have misunderstood how to fix this error, but I have the impression that the bug is still there.

To Reproduce Steps to reproduce the behavior:

  1. Play Spotify playlist : https://open.spotify.com/playlist/37i9dQZF1DX0CgRlkzaOFL?si=74077b072d2b4d75
  2. Skip the first 2 musics
  3. Error (SS)

Expected behavior The bot should play the third music

Screenshots image image

Please complete the following information:

twlite commented 10 months ago

This seems to work just fine when that track is manually loaded but fails with playlist, I will get back to this soon. You can avoid this error by setting skipOnNoStream: true in nodeOptions while initializing the queue.