Since today, my bot doesn't play audio through the voice channel

Has anything changed in the API?
18 Replies
d.js toolkit
d.js toolkit5mo ago
- What are your intents? GuildVoiceStates is required to receive voice data! - Show what dependencies you are using -- generateDependencyReport() is exported from @discordjs/voice. - Try looking at common examples: https://github.com/discordjs/voice-examples. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Samtino
Samtino5mo ago
What version of @discordjs/voice are you using? Are you receiving any errors? Is your bot having issues anywhere else? Discord hasn't made any announcements that there's been a change in the API, so without more information, I have no idea what your issue is
mecs
mecsOP5mo ago
0|v13 | 2025-05-27T19:18:43: Error: Cannot perform IP discovery - socket closed
0|v13 | 2025-05-27T19:18:43: at Socket.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:309:46)
0|v13 | 2025-05-27T19:18:43: at Object.onceWrapper (node:events:628:28)
0|v13 | 2025-05-27T19:18:43: at Socket.emit (node:events:526:35)
0|v13 | 2025-05-27T19:18:43: at socketCloseNT (node:dgram:765:8)
0|v13 | 2025-05-27T19:18:43: at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
0|v13 | 2025-05-27T19:19:16: AbortError: The operation was aborted
0|v13 | 2025-05-27T19:19:16: at EventTarget.abortListener (node:events:996:14)
0|v13 | 2025-05-27T19:19:16: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
0|v13 | 2025-05-27T19:19:16: at EventTarget.dispatchEvent (node:internal/event_target:749:26)
0|v13 | 2025-05-27T19:19:16: at abortSignal (node:internal/abort_controller:371:10)
0|v13 | 2025-05-27T19:19:16: at AbortController.abort (node:internal/abort_controller:393:5)
0|v13 | 2025-05-27T19:19:16: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2480:39)
0|v13 | 2025-05-27T19:19:16: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:19:16: at process.processTimers (node:internal/timers:514:7) {
0|v13 | 2025-05-27T19:19:16: code: 'ABORT_ERR',
0|v13 | 2025-05-27T19:19:16: [cause]: DOMException [AbortError]: This operation was aborted
0|v13 | 2025-05-27T19:19:16: at new DOMException (node:internal/per_context/domexception:53:5)
0|v13 | 2025-05-27T19:19:16: ...
0|v13 | 2025-05-27T19:18:43: Error: Cannot perform IP discovery - socket closed
0|v13 | 2025-05-27T19:18:43: at Socket.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:309:46)
0|v13 | 2025-05-27T19:18:43: at Object.onceWrapper (node:events:628:28)
0|v13 | 2025-05-27T19:18:43: at Socket.emit (node:events:526:35)
0|v13 | 2025-05-27T19:18:43: at socketCloseNT (node:dgram:765:8)
0|v13 | 2025-05-27T19:18:43: at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
0|v13 | 2025-05-27T19:19:16: AbortError: The operation was aborted
0|v13 | 2025-05-27T19:19:16: at EventTarget.abortListener (node:events:996:14)
0|v13 | 2025-05-27T19:19:16: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
0|v13 | 2025-05-27T19:19:16: at EventTarget.dispatchEvent (node:internal/event_target:749:26)
0|v13 | 2025-05-27T19:19:16: at abortSignal (node:internal/abort_controller:371:10)
0|v13 | 2025-05-27T19:19:16: at AbortController.abort (node:internal/abort_controller:393:5)
0|v13 | 2025-05-27T19:19:16: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2480:39)
0|v13 | 2025-05-27T19:19:16: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:19:16: at process.processTimers (node:internal/timers:514:7) {
0|v13 | 2025-05-27T19:19:16: code: 'ABORT_ERR',
0|v13 | 2025-05-27T19:19:16: [cause]: DOMException [AbortError]: This operation was aborted
0|v13 | 2025-05-27T19:19:16: at new DOMException (node:internal/per_context/domexception:53:5)
0|v13 | 2025-05-27T19:19:16: ...
0|v13 | 2025-05-27T19:39:13: AbortError: The operation was aborted
0|v13 | 2025-05-27T19:39:13: at EventTarget.abortListener (node:events:996:14)
0|v13 | 2025-05-27T19:39:13: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
0|v13 | 2025-05-27T19:39:13: at EventTarget.dispatchEvent (node:internal/event_target:749:26)
0|v13 | 2025-05-27T19:39:13: at abortSignal (node:internal/abort_controller:371:10)
0|v13 | 2025-05-27T19:39:13: at AbortController.abort (node:internal/abort_controller:393:5)
0|v13 | 2025-05-27T19:39:13: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2480:39)
0|v13 | 2025-05-27T19:39:13: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:39:13: at process.processTimers (node:internal/timers:514:7) {
0|v13 | 2025-05-27T19:39:13: code: 'ABORT_ERR',
0|v13 | 2025-05-27T19:39:13: [cause]: DOMException [AbortError]: This operation was aborted
0|v13 | 2025-05-27T19:39:13: at new DOMException (node:internal/per_context/domexception:53:5)
0|v13 | 2025-05-27T19:39:13: at AbortController.abort (node:internal/abort_controller:392:18)
0|v13 | 2025-05-27T19:39:13: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2480:39)
0|v13 | 2025-05-27T19:39:13: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:39:13: at process.processTimers (node:internal/timers:514:7)
0|v13 | 2025-05-27T19:39:13: }
0|v13 | 2025-05-27T19:39:13: AbortError: The operation was aborted
0|v13 | 2025-05-27T19:39:13: at EventTarget.abortListener (node:events:996:14)
0|v13 | 2025-05-27T19:39:13: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
0|v13 | 2025-05-27T19:39:13: at EventTarget.dispatchEvent (node:internal/event_target:749:26)
0|v13 | 2025-05-27T19:39:13: at abortSignal (node:internal/abort_controller:371:10)
0|v13 | 2025-05-27T19:39:13: at AbortController.abort (node:internal/abort_controller:393:5)
0|v13 | 2025-05-27T19:39:13: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2480:39)
0|v13 | 2025-05-27T19:39:13: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:39:13: at process.processTimers (node:internal/timers:514:7) {
0|v13 | 2025-05-27T19:39:13: code: 'ABORT_ERR',
0|v13 | 2025-05-27T19:39:13: [cause]: DOMException [AbortError]: This operation was aborted
0|v13 | 2025-05-27T19:39:13: at new DOMException (node:internal/per_context/domexception:53:5)
0|v13 | 2025-05-27T19:39:13: at AbortController.abort (node:internal/abort_controller:392:18)
0|v13 | 2025-05-27T19:39:13: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2480:39)
0|v13 | 2025-05-27T19:39:13: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:39:13: at process.processTimers (node:internal/timers:514:7)
0|v13 | 2025-05-27T19:39:13: }
d.js docs
d.js docs5mo ago
Errors such as ECONNRESET, ConnectTimeoutError, SocketError: other side closed indicate a network issue * Free or shared hosting providers often come with significant limitations * Another indication of these issues are 'Unknown Interaction' errors.
mecs
mecsOP5mo ago
npm -v @discordjs/voice
10.7.0
npm -v @discordjs/voice
10.7.0
treble/luna
treble/luna5mo ago
thats not how you check versions thats your npm version
mecs
mecsOP5mo ago
No description
Samtino
Samtino5mo ago
Ya. Your voice package is deprecated. You need 0.18 or greater for it to work Nevermind ignore me. I speak lies Just update your packages. Because as it says here https://discord.com/channels/222078108977594368/1163868664152465438 You need 0.18.0 or greater
mecs
mecsOP5mo ago
I still get the error after doing: npm uninstall @discordjs/voice npm i @discordjs/voice
0|v13 | 2025-05-27T19:49:34: AbortError: The operation was aborted
0|v13 | 2025-05-27T19:49:34: at EventTarget.abortListener (node:events:996:14)
0|v13 | 2025-05-27T19:49:34: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
0|v13 | 2025-05-27T19:49:34: at EventTarget.dispatchEvent (node:internal/event_target:749:26)
0|v13 | 2025-05-27T19:49:34: at abortSignal (node:internal/abort_controller:371:10)
0|v13 | 2025-05-27T19:49:34: at AbortController.abort (node:internal/abort_controller:393:5)
0|v13 | 2025-05-27T19:49:34: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2484:39)
0|v13 | 2025-05-27T19:49:34: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:49:34: at process.processTimers (node:internal/timers:514:7) {
0|v13 | 2025-05-27T19:49:34: code: 'ABORT_ERR',
0|v13 | 2025-05-27T19:49:34: [cause]: DOMException [AbortError]: This operation was aborted
0|v13 | 2025-05-27T19:49:34: at new DOMException (node:internal/per_context/domexception:53:5)
0|v13 | 2025-05-27T19:49:34: at AbortController.abort (node:internal/abort_controller:392:18)
0|v13 | 2025-05-27T19:49:34: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2484:39)
0|v13 | 2025-05-27T19:49:34: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:49:34: at process.processTimers (node:internal/timers:514:7)
0|v13 | 2025-05-27T19:49:34: }
0|v13 | 2025-05-27T19:49:34: AbortError: The operation was aborted
0|v13 | 2025-05-27T19:49:34: at EventTarget.abortListener (node:events:996:14)
0|v13 | 2025-05-27T19:49:34: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
0|v13 | 2025-05-27T19:49:34: at EventTarget.dispatchEvent (node:internal/event_target:749:26)
0|v13 | 2025-05-27T19:49:34: at abortSignal (node:internal/abort_controller:371:10)
0|v13 | 2025-05-27T19:49:34: at AbortController.abort (node:internal/abort_controller:393:5)
0|v13 | 2025-05-27T19:49:34: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2484:39)
0|v13 | 2025-05-27T19:49:34: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:49:34: at process.processTimers (node:internal/timers:514:7) {
0|v13 | 2025-05-27T19:49:34: code: 'ABORT_ERR',
0|v13 | 2025-05-27T19:49:34: [cause]: DOMException [AbortError]: This operation was aborted
0|v13 | 2025-05-27T19:49:34: at new DOMException (node:internal/per_context/domexception:53:5)
0|v13 | 2025-05-27T19:49:34: at AbortController.abort (node:internal/abort_controller:392:18)
0|v13 | 2025-05-27T19:49:34: at Timeout.<anonymous> (file:///home/ubuntu/bot-discord-js-v13/node_modules/@discordjs/voice/dist/index.mjs:2484:39)
0|v13 | 2025-05-27T19:49:34: at listOnTimeout (node:internal/timers:573:17)
0|v13 | 2025-05-27T19:49:34: at process.processTimers (node:internal/timers:514:7)
0|v13 | 2025-05-27T19:49:34: }
treble/luna
treble/luna5mo ago
looks like a generic network issue
Samtino
Samtino5mo ago
Have you tried running it locally instead of on your host to see if it fixes your issue?
mecs
mecsOP5mo ago
Hmm, would I be able to run any tests to figure this out? I'll try that and see same on my local machine, that shouldn't have any network restrictions
mecs
mecsOP5mo ago
here's the 11 lines of code, maybe something changed https://github.com/MaxPuig/guacamayo/blob/main/utils/voice.js#L120-L131
GitHub
guacamayo/utils/voice.js at main · MaxPuig/guacamayo
Guacamayo, a Discord bot that announces who has entered a voice channel. - MaxPuig/guacamayo
mecs
mecsOP5mo ago
I narrowed it down with this:
try {
await entersState(connection, VoiceConnectionStatus.Ready, 20_000);
} catch (err) {
console.error('Voice connection failed to become ready:', err);
return;
}
try {
await entersState(connection, VoiceConnectionStatus.Ready, 20_000);
} catch (err) {
console.error('Voice connection failed to become ready:', err);
return;
}
Voice connection failed to become ready: AbortError: The operation was aborted
at AbortSignal.abortListener (node:events:994:14)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20)
at AbortSignal.dispatchEvent (node:internal/event_target:762:26)
at runAbort (node:internal/abort_controller:449:10)
at abortSignal (node:internal/abort_controller:435:3)
at AbortController.abort (node:internal/abort_controller:468:5)
at Timeout.<anonymous> (file:///Users/maxpuig/Desktop/code/1guacamayo/node_modules/@discordjs/voice/dist/index.mjs:2484:39)
at listOnTimeout (node:internal/timers:614:17)
at process.processTimers (node:internal/timers:549: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:467:18)
at Timeout.<anonymous> (file:///Users/maxpuig/Desktop/code/1guacamayo/node_modules/@discordjs/voice/dist/index.mjs:2484:39)
at listOnTimeout (node:internal/timers:614:17)
at process.processTimers (node:internal/timers:549:7)
}
Voice connection failed to become ready: AbortError: The operation was aborted
at AbortSignal.abortListener (node:events:994:14)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20)
at AbortSignal.dispatchEvent (node:internal/event_target:762:26)
at runAbort (node:internal/abort_controller:449:10)
at abortSignal (node:internal/abort_controller:435:3)
at AbortController.abort (node:internal/abort_controller:468:5)
at Timeout.<anonymous> (file:///Users/maxpuig/Desktop/code/1guacamayo/node_modules/@discordjs/voice/dist/index.mjs:2484:39)
at listOnTimeout (node:internal/timers:614:17)
at process.processTimers (node:internal/timers:549: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:467:18)
at Timeout.<anonymous> (file:///Users/maxpuig/Desktop/code/1guacamayo/node_modules/@discordjs/voice/dist/index.mjs:2484:39)
at listOnTimeout (node:internal/timers:614:17)
at process.processTimers (node:internal/timers:549:7)
}
Okay, turns out it was the location of the server of the voice channel...
dzlandis
dzlandis3mo ago
@mecs did you ever resolve this issue? Furthermore, when you mean that it doesn't play audio, does it ALWAYS not play audio? Or is the behavior on and off?
mecs
mecsOP3mo ago
@dzlandis by changing the server location of the voice channel, the issue got solved Cog ⚙️ wheel > on the voice channel. So nothing to do with the bot
dzlandis
dzlandis3mo ago
What did you change the location to in your case? I'm having a similar issue on and off but changing the voice location didn't resolve when I tried that previously.
mecs
mecsOP3mo ago
I selected automatic

Did you find this page helpful?