Closed Slut closed 6 years ago
Not seeing this error anymore.
Saw the error again today, bot doesn't listen to discord and appears offline but messages are sent to discord from plugin..
1:01 PM [Error] [Discord Ext] Request callback raised an exception (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.PlayerData+<SendDiscordUserMessage>c__AnonStorey12.<>m__0 (Oxide.Ext.Discord.DiscordObjects.Message Message) [0x00000] in <filename unknown>:0
at Oxide.Ext.Discord.REST.RESTHandler+<>c__DisplayClass6_0`1[Oxide.Ext.Discord.DiscordObjects.Message].<DoRequest>b__0 (Oxide.Ext.Discord.REST.RestResponse response) [0x00000] in <filename unknown>:0
at Oxide.Ext.Discord.REST.Request.Fire (Oxide.Ext.Discord.REST.Bucket bucket) [0x00000] in <filename unknown>:0
Sounds like the WS is getting closed/halted but the REST api is still running. Very strange behaviour, considering the REST api appears to be where those errors are happening.
I put this in the plugin and it happened again but the function wasn't called...
private void DiscordSocket_WebSocketClosed(string reason, int code, bool clean) => LogToFile(Name, $"{DateTime.Now.ToString()} | SOCKET CLOSED! - {reason} CLEAN: {clean} CODE: {code}", this);
@Slut Do you get constant rate limit warnings as well? If not how much population / where is your server located?
I do get warnings but it shouldn't be an issue, are you using the latest development build?
@slut Should be the latest build. Unfortunately the extension itself crashes everyday. Wipe days are the worst. One of the plugins that we use gets to the point where it’s 10-20 minuets behind the actual server chat.
Yeah, trying to find the cause of that issue because it seems to be a one-way websocket when it crashes.
1/24/2018 1:49:25 AM | SOCKET CLOSED! - �o��/l�� ��S��e��r�� ��t��i�� CLEAN: True CODE: 1001
Not 100% sure if this is the cause of it as 1001 code means "Going Away" Also not sure how to parse that reason
1001 | Going Away | The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.
I'm almost 100% that the new extension is freezing up my server somehow. Seems to be the only thing in the logs causing an error before the server freezes. Send me a pm on Discord and i'll send you the logs.
Got the closing socket as well after +/- 3 hours of server-start. Discord bot is offline and not responding :)
Anything I can test as well?
Unfortunately we're not sure what causes that. Not sure if you can pull older updates of the extension as there used to be an auto reconnect feature. If you use it you're risking getting banned by Discord by spam reconnects however. As long as you're not using an intense plugin that is used constantly you should be fine though.
It really depends how frequent the disconnects happen, if you find that it doesn't happen often then feel free to use the auto reconnect feature.
Ah, thanks. Didn't notice that. Looks like it happens +/- 3 hours after server restart, but I figure there's no way to manually restart the extension to check if it happens more frequently then?
Use this and when it closes again go into the Oxide Logs folder and let me know what message it displays. SocketClosed.zip
Will do :)
3/15/2018 10:31:30 PM|Fatal|WebSocket.
Miraculously I din't see any disconnect issues after two weeks ago...
A command to manually disconnect / reconnect the extension would be great. Restarting the server to re-establish the connection kinda sucks.
This is the error I have in logs before I was getting closed for code 1000:
5:55 AM [Error] An exception was thrown! (WebException: The operation has timed out.)
5:55 AM [Stacktrace] at System.Net.WebConnectionStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in
I wonder how that happens, surely @PsychoTea will know
Error below seems to lock up the extension.
10:29 PM [Error] An exception was thrown! (NullReferenceException: Object reference not set to an instance of an object) 10:29 PM [Stacktrace] at Oxide.Ext.Discord.REST.Request.Fire (Oxide.Ext.Discord.REST.Bucket bucket) [0x00000] in:0
at Oxide.Ext.Discord.REST.Bucket.FireRequests () [0x00000] in :0
at Oxide.Ext.Discord.REST.Bucket.RunThread () [0x00000] in :0
at Oxide.Ext.Discord.REST.Bucket.<.ctor>b__27_0 () [0x00000] in :0