Discord connection closed uncleanly: code 1006Error
when i am on my server i get the /Auth code and when i try to use it with my bot in Discord i get the following error
(15:37:02) | [Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event.
(15:37:02) | [Discord Extension] Attempting to reconnect to Discord...
(15:37:02) | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason:
(15:37:02) | [Discord Extension] Attempting to reconnect to Discord...
(15:37:02) | [Discord Extension] Discord socket opened!
(15:37:02) | [Discord Extension] Attempting resume opcode...
(15:37:02) | [Discord Extension] Discord socket opened!
(15:37:02) | [Discord Extension] Warning: tried to create a heartbeat when one is already registered.
(15:37:02) | [Discord Extension] Attempting resume opcode...
(15:37:02) | [Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event.​
(11:21:20) | Unloaded plugin Discord Status v2.0.4 by Tricky
(11:21:20) | Loaded plugin Discord Status v2.0.4 by Tricky
(11:21:20) | [Discord Extension] Discord socket opened!
(11:21:20) | [Discord Extension] Your bot was found in 1 Guilds!
(11:21:20) | [Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event.
(11:21:20) | [Discord Extension] Attempting to reconnect to Discord...
(11:21:20) | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason:
(11:21:20) | [Discord Extension] Attempting to reconnect to Discord...
(11:21:20) | [Discord Extension] Discord socket opened!
(11:21:20) | [Discord Extension] Attempting resume opcode...
(11:21:20) | [Discord Extension] Discord socket opened!
(11:21:20) | [Discord Extension] Warning: tried to create a heartbeat when one is already registered.
(11:21:20) | [Discord Extension] Attempting resume opcode...
(11:21:20) | [Discord Extension] Session resumed!
(11:21:23) | [Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event.
(11:21:28) | [Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event.
(11:21:34) | [Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event.

Hey - I've been getting the following error a few times a day. It causes such bad lag the players either cannot move/play for a few minutes or they get booted out of the server :(

(18:40:56) | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason: An exception has occurred while receiving.
(18:40:56) | [Discord Extension] Attempting to reconnect to Discord...
(18:41:58) | SteamServer Connection Failure (NoConnection)
(10:24:40) | [Discord Extension] Reconnect has been called (opcode 7)! Reconnecting...
(10:24:40) | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason:
(10:24:40) | [Discord Extension] Attempting to reconnect to Discord...
(10:24:40) | [Discord Extension] Discord socket opened!
(10:24:40) | [Discord Extension] Attempting resume opcode...
(10:24:40) | [Discord Extension] Discord socket opened!
(10:24:40) | [Discord Extension] Warning: tried to create a heartbeat when one is already registered.
(10:24:40) | [Discord Extension] Attempting resume opcode...
(10:24:40) | [Discord Extension] Session resumed!
(10:26:36) | [Discord Core] Heartbeat timed out. Reconnecting
(10:26:37) | [Discord Extension] Discord socket opened!
(10:26:37) | [Discord Extension] Your bot was found in 1 Guilds!
(10:26:37) | [Discord Core] Connected to bot: Discord Core
(10:26:38) | [Discord Core] Discord connected to server:



It still ends up resuming but what if this is what happens every time someone tries to connect to my discord in game using DiscordCore?

got lots of error lines in rcon, and a disconnected bot every 5 minutes:
[Discord Extension] Request URL: [GET] https://discordapp.com/api/gateway
[Discord Extension] Discord connection closed uncleanly: code 1006, Reason: An exception has occurred while connecting. [Discord Extension] Attempting to reconnect to Discord...
[Discord Extension] Discord socket opened!
[Discord Extension] Attempting resume opcode...
[Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event. [Discord Extension] Attempting to reconnect to Discord...
[Discord Extension] Discord socket opened!
[Discord Extension] Your bot was found in 1 Guilds!
[Discord Extension] Discord connection closed uncleanly: code 1000, Reason:
[Discord Extension] Attempting to reconnect to Discord...
[Discord Extension] Error: WSSURL not present! Retrying.. ExType: WebException
[Discord Extension] A web request exception occured (internal error) [RETRY=0/3]. (SocketException: An operation was attempted on something that is not a socket. ) at System.Net.Sockets.Socket.EndReceive (System.IAsyncResult asyncResult) [0x00012] in :0 at System.Net.Sockets.NetworkStream.EndRead (System.IAsyncResult asyncResult) [0x00057] in :0
[Discord Extension] Request URL: [GET] https://discordapp.com/api/gateway ExType: WebException [Discord Extension] A web request exception occured (internal error) [RETRY=1/3]. (SocketException: An operation was attempted on something that is not a socket. ) at System.Net.Sockets.Socket.Send (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags) [0x00016] in :0 at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x0009b] in :0
[Discord Extension] Request URL: [GET] https://discordapp.com/api/gateway
[Discord Extension] Discord connection closed uncleanly: code 1015, Reason: An exception has occurred while connecting. [Discord Extension] Attempting to reconnect to Discord...
[Discord Extension] Discord connection closed uncleanly: code 1015, Reason: An exception has occurred while connecting. [Discord Extension] Attempting to reconnect to Discord...
[Discord Extension] Discord socket opened!​
I get something similar but not getting as much error information. The Bot disconnects and doesn't reconnect to discord unless I reload Rustcord. 
Happening for me too. For weeks it gave a reason, then it kept happining without a reason. Now I am getting this again with the "An exception has occurred while receiving." Not sure whats happening when it calls a reconnect and fails. What is causing it..?

Rcon:
04-29 09:19:48 | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason: An exception has occurred while receiving.
04-29 09:19:48 | [Discord Extension] Attempting to reconnect to Discord...
04-29 09:19:48 | [Discord Extension] Discord socket opened!
04-29 09:19:48 | [Discord Extension] Attempting resume opcode...
04-29 09:19:48 | [Discord Extension] Session resumed!
04-29 09:20:08 | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason: An exception has occurred while receiving.
04-29 09:20:08 | [Discord Extension] Attempting to reconnect to Discord...
04-29 09:20:08 | [Discord Extension] Discord socket opened!
04-29 09:20:08 | [Discord Extension] Attempting resume opcode...
04-29 09:20:08 | [Discord Extension] Session resumed!​
yeah i have the same thing
This occurred on my server and while is was happening players could not join the server.
1:13 AM [Warning] [Discord Extension] Discord connection closed uncleanly: code 1006, Reason: An exception has occurred while receiving.
1:13 AM [Warning] [Discord Extension] Attempting to reconnect to Discord...
01:13 [Error] [Discord Extension] A web request exception occured (internal error) [RETRY=0/3]. (WebException: The request timed out)
at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00049] in <ae22a4e8f83c41d69684ae7f557133d9>:0
at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <ae22a4e8f83c41d69684ae7f557133d9>:0
at Oxide.Ext.Discord.REST.Request.Fire (Oxide.Ext.Discord.REST.Bucket bucket) [0x000b3] in <618cbb3cd1f24a338ef71fa504209e7a>:0​
have exactly the same problem, if you manage to fix it let me know.
hi i think i have same issue like everybody presently that issue pop in loop in my console et i loose my status in the server on discord and ater few sec they comeback normaly i think he have need a update.

(12:22:04) | [Discord Extension] Reconnect has been called (opcode 7)! Reconnecting...

(12:22:04) | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason:

(12:22:04) | [Discord Extension] Attempting to reconnect to Discord...

(12:22:04) | [Discord Extension] Discord socket opened!

(12:22:04) | [Discord Extension] Discord socket opened!

(12:22:04) | [Discord Extension] Attempting resume opcode...

(12:22:04) | [Discord Extension] Warning: tried to create a heartbeat when one is already registered.

(12:22:04) | [Discord Extension] Attempting resume opcode...

Sometimes my bot loses connection to the server. This has happened in all the time I've had it, and I thought it was time to search for help.
All my Discord plugins are updated, so that may not be the problem.

Hope someone can helps.

(01:17:34) | [Discord Extension] Reconnect has been called (opcode 7)! Reconnecting...
(01:17:34) | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason:
(01:17:34) | [Discord Extension] Attempting to reconnect to Discord...
(01:17:34) | [Discord Extension] Discord socket opened!
(01:17:34) | [Discord Extension] Attempting resume opcode...
(01:17:34) | [Discord Extension] Discord socket opened!
(01:17:34) | [Discord Extension] Warning: tried to create a heartbeat when one is already registered.
(01:17:34) | [Discord Extension] Attempting resume opcode...
(01:17:34) | [Discord Extension] Session resumed!​


(18:32:32) | [Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event.
(18:32:32) | [Discord Core] WebSocketError: System.ArgumentNullException: Value cannot be null.
Parameter name: o
  at Newtonsoft.Json.Linq.JToken.FromObjectInternal (System.Object o, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00038] in <7126fb4f5c5b40029458a4f975f98d13>:0
  at Newtonsoft.Json.Linq.JObject.FromObject (System.Object o, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00000] in <7126fb4f5c5b40029458a4f975f98d13>:0
  at Newtonsoft.Json.Linq.JObject.FromObject (System.Object o) [0x00006] in <7126fb4f5c5b40029458a4f975f98d13>:0
  at Oxide.Ext.Discord.WebSockets.SocketListner.SocketMessage (System.Object sender, WebSocketSharp.MessageEventArgs e) [0x00fba] in <618cbb3cd1f24a338ef71fa504209e7a>:0
  at WebSocketSharp.Ext.Emit[TEventArgs] (System.EventHandler`1[TEventArgs] eventHandler, System.Object sender, TEventArgs e) [0x00009] in <7126fb4f5c5b40029458a4f975f98d13>:0
  at WebSocketSharp.WebSocket.messagec (WebSocketSharp.MessageEventArgs e) [0x00003] in <7126fb4f5c5b40029458a4f975f98d13>:0
An exception has occurred during an OnMessage event.
(18:32:32) | [Discord Extension] Attempting to reconnect to Discord...
(18:32:33) | [Discord Extension] Discord socket opened!
(18:32:33) | [Discord Extension] Your bot was found in 1 Guilds!
(18:32:33) | [Discord Core] Connected to bot: Danske Vikinger 2x
(18:32:34) | [Discord Core] Discord connected to server: Danske Vikinger 👑
(18:32:34) | [Discord Core] Bot channel is enabled but there is no channel found with name or id 'bot' on the discord server​
I've seen same issue on my server, but havn't been able to find any answers. Lets hope the developer can help both of us.
same issue !!!
[Discord Extension] An error has occured: Response: An exception has occurred during an OnMessage event.
(23:14:01) | [Discord Extension] Attempting to reconnect to Discord...
(23:14:01) | [Discord Extension] Discord connection closed uncleanly: code 1006, Reason:
(23:14:01) | [Discord Extension] Attempting to reconnect to Discord...
(23:14:02) | [Discord Extension] Discord socket opened!
(23:14:02) | [Discord Extension] Attempting resume opcode...
(23:14:02) | [Discord Extension] Discord socket opened!
(23:14:02) | [Discord Extension] Warning: tried to create a heartbeat when one is already registered.
(23:14:02) | [Discord Extension] Attempting resume opcode...
(23:14:02) | [Discord Extension] Session resumed!