Random shard sessionInfo errors
Hello,
I have recently started getting an error when trying to start my bot.
The error seems to be coming from DiscordJS directly, I have not written this code.
It also happens on my bot host/vps and I changed no code, it just started happening. I have tried switching my DiscordJS version to the latest, the dev and others but the error persists.
If you want to take a look at the source code, it is all here:
https://github.com/CuteNikki/discord-bot/
(also ik discord-player is against tos, pls don't mention it)
10 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!
- ✅
Marked as resolved by OP:nyaDed: I'm not violating anything, I'm not even using it, it's just there
I can remove it rn if that makes you happy
also I'm pretty sure it's okay if you only use soundcloud with it
Yeah, I copied it over a while ago
3h ago? Where are you getting that from
The git commit for it is 2 months ago
and the code for it was written much earlier than that
anyways, that's not what I created this forum post for
I updated the file 3 days ago but only to the SlashcommandBuilder
there you go
oops I didn't remove the ffmpeg part from the setup part in the readme
The issue seems to be gone again now
My bot is starting fine
The issue is only happening on my host with the exact same code atm
locally it works
Yeah, I also deleted the node modules folder locally and on the host and reinstalled everything so idk
it's definitely an issue that exists in the latest as well as the dev version
this is what some more clever people (from the sharding package I use) said
No, it also did the same when I started the bot without the ShardingManager
but right now it's working again locally and on the host
Yeah, chrissy said two different things and put an OR between them
he was just assuming what could have gone wrong there
I don't think they logged anything, just told me to do that but I was unable to at the time
The problem here is definitely that shard is being accessed even though it could be undefined
Odd that I got the same error without using the third party sharding manager then
I can't log anything while it's fine right now, I can do that if it happens again though
I'm just very confused by the inconsistency of this issue
sometimes it works and sometimes it doesn't
I can't reproduce it, just showed up a few times yesterday and then it doesn't work for a while.
But when it happened I commented out anything related to the Sharding Manager in my client class and started the bot file directly (not the sharding manager file) and got the same error again
it just goes away after waiting for maybe around 20-30 minutes
I said that commenting it out didn’t work either
I still get the same error, it doesn’t matter if i use the sharding manager or not
No, i did not receive that error
I was running a dev bot that’s only in one guild
@Qjuh It seems to happen again and the console log shows that the shardId is undefined
Running the bot without any kind of sharding results in the exact same error
(just want to add that this is also no issue with bun, I tried others)
Printing this.shards results in this:
I also added the warn and debug events to see if there might be an issue with discord but the only thing it logs is this:
and then the error right after that..
I also want to add that this is the third device that I have run this code on and gotten the exact same issue
I just cloned the repo as is, installed the packages and then tried multiple ways to start the bot
I'll go ahead and mark this as solved because of what didinele said on the github issue:
so if anyone comes across this error, just remove the "@discordjs/ws": "dev" override in your package.json