Error [ShardingInProcess]: Shards are still being spawned.
- I'm getting an error about Discord.js sharding that is not given an ERROR PATH. How can i find out what this is caused by?
- The numbers that appear as output are because I am logging where the error is coming from
- I brought an update and I don't have the old backup. There is no change in the update about the ShardingManager in shard.js. It was working in the previous version
22 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- 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!Ehh, yes
client.on('ready') once: true
So what should i do?
Well, if I take the place i showed in the 2nd ss and the places I used there in the comment line to understand that the problem is exactly here, there should not be an error, right?
Unfortunately, this is the only place I used those calls when the bot first started
It will be a huge loss for me to make such a mistake while waiting for thousands of servers...
Yes
I removed my Ready file directly from the bot and it is still going on
This is the way it is now, one by one I will try to extract the ready files one by one from the bot
I have removed all the files and now I am trying to add them one by one, I have uploaded 4 folders and now there seems to be no problem. I will figure out which file is the problem and write here again
The problem occurs when I upload this file
But shouldn't the guildDelete event only work when you get kicked off the server?
I don't see anything that is a side effect
This function is also used by guildCreate but it doesn't cause any problems
Also when I activate InviteManager this problem starts to occur
yes
No, let me give you a full ss
I don't know what "OP" means. But when i do these 2 operations, that is, when I put the guildDelete file and activate the InviteManager, I get the same 2 errors
1. SS: No InviteManager, no GuildDelete
2. SS: Have GuildDelete, no InviteManager
3. SS: Have InviteManager, no GuildDelete
ty for info
Yes
No
running node shard.js with start.bat
Yes, W 2012 R2
When i tried it with a single shard, i found that my bot was able to provide a much, much lower efficiency. I didn't think that the increase of shards had such an effect. Only after i fixed a bug in the ready.js Bot's presence setting section, messageCreate.js AI system activation conditions and commands da giveaway start file, this problem started to occur. I didn't even edit a maximum of maybe 40 lines. It was completely fine before
I preferred not to take backup because I made such small changes
1. SS: New
2. SS: Old
I made this change because the bot has the same state on all shards. If I do it the way it was before, it only has that state on shard 0
On Shard 1, no have status and online
Yes.
And I'm still getting errors
very difficult to remove everything starting with client.shard
I use client.shard.ids property in many of my handlers and functions. It can't be caused by this, right?
I do it this way so that it does not log on every shard, it only logs on shard 0
but shardBilgi only use /shard-info command
š
I fixed this problem
Only move connectMongo function in allShardsReady process and use setTimeout
first load mongo and wait 15 seconds
allShardsReady emit code;
I hope that people who encounter this error will hopefully be able to correct their mistakes after these messages. I would also like to thank @Qjuh for taking care of me for a long time.
process allShardsReady code;
The reason i added the timeout is that there are code who use mongo in my events, so i set the loading time of the first mongo to an estimated 15 seconds. In this way, after all the shards are loaded and the mongo is loaded, all other handlers start the loading process.
And i apologize for annoying Qjuh in the process and taking up a lot of his time
What you say is really very true. I will try it right away, thanks again.