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

[Bug]: Serializer Error with many Shards and GUILDS intent #2825

Closed
3 tasks done
Kromzem opened this issue Jan 16, 2024 · 4 comments
Closed
3 tasks done

[Bug]: Serializer Error with many Shards and GUILDS intent #2825

Kromzem opened this issue Jan 16, 2024 · 4 comments
Labels

Comments

@Kromzem
Copy link

Kromzem commented Jan 16, 2024

Check The Docs

  • I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • I verified the issue was caused by Discord.Net.

Check your intents

  • I double checked that I have the required intents.

Description

Hey :)

I have the issue that my bot with ~23 shards refuses to start ...

Everytime a shard tries to connect I get the following error:

[20:20:07 DBG] [Warning][Shard #4] Serializer Error System.ArgumentNullException: Value cannot be null. (Parameter 's') at Discord.Net.Converters.OptionalConverter`1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)

What could be the cause of this error?
If I remove the "GUILDS"-Intent the error disappears.

Version

3.13.0

Working Version

No response

Logs

[20:20:07 DBG] [Warning][Shard #4] Serializer Error  
System.ArgumentNullException: Value cannot be null. (Parameter 's')  
at Discord.Net.Converters.OptionalConverter`1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)  
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)

Sample

No response

Packages

Lavalink4NET.Discord.NET - 4.0.6

Environment

OS: Debian 5.10.197-1 (2023-09-29) x86_64 GNU/Linux
SDK: .NET 8 (Problem existed in .NET 6 too)

@Kromzem Kromzem added the bug label Jan 16, 2024
@Kromzem Kromzem changed the title [Bug]: [Bug]: Serializer Error with many Shards and GUILDS intent Jan 16, 2024
@Misha-133
Copy link
Member

That's a known issue
It has been fixed in #2813
You can use myget nightly feed until we push a patch release

@Kromzem
Copy link
Author

Kromzem commented Jan 16, 2024

@Misha-133 How can I get access to the nightly feed? Everytime when I click on the link in the guides I get to the landing page of myget.com

@Misha-133
Copy link
Member

You need to add it as a nuget source

You can add it system wide:

dotnet nuget add source https://www.myget.org/F/discord-net/api/v3/index.json -n Discord.Net-Myget

or you can specify it in the Nuget.Config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    ...
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="DNet MyGet" value="https://www.myget.org/F/discord-net/api/v3/index.json" />
  </packageSources>
</configuration>

@Kromzem
Copy link
Author

Kromzem commented Jan 16, 2024

Thank you very much I got it working with your help :)

@Kromzem Kromzem closed this as completed Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants