DJipgen
DJipgen
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
But why my bot don't disconnects from the voice channel, only the sound not works... Could it be a network disconnect then?
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
I have found the point where the error is generated:
connection.on(VoiceConnectionStatus.Disconnected, async (oldState, newState) => {
try {
await Promise.race([
entersState(connection, VoiceConnectionStatus.Signalling, 5_000),
entersState(connection, VoiceConnectionStatus.Connecting, 5_000),
]);
// Seems to be reconnecting to a new channel - ignore disconnect
} catch (error) {
// Seems to be a real disconnect which SHOULDN'T be recovered from
console.log("HERE IS THE ERROR");
}
});
connection.on(VoiceConnectionStatus.Disconnected, async (oldState, newState) => {
try {
await Promise.race([
entersState(connection, VoiceConnectionStatus.Signalling, 5_000),
entersState(connection, VoiceConnectionStatus.Connecting, 5_000),
]);
// Seems to be reconnecting to a new channel - ignore disconnect
} catch (error) {
// Seems to be a real disconnect which SHOULDN'T be recovered from
console.log("HERE IS THE ERROR");
}
});
What would be the best practise to "recover" the voice connection? Creating a new connection with joinVoiceChannel?
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
Hmm okay, I check it out - thank you!
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
I can't find the trigger of this error... Do you know if this error is coming from AudioPlayer, VoiceConnection or Stream?
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
Hmm, is there a possibility to fetch these -104 ECONNRESET errors?
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on VoiceConnection instance at:
at VoiceConnection.onNetworkingError (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:1898:10)
at Networking.emit (node:events:513:28)
at Networking.onChildError (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:630:10)
at VoiceWebSocket.emit (node:events:513:28)
at WebSocket.VoiceWebSocket.ws.onerror (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:420:37)
at callListener (/home/bots/dcbot/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onError (/home/bots/dcbot/node_modules/ws/lib/event-target.js:230:9)
at WebSocket.emit (node:events:513:28)
at emitErrorAndClose (/home/bots/dcbot/node_modules/ws/lib/websocket.js:1008:13)
at ClientRequest.<anonymous> (/home/bots/dcbot/node_modules/ws/lib/websocket.js:856:5) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on VoiceConnection instance at:
at VoiceConnection.onNetworkingError (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:1898:10)
at Networking.emit (node:events:513:28)
at Networking.onChildError (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:630:10)
at VoiceWebSocket.emit (node:events:513:28)
at WebSocket.VoiceWebSocket.ws.onerror (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:420:37)
at callListener (/home/bots/dcbot/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onError (/home/bots/dcbot/node_modules/ws/lib/event-target.js:230:9)
at WebSocket.emit (node:events:513:28)
at emitErrorAndClose (/home/bots/dcbot/node_modules/ws/lib/websocket.js:1008:13)
at ClientRequest.<anonymous> (/home/bots/dcbot/node_modules/ws/lib/websocket.js:856:5) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
`
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
@qjuh
AbortError: The operation was aborted
at AbortSignal.abortListener (node:events:958:14)
at AbortSignal.[nodejs.internal.kHybridDispatch] (node:internal/event_target:694:20)
at AbortSignal.dispatchEvent (node:internal/event_target:636:26)
at abortSignal (node:internal/abort_controller:292:10)
at AbortController.abort (node:internal/abort_controller:323:5)
at Timeout.<anonymous> (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:2504:39)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) {
code: 'ABORT_ERR',
[cause]: DOMException [AbortError]: This operation was aborted
at new DOMException (node:internal/per_context/domexception:72:5)
at AbortController.abort (node:internal/abort_controller:321:18)
at Timeout.<anonymous> (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:2504:39)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
}
node:events:491
throw er; // Unhandled 'error' event
^
AbortError: The operation was aborted
at AbortSignal.abortListener (node:events:958:14)
at AbortSignal.[nodejs.internal.kHybridDispatch] (node:internal/event_target:694:20)
at AbortSignal.dispatchEvent (node:internal/event_target:636:26)
at abortSignal (node:internal/abort_controller:292:10)
at AbortController.abort (node:internal/abort_controller:323:5)
at Timeout.<anonymous> (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:2504:39)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) {
code: 'ABORT_ERR',
[cause]: DOMException [AbortError]: This operation was aborted
at new DOMException (node:internal/per_context/domexception:72:5)
at AbortController.abort (node:internal/abort_controller:321:18)
at Timeout.<anonymous> (/home/bots/dcbot/node_modules/@discordjs/voice/dist/index.js:2504:39)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
}
node:events:491
throw er; // Unhandled 'error' event
^
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
I don't use ytdl-core, only playing a .ogg stream
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
└── @discordjs/[email protected]
18 replies
DIAdiscord.js - Imagine an app
Created by DJipgen on 6/9/2023 in #djs-voice
AbortError: The operation was aborted
discord.js --> [email protected] node --> v16.17.0
18 replies