AbortError: The operation was aborted
I have a bot, which is playing music. It connects to the channel and also plays the music but sometimes there is the following error and the music stops playing but the bot is still in the channel
10 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.discord.js
--> [email protected]
node
--> v16.17.0
npm ls @discordjs/voice
and show the output└── @discordjs/[email protected]
To debug your voice connection and player:
• Use
debug: true
when creating your VoiceConnection
and AudioPlayer
• Add an event listener to the <VoiceConnection> and the <AudioPlayer>:
• Add an error
listener to the stream you are passing to the resource:
Note: The <>
represents classes that need to be adapted to their respective name in your code
might be related to ytdl-core or something
I don't use ytdl-core, only playing a .ogg stream
ah ok
@qjuh
`
Hmm, is there a possibility to fetch these -104 ECONNRESET errors?
I can't find the trigger of this error... Do you know if this error is coming from AudioPlayer, VoiceConnection or Stream?
Hmm okay, I check it out - thank you!
I have found the point where the error is generated:
What would be the best practise to "recover" the voice connection? Creating a new connection with joinVoiceChannel?
But why my bot don't disconnects from the voice channel, only the sound not works... Could it be a network disconnect then?
So how is one meant to resolve this issue. I'm experiencing a similar issue but there doesn't seem to be a concrete solution here? Any guidance?