Adding a chatbot and a channel associated with it, then restarting the control panel causes it to crash when it connects to the tgstation-server backend. Deleting the chatbot entry from the database and then restarting the backend remedies the issue in 4.0.1.3 and allows the control panel to connect again without crashing.
Edit: After more testing on the latest release, removing the entry in the database no longer solves the issue.
Backend is running on a ubuntu linux server 18.04 installation with a MariaDB sql server.
Control panel is running on a Windows 10 Pro machine.
System.InvalidCastException: Unable to cast object of type 'Tgstation.Server.ControlPanel.ViewModels.AddChatBotViewModel' to type 'Tgstation.Server.ControlPanel.ViewModels.ChatBotViewModel'.
at Tgstation.Server.ControlPanel.ViewModels.ChatRootViewModel.<Refresh>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Tgstation.Server.ControlPanel.Views.ObjectBrowserItem.<HandleTap>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.<Post>b__0()
at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run()
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Application.Run(Window mainWindow)
at Avalonia.Controls.AppBuilderBase`1.Start[TMainWindow](Func`1 dataContextProvider)
at Tgstation.Server.ControlPanel.ControlPanel.Run(IUrlEncoder urlEncoder, IUpdater updater)
at Tgstation.Server.ControlPanel.Windows.Program.Main()
Adding a chatbot and a channel associated with it, then restarting the control panel causes it to crash when it connects to the tgstation-server backend. Deleting the chatbot entry from the database and then restarting the backend remedies the issue in 4.0.1.3 and allows the control panel to connect again without crashing.
Edit: After more testing on the latest release, removing the entry in the database no longer solves the issue.
Backend is running on a ubuntu linux server 18.04 installation with a MariaDB sql server. Control panel is running on a Windows 10 Pro machine.