Skip to content
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

Windows: Discord.js Sharding doesn't work #9591

Open
smokey019 opened this issue Mar 23, 2024 · 2 comments
Open

Windows: Discord.js Sharding doesn't work #9591

smokey019 opened this issue Mar 23, 2024 · 2 comments
Labels
bug Something isn't working needs repro Needs an example to reproduce windows An issue that only occurs on Windows

Comments

@smokey019
Copy link

What version of Bun is running?

1.0.35-canary.4+ee5fd51e8

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

Use Discord.js sharding

What is the expected behavior?

Launches multiple shards.

What do you see instead?

Segmentation fault at address 0xffffffffffffffff
???:?:?: 0x7ff74162c6f6 in ??? (bun.exe)
???:?:?: 0x7ff73fdf37fd in ??? (bun.exe)
???:?:?: 0x7ff73fde69eb in ??? (bun.exe)
???:?:?: 0x7ff73fde643f in ??? (bun.exe)
???:?:?: 0x7ff73f18f891 in ??? (bun.exe)
???:?:?: 0x7ff7415c7d6a in ??? (bun.exe)
???:?:?: 0x7ff73f1089ae in ??? (bun.exe)
???:?:?: 0x7ff73f131fba in ??? (bun.exe)
???:?:?: 0x7ff73f12036e in ??? (bun.exe)
???:?:?: 0x7ff73ee516f4 in ??? (bun.exe)
???:?:?: 0x7ff7419694c3 in ??? (bun.exe)
???:?:?: 0x7fff154b257c in ??? (KERNEL32.DLL)
???:?:?: 0x7fff16f2aa57 in ??? (ntdll.dll)
176 |       const onDeath = () => {
177 |         cleanup();
178 |         reject(new DiscordjsError(ErrorCodes.ShardingReadyDied, this.id));
179 |       };
180 |
181 |       const onTimeout = () => {
                     ^
error: Shard 2's process exited before its Client became ready.
 code: "ShardingReadyDied"

      at onDeath (C:\Users\jbate\OneDrive\Desktop\smokeybot\node_modules\discord.js\src\sharding\Shard.js:181:16)
      at native:1:1
      at emit (native:1:1)
      at _handleExit (C:\Users\jbate\OneDrive\Desktop\smokeybot\node_modules\discord.js\src\sharding\Shard.js:441:4)
      at emit (native:1:1)
      at #handleOnExit (native:1:1)
      at processTicksAndRejections (native:1:1)

Additional information

The bot does seem to run afterwards and doesn't close out all the shards, but it just randomly closes out that shard on load.

@smokey019 smokey019 added the bug Something isn't working label Mar 23, 2024
@smokey019 smokey019 changed the title Discord.js Sharding doesn't work Windows: Discord.js Sharding doesn't work Mar 23, 2024
@Electroid Electroid added the windows An issue that only occurs on Windows label Mar 24, 2024
@Electroid
Copy link
Contributor

Would it be possible to share a minimal reproduction in code? Does this happen all the time, or only sometimes when using sharding?

@Electroid Electroid added the needs repro Needs an example to reproduce label Mar 24, 2024
@smokey019
Copy link
Author

Would it be possible to share a minimal reproduction in code? Does this happen all the time, or only sometimes when using sharding?

the code is available over at my repo here . it happens randomly during sharding.

seems like it will crash while initially loading sometimes then it will automatically restart that shard and it's fine. but every initial load i'll get at least one (my bot loads 3 shards. you won't be able to load multiple shards in a test environment i don't think)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro Needs an example to reproduce windows An issue that only occurs on Windows
Projects
None yet
Development

No branches or pull requests

2 participants