Socket Error & Weird Issue
See original GitHub issueGood day,
So lately i’ve been having a bizarre error. Basically when the bot is already started and i try to invite it on a new server no commands work on it. On the other side if the bot was already present when i started the code then everything works. The only solution i found was restarting the bot so everything starts working again.
Digging around with the debug i found the following:
[2022-04-14 02:33:55 +03:00] [108 /WebSocketRec] [Error] Socket handler suppressed an exception
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1.get_Value()
at DSharpPlus.DiscordClient.UpdateUser(DiscordUser usr, Nullable`1 guildId, DiscordGuild guild, TransportMember mbr)
at DSharpPlus.DiscordClient.UpdateMessage(DiscordMessage message, TransportUser author, DiscordGuild guild, TransportMember member)
at DSharpPlus.DiscordClient.PopulateMessageReactionsAndCache(DiscordMessage message, TransportUser author, TransportMember member)
at DSharpPlus.DiscordClient.OnMessageCreateEventAsync(DiscordMessage message, TransportUser author, TransportMember member, TransportUser referenceAuthor, TransportMember referenceMember)
at DSharpPlus.DiscordClient.HandleDispatchAsync(GatewayPayload payload)
at DSharpPlus.DiscordClient.HandleSocketMessageAsync(String data)
at DSharpPlus.DiscordClient.<InternalConnectAsync>g__SocketOnMessage|391_1(IWebSocketClient sender, SocketMessageEventArgs e)
Since this is a very big issue i think its sort of urgent. I use Windows 10, Visual Studio 2019 with .NET 5.0. My NUGET packages are all updated except for entity framework core and entity framework core design which give an error when updating (i guess because they need .NET 6.0). Otherwise everything is updated. To be noted that this error is somewhat new, 3/4 weeks more or less, because before that it was working and no modifications were applied to the bot’s settings or similar before and after it started to show these errors. Any help is welcome thank you very much!
Issue Analytics
- State:
- Created a year ago
- Comments:19 (9 by maintainers)
Top GitHub Comments
Understandable, i will take note of that thank you. i heard discord was breaking stuff yeah but i did not expect it to go so much against a wall.
Thank you for the extremely fast help and assistance! I am just glad i fixed the problem and now i know to use the nightly ones, i did not know that i had to use those…so i kept to the stable ones. Thank you once again for your help!