#Request aborted error?

14 messages · Page 1 of 1 (latest)

midnight oxide
#

I keep receiving this error:

test-bot/node_modules/undici/lib/api/abort-signal.js:10
    self.onError(new RequestAbortedError())
                 ^

RequestAbortedError [AbortError]: Request aborted
    at abort (/root/test-bot/node_modules/undici/lib/api/abort-signal.js:10:18)
    at AbortSignal.self.<computed> (/root/test-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/test-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'
}

Not sure why.

odd valley
#

• 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.

lusty citrusBOT
#

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.

midnight oxide
#

I don't have a slow connection and I didn't abort anything. This keeps happening on ready

midnight oxide
#

I posted teh full stack trace

#

I am on the lastest discord.js

#

npm is 8.19.2, node is 16.17.1

fallen spindle
#

"latest" discord.js is not a thing

midnight oxide
#

Discord.js v14.6.0

#

Didn't know I had to spell it out.

#

Figured "latest discord.js" = discord.js v14.6.0

midnight oxide
#

I'm getting this on my test bot now.

I believe I updated the restRequestTimeout via ClientOptions.

const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages ], partials: [Partials.Channel], restRequestTimeout: 5000 });

That's how you do it right?

Hasn't helped. Pretty sure this is a bug with DJS v 14.6... been happening since 14.5 for me... (I think?)

Error:

/root/test-bot/node_modules/undici/lib/api/abort-signal.js:10
    self.onError(new RequestAbortedError())
                 ^

RequestAbortedError [AbortError]: Request aborted
    at abort (/root/test-bot/node_modules/undici/lib/api/abort-signal.js:10:18)
    at AbortSignal.self.<computed> (/root/test-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/test-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'

I believe it is a bug because I asked on my coding help server and a fellow mod says he has this issue with one of his bots when he uses whatever host he uses to keep the bot online 24/7 but when he locally hosts it is fine. It is only when he uses whatever host he uses. My bot is on my VPS. I refuse to locally host it.

merry ferry