You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Discord.API.Rest.GetBotGatewayResponse. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'url', line 1, position 7.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader, JsonObjectContract, JsonProperty, JsonProperty, String, Boolean&) + 0x191
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader, Type, JsonContract, JsonProperty, JsonContainerContract, JsonProperty, Object) + 0x2ab
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader, Type, JsonContract, JsonProperty, JsonContainerContract, JsonProperty, Object) + 0xa4
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader, Type, Boolean) + 0x257
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader, Type) + 0xf3
at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader) + 0x2f
at Discord.API.DiscordRestApiClient.DeserializeJson[T](Stream) + 0x9a
at Discord.API.DiscordRestApiClient.<SendAsync>d__73`1.MoveNext() + 0x17b
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at Discord.API.DiscordRestApiClient.<GetBotGatewayAsync>d__81.MoveNext() + 0x1d2
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at Discord.API.DiscordSocketApiClient.<ConnectInternalAsync>d__34.MoveNext() + 0x247
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at Discord.API.DiscordSocketApiClient.<ConnectInternalAsync>d__34.MoveNext() + 0x457
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at Discord.API.DiscordSocketApiClient.<ConnectAsync>d__33.MoveNext() + 0x1b0
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at Discord.WebSocket.DiscordSocketClient.<OnConnectingAsync>d__114.MoveNext() + 0x2fa
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x42
at Discord.ConnectionManager.<ConnectAsync>d__31.MoveNext() + 0x5f0
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at Discord.ConnectionManager.<>c__DisplayClass29_0.<<StartAsync>b__0>d.MoveNext() + 0x196
Sample
No response
Packages
Newtonsoft.Json - 13.0.3
Discord.Net - 3.10.0
The text was updated successfully, but these errors were encountered:
Check The Docs
Verify Issue Source
Check your intents
Description
AOT deployment not works.
There are some bugs with JSON serialization and deserialization.
[Native-AOT] Using Json Serialize and Deserialize with Native AOT
dotnet/runtimelab#635
How to use source generation in System.Text.Json
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation
Please add support for native AOT deployment.
Version
3.10.0
Working Version
Logs
Sample
No response
Packages
Newtonsoft.Json - 13.0.3
Discord.Net - 3.10.0
The text was updated successfully, but these errors were encountered: