[ERR_IPC_CHANNEL_CLOSED]

Since a few days this error randomly occurs and the shard then goes offline. The error:
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
at new NodeError (node:internal/errors:405:5)
at target.send (node:internal/child_process:747:16)
at module.exports.<anonymous> (/home/container/node_modules/discord.js/src/sharding/ShardClientUtil.js:43:19)
at module.exports.emit (node:events:517:28)
at WebSocketManager.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:271:19)
at WebSocketManager.emit (/home/container/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/home/container/node_modules/@discordjs/ws/dist/index.js:1173:51)
at WebSocketShard.emit (/home/container/node_modules/@vladfrangu/async_event_emitter/dist/index.js:290:37)
at WebSocketShard.destroy (/home/container/node_modules/@discordjs/ws/dist/index.js:739:14)
at async WebSocketShard.onMessage (/home/container/node_modules/@discordjs/ws/dist/index.js:996:9) {
code: 'ERR_IPC_CHANNEL_CLOSED'
} uncaughtException
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
at new NodeError (node:internal/errors:405:5)
at target.send (node:internal/child_process:747:16)
at module.exports.<anonymous> (/home/container/node_modules/discord.js/src/sharding/ShardClientUtil.js:43:19)
at module.exports.emit (node:events:517:28)
at WebSocketManager.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:271:19)
at WebSocketManager.emit (/home/container/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/home/container/node_modules/@discordjs/ws/dist/index.js:1173:51)
at WebSocketShard.emit (/home/container/node_modules/@vladfrangu/async_event_emitter/dist/index.js:290:37)
at WebSocketShard.destroy (/home/container/node_modules/@discordjs/ws/dist/index.js:739:14)
at async WebSocketShard.onMessage (/home/container/node_modules/@discordjs/ws/dist/index.js:996:9) {
code: 'ERR_IPC_CHANNEL_CLOSED'
} uncaughtException
` It's doesn't occur when the bot is starting. I have a "live leaderboard" which is sent every hour (with node-cron). In that file I use the broadcastEval function. I think the error sometimes occurs when the broadcastEval function is called. But not always and only on some shards. Maybe a little more info about the bot. It is on round about 8500 guilds and has 9 shards. I use node version 18.20.3. With my test bot is doesn't happen. I tried this fix but it didn't work for me. (When I changed sharding mode to "worker" some things didn't work) Do you have any idea how to solve that issue? Thanks in advance :D
GitHub
Duplicating shards for unknown reason + ERR_IPC_CHANNEL_CLOSED · Is...
Which package is this bug report for? discord.js Issue description From the 11th of January my djs bot randomly duplicates shards when I had changed nothing in my code. It happened multiple times l...
4 Replies
d.js toolkit
d.js toolkit5mo ago
- 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!
Luamix
LuamixOP5mo ago
If you need any more information just ask :D I thought the ShardingManager thing would be the easiest to do didn't knew that there are other possibilities.
Luamix
LuamixOP5mo ago
But isn't internal sharding more for bots with less guilds?
No description
Luamix
LuamixOP5mo ago
ah okay, so would you recommend using internal sharding? The priveleged intents or the "normal intents"? Okay thanks are there some intents which aren't possible to use in internal sharding? okay thanks for your help
Want results from more Discord servers?
Add your server