Trying to start up my bot but it is getting AbortError Request aborted

[WS => Manager] Manager was destroyed. Called by:
Error
at WebSocketManager.destroy (/root/codinghelp-bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:323:54)
at Client.destroy (/root/codinghelp-bot/node_modules/discord.js/src/client/Client.js:257:13)
at Client.login (/root/codinghelp-bot/node_modules/discord.js/src/client/Client.js:235:12)
at runNextTicks (node:internal/process/task_queues:61:5)
at processTimers (node:internal/timers:499:9)
at async /root/codinghelp-bot/index.js:131:3
/root/codinghelp-bot/node_modules/undici/lib/api/abort-signal.js:10
self.onError(new RequestAbortedError())
^

RequestAbortedError [AbortError]: Request aborted
at abort (/root/codinghelp-bot/node_modules/undici/lib/api/abort-signal.js:10:18)
at AbortSignal.self.<computed> (/root/codinghelp-bot/node_modules/undici/lib/api/abort-signal.js:29:5)
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> (/root/codinghelp-bot/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:515:73)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) {
code: 'UND_ERR_ABORTED'
}
[WS => Manager] Manager was destroyed. Called by:
Error
at WebSocketManager.destroy (/root/codinghelp-bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:323:54)
at Client.destroy (/root/codinghelp-bot/node_modules/discord.js/src/client/Client.js:257:13)
at Client.login (/root/codinghelp-bot/node_modules/discord.js/src/client/Client.js:235:12)
at runNextTicks (node:internal/process/task_queues:61:5)
at processTimers (node:internal/timers:499:9)
at async /root/codinghelp-bot/index.js:131:3
/root/codinghelp-bot/node_modules/undici/lib/api/abort-signal.js:10
self.onError(new RequestAbortedError())
^

RequestAbortedError [AbortError]: Request aborted
at abort (/root/codinghelp-bot/node_modules/undici/lib/api/abort-signal.js:10:18)
at AbortSignal.self.<computed> (/root/codinghelp-bot/node_modules/undici/lib/api/abort-signal.js:29:5)
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> (/root/codinghelp-bot/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:515:73)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) {
code: 'UND_ERR_ABORTED'
}
No clue why this is happening.
16 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y ago
AbortError: The user aborted a request. A request took longer than the specified restRequestTimeout (15 seconds default), and was aborted to not lock up the request handler. • This can be caused by an internal server error on Discord's side, or just a slow connection. • In case of a slow connection, the restRequestTimeout option in ClientOptions can be increased to prevent future AbortErrors.
Erin
Erin2y ago
Ever since v14.6 I have been getting these errors. I have to restart my bot A LOT just to get it to come up. More often than not I get the Abort Error Same code as v14.5 so I'm not sure if anything changed.
Erin
Erin2y ago
Anyone?
Mardroide
Mardroide2y ago
message.reply({ content: '' }); maybe and put it in line and you are using a server to host the bot? .
Erin
Erin2y ago
Yes, I am hosting it on my VPS just like I always have. I actually was messing with the server and reinstalled EVERYTHING from scratch.
root@flowering-goodness:~/codinghelp-bot# node -v
v16.17.1
root@flowering-goodness:~/codinghelp-bot# npm -v
8.19.2
root@flowering-goodness:~/codinghelp-bot# npm list
codinghelp-bot@ /root/codinghelp-bot
+-- @discordjs/builders@0.12.0
+-- @discordjs/rest@0.3.0
+-- @psibean/discord.js-pagination@4.0.5
+-- discord.js-ghost-ping@2.1.4
+-- discord.js@14.6.0
+-- moment@2.29.4
+-- mysql2@2.3.3
`-- pm2@5.2.0
root@flowering-goodness:~/codinghelp-bot# node -v
v16.17.1
root@flowering-goodness:~/codinghelp-bot# npm -v
8.19.2
root@flowering-goodness:~/codinghelp-bot# npm list
codinghelp-bot@ /root/codinghelp-bot
+-- @discordjs/builders@0.12.0
+-- @discordjs/rest@0.3.0
+-- @psibean/discord.js-pagination@4.0.5
+-- discord.js-ghost-ping@2.1.4
+-- discord.js@14.6.0
+-- moment@2.29.4
+-- mysql2@2.3.3
`-- pm2@5.2.0
Mardroide
Mardroide2y ago
but not always its reinstalling all pm2 on?
Erin
Erin2y ago
Yes, that's what I am using to view the logs and run it rn. Happens with node . or pm2
Mardroide
Mardroide2y ago
but pm2 works diferent try to start pm2
Erin
Erin2y ago
@mardroide I am...
Mardroide
Mardroide2y ago
ohh okey my bad so the error its when you start the bot and no get online
Erin
Erin2y ago
Correct... happens when the bot tries to load the "ready" event. Rn it works fine (just restarted twice) but earlier it wasn't.
Mardroide
Mardroide2y ago
so works eventually you stop pm2 process when closing vps?
Erin
Erin2y ago
I never turn off my VPS So my bot runs 24/7
Mardroide
Mardroide2y ago
thats logic network connection work well on the vps?