Discord Ban mega-thread! (Discord bot / Something took too long to do)

Hey, I am getting the error

(node:1939) UnhandledPromiseRejectionWarning: Error: Something took too long to do.

I see the bot doesn’t log in correctly into Discord (though the Token is correct)
I also get

[ws] Attempted to destroy WebSocket but no connection exists!

This is also happening to a Friend’s Discord.JS bot hosted on Glitch.
Any ideas on how to solve this?

5 Likes

It happens to me too, but some of the bots are still fast, but the ones i use mostly are down and they have either high ping or not login at all

1 Like

That does seem like odd behavior, but we’re not seeing anything out of the ordinary on any of our hosts. @midnight_ocean, @razefeixx, and @iBisho can you provide project name so we can take a closer look?

2 Likes

I have the same problem

2 Likes

No changes on our end. @zeis974 can you also provide your project name so we can take a look?

4 Likes

The same problem started to my bots too. It also doesn’t look like it is the code, since nothing were changed, and it is returning the same “Something took too long” timeout on login.

1 Like

Same for me as well.

1 Like

Same question for you as well, @Coding (and you, @Naruyoko). Please provide project names so that we can look at them specifically.

1 Like

discord-channel-bot, rosquad @cori :smile:

1 Like

@cori

here is the full error

(node:3217) UnhandledPromiseRejectionWarning: Error: Something took too long to do.

    at timeout.client.setTimeout (/rbd/pnpm-volume/ba5c37af-02df-4742-91c4-c5ceb7c6f78a/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/ClientManager.js:40:57)

    at Timeout.setTimeout [as _onTimeout] (/rbd/pnpm-volume/ba5c37af-02df-4742-91c4-c5ceb7c6f78a/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/Client.js:433:7)

    at ontimeout (timers.js:436:11)

    at tryOnTimeout (timers.js:300:5)

    at listOnTimeout (timers.js:263:5)

    at Timer.processTimers (timers.js:223:10)

(node:3217) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)

(node:3217) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
1 Like

@cori indice-bot and protobot.

1 Like

Thanks for the project names; we’ll take a closer look as soon as we can - probably tomorrow morning.

In the meantime it may be useful for each of you to follow the guidance in https://github.com/discordjs/discord.js/issues/1604#issuecomment-311942193 and catch the error from login() to see if we can sort out where the breakdown is occurring; it might show us a little more detail.

2 Likes

I’ve also been having the same issue with my bot where it says that it is live, but not online on discord. At first I couldn’t figure it out so I commented out certain parts of the code that dealt with timeouts and cooldowns. Funnily enough it seemed like it worked and it came back online on Discord however it immediately went back to it’s previous state and I can not figure out what the error means. My bot’s name is zielo-rules.

1 Like

Hey Cori!

There are people currently relying on the bot, and I would like if you could fix it ASAP. Also, I added the console error thing, but didn’t get any response.

1 Like

I just recently got this error on my bot, too. I added a catch to login, and all that comes up is [Function: bound consoleCall].
Project name is leaf-bot.

EDIT: My bad, I did add the catch, but instead of doing just console.error I had console.log(console.error) due to previous attempts to try and catch out the error. The error message is:

Error: Something took too long to do.

    at timeout.client.setTimeout (/app/node_modules/discord.js/src/client/ClientManager.js:40:57)

    at Timeout.setTimeout [as _onTimeout] (/app/node_modules/discord.js/src/client/Client.js:433:7)

    at ontimeout (timers.js:466:11)

    at tryOnTimeout (timers.js:304:5)

    at Timer.listOnTimeout (timers.js:267:5)

Same issue. Project name is bermuda-fn. My other bots are working fine its just this one

Error: Something took too long to do.

at timeout.client.setTimeout (/rbd/pnpm-volume/0eee7f8a-59cf-4bee-83a9-d7c867095478/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/ClientManager.js:40:57)

at Timeout.setTimeout [as _onTimeout] (/rbd/pnpm-volume/0eee7f8a-59cf-4bee-83a9-d7c867095478/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/Client.js:433:7)

at ontimeout (timers.js:436:11)

at tryOnTimeout (timers.js:300:5)

at listOnTimeout (timers.js:263:5)

at Timer.processTimers (timers.js:223:10)
1 Like

The name of my project and odium-bot

1 Like

Hi All!

Cori, a staff member will be fixing this later this morning.

1 Like

It looks like we have a few IP addresses that have been blacklisted. I’ll be working with another Glitch staff member to resolve that on our end in just a little while.

@Coding are you saying that Discord is also taking a look at this from their end? Do you have a contact that you’re working with - we’d like to be able to resolve this on a more permanent basis and it would help to know someone who’s already aware of this on the Discord side of things.

1 Like

Hey Cori!

I didn’t say that, but I could try to find some discord staff to contact. Can I have a status update plz?

Oh I see. I was saying it as you would be looking into it, not that I’m talking to you.

1 Like