/nova/node_modules/.pnpm/discord.js@14.15.3_bufferutil@4.0.8/node_modules/discord.js/src/client/websocket/handlers/RESUMED.js:6
2024-07-26T21:20:46.348970429Z const replayed = shard.sessionInfo.sequence - shard.closeSequence;
2024-07-26T21:20:46.348991867Z ^
2024-07-26T21:20:46.349006540Z
2024-07-26T21:20:46.349021077Z TypeError: Cannot read properties of null (reading 'sequence')
2024-07-26T21:20:46.349035112Z at module.exports [as RESUMED] (/nova/node_modules/.pnpm/discord.js@14.15.3_bufferutil@4.0.8/node_modules/discord.js/src/client/websocket/handlers/RESUMED.js:6:38)
2024-07-26T21:20:46.349106501Z at WebSocketManager.handlePacket (/nova/node_modules/.pnpm/discord.js@14.15.3_bufferutil@4.0.8/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
2024-07-26T21:20:46.349126391Z at WebSocketManager.<anonymous> (/nova/node_modules/.pnpm/discord.js@14.15.3_bufferutil@4.0.8/node_modules/discord.js/src/client/websocket/WebSocketManager.js:239:12)
2024-07-26T21:20:46.349142713Z at WebSocketManager.emit (/nova/node_modules/.pnpm/@vladfrangu+async_event_emitter@2.4.4/node_modules/@vladfrangu/async_event_emitter/src/index.ts:508:28)
2024-07-26T21:20:46.349157516Z at LumiWorkerStrategy.onMessage (/nova/node_modules/.pnpm/@discordjs+ws@1.1.1_bufferutil@4.0.8/node_modules/@discordjs/ws/src/strategies/sharding/WorkerShardingStrategy.ts:296:18)
2024-07-26T21:20:46.349171900Z at Worker.<anonymous> (/nova/node_modules/.pnpm/@discordjs+ws@1.1.1_bufferutil@4.0.8/node_modules/@discordjs/ws/src/strategies/sharding/WorkerShardingStrategy.ts:234:17)
2024-07-26T21:20:46.349187167Z at Worker.emit (node:events:520:28)
2024-07-26T21:20:46.349201254Z at MessagePort.<anonymous> (node:internal/worker:267:53)
2024-07-26T21:20:46.349215684Z at [nodejs.internal.kHybridDispatch] (node:internal/event_target:816:20)
2024-07-26T21:20:46.349230010Z at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)
2024-07-26T21:20:46.349266983Z
2024-07-26T21:20:46.349284055Z Node.js v22.5.1
#Random shutdowns due to sessionInfo being null
35 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- 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
djs: 14.5.3
node: 22.5.1
*i have no resolution overrides at all for any dependency
What is LumiWorkerStrategy there?
An extension of the worker strategy
Show that custom extension then, as I expect it to be the source of your issue
You can do that with the standard worker strategy already though 
It was a pedantic request from the owner
This only happens on shard resume
Which is handled by mainlib
Well, not exclusively. Because the resume is done in /ws and then emitted to mainlib which then checks data sent from /ws on connect to mainlib prior. So that strategy plays a crucial part in finding that issue
You‘re completely outside of support then… manually editing djs internals is a bad idea, instead fixing the original issue would be the better approach
No I only did this after this error came up
That doesn’t change what I said though
If anything you made it not throw an error anymore, but still got broken behavior because a resume without session data is just wrong
It does have session data
The error indicates otherwise
After the patch
That error is before the patch
And this behavior is after the patch
What did you patch?
What exactly, as in what changes to that file did you make
If sequence is missing from the object I replace it with a +1
But it‘s not that sequence is missing… it‘s that sessionInfo is null. So contrary to your claim the sessionInfo is indeed missing. And you just made it ignore that wrong behavior instead of fixing the issue
So expect other issues in the future and don’t come here for support in those cases. Or fix the actual issue (which I‘ll gladly assist in if wanted)
what role does this variable play? https://github.com/discordjs/discord.js/blob/bf6761a44adec1fe5017f6bf5d8bc0734916961f/packages/discord.js/src/client/websocket/handlers/RESUMED.js#L6
is its presence crucial for functionality?
oh, i figured out the issue