Kurasuta
Kurasuta copied to clipboard
Spawning clusters resolves with `undefined` and then rejects (timeout)
Initially resolved with: undefined
Then rejected with: Error: Cluster 0 took too long to get ready
// My logger
[shard manager] » √ success Clusters spawned
// ...
// Node.js error
Error: Cluster 0 took too long to get ready
at Timeout.setTimeout [as _onTimeout] (D:\username\Documents\Programming\dice-discord\bot\node_modules\.registry.npmjs.org\kurasuta\0.2.18\node_modules\kurasuta\dist\Cluster\Cluster.js:72:37)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
I seem to be having a similar issue, although my Client file never actually gets ran. Can you share your code?
Here's mine: Log:
Fetching Session Endpoint
(node:2060) ExperimentalWarning: The fs.promises API is experimental
Using recommend shard count of 1 shards with 1000 guilds per shard
Starting 1 Shards in 8 Clusters!
Worker spawned with id 1
(node:2071) ExperimentalWarning: The fs.promises API is experimental
(node:2060) UnhandledPromiseRejectionWarning: Error: Cluster 0 took too long to get ready
at Timeout.setTimeout [as _onTimeout] (/mnt/e/Projects/NAME/node_modules/kurasuta/dist/Cluster/Cluster.js:72:37)
at listOnTimeout (timers.js:324:15)
at processTimers (timers.js:268:5)
(node:2060) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise
which was not handled with .catch(). (rejection id: 1)
(node:2060) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero
exit code.
src/index.js: https://awau.moe/626SwfX.png src/Client.js: https://awau.moe/Ag6XTo8.png
I had set a breakpoint @ the launch function but it never gets called in debug. https://awau.moe/6p8bQAb.png
Latest Version of NPM Kurasuta.
Your issue seems like it's unrelated. Try catching each Kurasuta call that returns a Promise
.
Also, breakpoints and other debugger features often don't work for me because of child processes.
Hey, this seems stale, do you still encounter this on the latest version?
I experienced this on v1.1.6 from npm yesterday. Reproduction is really inconsistent, and I don't know what causes this.