hmes98318 / Music-Disc

A Discord music bot, supports YouTube, Spotify, SoundCloud, Deezer streams and web dashboard.
https://musicdisc.ggwp.tw
MIT License
107 stars 105 forks source link

bug with abort_err #19

Closed Crowny23 closed 1 year ago

Crowny23 commented 1 year ago

**Describe the bug** AbortError: The operation was aborted at EventTarget.abortListener (node:events:958:14) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:735:20) at EventTarget.dispatchEvent (node:internal/event_target:677:26) at abortSignal (node:internal/abort_controller:308:10) at AbortController.abort (node:internal/abort_controller:338:5) at Timeout. (/home/crowny/Documents/botDisc/Music-Disc/node_modules/@discordjs/voice/dist/index.js:2504:39) at listOnTimeout (node:internal/timers:569:17) at process.processTimers (node:internal/timers:512:7) { code: 'ABORT_ERR', [cause]: DOMException [AbortError]: This operation was aborted at new DOMException (node:internal/per_context/domexception:53:5) at AbortController.abort (node:internal/abort_controller:336:18) at Timeout. (/home/crowny/Documents/botDisc/Music-Disc/node_modules/@discordjs/voice/dist/index.js:2504:39) at listOnTimeout (node:internal/timers:569:17) at process.processTimers (node:internal/timers:512:7) }

when i play, bot joined but don't play music and disconnect

hmes98318 commented 1 year ago

This is an error in discord-player v6 (https://github.com/Androz2091/discord-player/issues/1656).
Try adding the following code at the end of ./src/index.js to catch the error and prevent the bot from crashing.

process.on('unhandledRejection', error => {
    console.error('Unhandled promise rejection:', error);
});
Crowny23 commented 1 year ago

ok now i don't have error but when bot starting to play music, he disconnect directely :(

hmes98318 commented 1 year ago

Can you provide detailed logs?

Crowny23 commented 1 year ago

i don't have a logs just that [2023/04/11 21:27:25] -> loading Web Framework ...... [2023/04/11 21:27:25] Server start listening port on 33333 [2023/04/11 21:27:25] -> loading Events ...... [2023/04/11 21:27:25] +--------------------------------+ [2023/04/11 21:27:25] | Loaded event interactionCreate | [2023/04/11 21:27:25] | Loaded event messageCreate | [2023/04/11 21:27:25] | Loaded event ready | [2023/04/11 21:27:25] | Loaded event voiceStateUpdate | [2023/04/11 21:27:25] +--------------------------------+ [2023/04/11 21:27:25] -- loading Events finished -- [2023/04/11 21:27:25] -> loading Commands ...... [2023/04/11 21:27:25] +---------------------------+ [2023/04/11 21:27:25] | Loaded Command back | [2023/04/11 21:27:25] | Loaded Command help | [2023/04/11 21:27:25] | Loaded Command leave | [2023/04/11 21:27:25] | Loaded Command loop | [2023/04/11 21:27:25] | Loaded Command nowplaying | [2023/04/11 21:27:25] | Loaded Command pause | [2023/04/11 21:27:25] | Loaded Command ping | [2023/04/11 21:27:25] | Loaded Command play | [2023/04/11 21:27:25] | Loaded Command time | [2023/04/11 21:27:25] | Loaded Command queue | [2023/04/11 21:27:25] | Loaded Command remove | [2023/04/11 21:27:25] | Loaded Command resume | [2023/04/11 21:27:25] | Loaded Command save | [2023/04/11 21:27:25] | Loaded Command search | [2023/04/11 21:27:25] | Loaded Command server | [2023/04/11 21:27:25] | Loaded Command shuffle | [2023/04/11 21:27:25] | Loaded Command skip | [2023/04/11 21:27:25] | Loaded Command status | [2023/04/11 21:27:25] | Loaded Command volume | [2023/04/11 21:27:25] +---------------------------+ [2023/04/11 21:27:25] -- loading Commands finished -- [2023/04/11 21:27:25] All loaded successfully [2023/04/11 21:27:42] +-----------------------+ [2023/04/11 21:27:42] | Music Disc: v1.3.2 | [2023/04/11 21:27:42] | Node.js: v18.15.0 | [2023/04/11 21:27:42] | Discord.js: v14.9.0 | [2023/04/11 21:27:42] +-----------------------+ [2023/04/11 21:27:42] >>> Logged in as BotMusicPlayer [2023/04/11 21:27:49] (The Only Server) Crownys23 : !p https://www.youtube.com/watch?v=LWgpzkj9lss [2023/04/11 21:27:51] -- BotMusicPlayer joined channel LoL m'a tout prit [2023/04/11 21:28:13] -- BotMusicPlayer left channel

hmes98318 commented 1 year ago

umm... do other songs have the same result? Because if a song can't be played, the bot will skip it.