Yucked/Victoria

[ BUG ] WebSocket is not in an open state. Current state: None

Closed this issue · 5 comments


Describe the bug/issue.

Describe the bug/issue.
Every so often when I try to play a track with the bot I get this error:

"WebSocket is not in an open state. Current state: None".
My bot plays music automatically (no need to write a command or anything), and I've run the bot a lot of times before with the same code and the issue never happened, so I don't think the problem is in my code.
This happens completely randomly, sometimes it works and sometimes it doesn't.

Stacktrace / Screenshots

Discord.Commands.CommandException: Error occurred executing "testrun" for Gameoholic#0001 in Mafia/public.
---> System.InvalidOperationException: WebSocket is not in open state. Current state: None
at Victoria.LavaSocket.SendAsync[T](T value)
at Victoria.LavaPlayer.PlayAsync(LavaTrack lavaTrack)
at Victoria.LavaPlayer.SkipAsync(Nullable`1 delay)
at MafiaBot.Modules.MusicModule.PlaySound(String url) in C:\Users\Name\source\repos\MafiaBot\MafiaBot\Modules\MusicModule.cs:line 168
at MafiaBot.Modules.MusicModule.Play(String sound) in C:\Users\Name\source\repos\MafiaBot\MafiaBot\Modules\MusicModule.cs:line 139
at MafiaBot.Mafia.Game.StartDay(ICommandContext Context) in C:\Users\Name\source\repos\MafiaBot\MafiaBot\Mafia\Game.cs:line 1153
at MafiaBot.Mafia.Game.Start(ICommandContext Context, InteractivityService Interactivity) in C:\Users\Name\source\repos\MafiaBot\MafiaBot\Mafia\Game.cs:line 232
at MafiaBot.Modules.BeforeGame.TestRun(Int32 roleListID) in C:\Users\Name\source\repos\MafiaBot\MafiaBot\Modules\BeforeGame.cs:line 314
at Discord.Commands.ModuleClassBuilder.<>cDisplayClass6_0.<gExecuteCallback|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Discord.Commands.CommandInfo.ExecuteInternalAsync(ICommandContext context, Object[] args, IServiceProvider services)
--- End of inner exception stack trace ---

What version of Victoria?

5.2.1

cxnky commented

also getting this error, #98

Tracking this on #98

FYI, I updated to version 5.2.2 and the issue is still present.