Discord.js: Internal Sharding w/ Zucc throws errors

Created on 1 Oct 2019  路  9Comments  路  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:
When using discord.js' internal sharding with Zucc installed, JSON.parse() in WebSocket.js will throw multiple errors. This prevents the bot from going into the 'ready' state, but will still show online.

Include a reproducible code sample here, if possible:
N/A

Further details:

  • discord.js version: discord.[email protected] (github:discordjs/discord.js#ea8b4e73559d118a826ac3b242c1a3626b4f6d29)
  • Node.js version: v10.16.3
  • Operating system: Windows Home (1903)
  • Priority: Medium; This issue can prevent bots (that use discord.js' sharding) from starting and is fairly hard to debug.
  • [x] I have also tested the issue on latest master, commit hash: ea8b4e73559d118a826ac3b242c1a3626b4f6d29
unverified bug

Most helpful comment

Why does this popular library keep using these new untested packages made by devsnek?

I remember snekfetch (used in version 11) using http/2 experimental api causing warnings to show up in console just for using it and now look at it... archived because he could not maintain it properly and even replaced by node-fetch in this library.

The same thing will happen with this zucc package. as someone who uses this library, I beg that this stops now... I (and many others) do not want to deal with problem that keep arrising from this person's broken packages because he doesn't know to properly code and test.

Thank you for your time and sorry for my bad English.

All 9 comments

i'm publishing a new version of zucc soon that fixes this. it happens with any large guild creates, not limited to internal sharding.

Makes sense, it only happened on the shard handling over 70K members.

Why does this popular library keep using these new untested packages made by devsnek?

I remember snekfetch (used in version 11) using http/2 experimental api causing warnings to show up in console just for using it and now look at it... archived because he could not maintain it properly and even replaced by node-fetch in this library.

The same thing will happen with this zucc package. as someone who uses this library, I beg that this stops now... I (and many others) do not want to deal with problem that keep arrising from this person's broken packages because he doesn't know to properly code and test.

Thank you for your time and sorry for my bad English.

@7chg snekfetch was replaced because node-fetch reached maturity, not because snekfetch was broken. those experimental warnings were there because snekfetch was using http/2 to make http requests faster and more efficient, saving you cpu and bandwidth.

Software has bugs now and again (You'll notice discord.js is currently on 11.5.1, a patch release). I hope you consider as you use this library in Node.js (another piece of software I actively maintain), and JavaScript (a language I maintain) that perhaps the community grows best when we take this in stride rather than making angry posts at strangers on the internet.

I closed the issue because the error is caused by an external library, which is claimed to be fixed soon.

^ technically installing zucc@next might work, but i think there one or two changes needed in discord.js as well. @vladfrangu i think you had tested that a while ago? something with arraybuffers...

If I recall correctly, the change was done in my sharding PR, to make it work with your wasm version of zucc, if not, I'll do it today when I get home @devsnek

I am sorry if you feel my post is angry.

Like you say the software has bugs now and again. But easy way to avoid some bugs is to use "mature" (is this the word?) packages that are proved to work, your packages not so much. I think you will agree here. This is my point.

I did not know you maintain NODE.JS. That is very cool. But for that, there are hundreds others checking working and checking you and you put more effort into working on popular library NODE.JS compared to you're own personal library. There is not many checks for you here. The person here who is deciding on the packages to use for this library is also to blame here because he should do the similar checks.

To conclude, please use "mature" or tried-and-tested packages for this library to avoid extra bugs.

Thank you and sorry for poor English again.

Instead of criticizing his useful package over one fairly small bug, acknowledge that there鈥檚 an issue and it will be fixed and move on.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

xCuzImPro picture xCuzImPro  路  3Comments

tom-barnes picture tom-barnes  路  3Comments

iCrawl picture iCrawl  路  3Comments

kvn1351 picture kvn1351  路  3Comments