When trying to navigate to Dashboard job pages or recurring configuration page, I get a 500 error. It seems this started to occur after I used the Dashboard UI to delete a recurring job that was no longer discoverable because it was renamed. The new one was created and I tried to delete the old one through UI. This is the stacktrace when trying to navigate pages mentioned above.
System.NullReferenceException: Object reference not set to an instance of an object.
at Hangfire.RecurringJobAdmin.Core.JobAgent.<>c__DisplayClass4_1.b__0(String jobId)
at System.Collections.Generic.List1.ForEach(Action
1 action)
at Hangfire.RecurringJobAdmin.Core.JobAgent.GetAllJobStopped()
at Hangfire.RecurringJobAdmin.TagDashboardMetrics.<>c.<.cctor>b__1_0(RazorPage razorPage)
at Hangfire.Dashboard.Pages.InlineMetric.Execute()
at Hangfire.Dashboard.RazorPage.TransformText(String body)
at Hangfire.Dashboard.HtmlHelper.InlineMetric(DashboardMetric metric)
at Hangfire.Dashboard.Pages.SidebarMenu.Execute()
at Hangfire.Dashboard.RazorPage.TransformText(String body)
at Hangfire.Dashboard.HtmlHelper.RenderPartial(RazorPage partialPage)
at Hangfire.Dashboard.HtmlHelper.JobsSidebar()
at Hangfire.Dashboard.Pages.QueuesPage.Execute()
at Hangfire.Dashboard.RazorPage.TransformText(String body)
at Hangfire.Dashboard.RazorPageDispatcher.Dispatch(DashboardContext context)
at Hangfire.Dashboard.AspNetCoreDashboardMiddleware.Invoke(HttpContext httpContext)