-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocketManager trying to access shard info while shard or shardId could be undefined #10410
Comments
Provide me with a reproducible code sample causing this or if that’s not possible at least |
A console log shows that both shardId and shard is undefined. <ref *1> Collection(1) [Map] {
0 => WebSocketShard {
_events: [Object: null prototype] { allReady: [Function (anonymous)] },
_eventsCount: 1,
_maxListeners: undefined,
manager: WebSocketManager {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
gateway: 'wss://gateway.discord.gg/',
shards: [Circular *1],
status: 3,
destroyed: false,
_ws: [WebSocketManager],
totalShards: 1,
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false
},
id: 0,
status: 1,
closeSequence: 0,
ping: -1,
lastPingTimestamp: -1,
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false
}
} |
Are you using overrides of some sort to use a dev build of |
Yes, I am using all these overrrides: "overrides": {
"@discordjs/brokers": "dev",
"@discordjs/builders": "dev",
"@discordjs/collection": "dev",
"@discordjs/core": "dev",
"@discordjs/formatters": "dev",
"@discordjs/proxy": "dev",
"@discordjs/rest": "dev",
"@discordjs/voice": "dev",
"@discordjs/util": "dev",
"@discordjs/ws": "dev"
}, |
I just tried with only the builders override since I need that one and the issue appears to be gone at the moment. |
Yes, we merged a pull request into Feel free to re-open if you can reproduce without the |
Which package is this bug report for?
discord.js
Issue description
Steps to reproduce:
Not always reproducable (the issue randomly shows up and disappears both locally and on my server)
Repo: https://github.com/CuteNikki/discord-bot/
I am using a third-party ShardingManager called discord-hybrid-sharding
but this issue also occurred to me without any kind of Sharding?
So the error I am getting is the following:
The error seems to be happening right here:
My assumption is that either the shard or the shardId was undefined.
In my opinion, shard should first be if checked to see if it even exists before trying to access its properties.
Code sample
No response
Versions
Issue priority
High (immediate attention needed)
Which partials do you have configured?
User, Channel, GuildMember, Message, Reaction, GuildScheduledEvent, ThreadMember
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildModeration, GuildEmojisAndStickers, GuildInvites, GuildVoiceStates, GuildPresences, MessageContent, GuildScheduledEvents, AutoModerationConfiguration, AutoModerationExecution
I have tested this issue on a development release
b2970bb
The text was updated successfully, but these errors were encountered: