This took a little more finagling than the samples but I was able to get it working and the UI coming up, but I'm on .NET Core 3.1 and that seems to be par for the course on a lot of packages ;)
The issue I was running into was anytime I would click on Jobs or Triggers there'd be a NullReferenceException thrown out of System.Runtime.CompilerServices.AsyncStateMachineBox. Digging into this I was able to trace it to:
This exception was originally thrown at this call stack:
SilkierQuartz.Controllers.JobsController.AdditionalData()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in ExceptionDispatchInfo.cs
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) in TaskAwaiter.cs
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) in TaskAwaiter.cs
System.Runtime.CompilerServices.TaskAwaiter<TResult>.GetResult() in TaskAwaiter.cs
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultTypeMapper, Microsoft.Extensions.Internal.ObjectMethodExecutor, object, object[]) in ActionMethodExecutor.cs
specifically this line:
var history = await Scheduler.Context.GetExecutionHistoryStore().FilterLastOfEveryJob(10);
That call to GetExecutionHistory I suspect is the culprit returning null. By default the history plugin is not enabled, but once I was able to figure out how to add it in my startup, the NullReference went away. If anyone else comes across this, here's what I did:
This took a little more finagling than the samples but I was able to get it working and the UI coming up, but I'm on .NET Core 3.1 and that seems to be par for the course on a lot of packages ;)
The issue I was running into was anytime I would click on Jobs or Triggers there'd be a NullReferenceException thrown out of System.Runtime.CompilerServices.AsyncStateMachineBox. Digging into this I was able to trace it to:
specifically this line:
var history = await Scheduler.Context.GetExecutionHistoryStore().FilterLastOfEveryJob(10);
That call to GetExecutionHistory I suspect is the culprit returning null. By default the history plugin is not enabled, but once I was able to figure out how to add it in my startup, the NullReference went away. If anyone else comes across this, here's what I did:
Installed these packages:
Quartz.Plugins SilkierQuartz.Plugins.RecentHistory
Then you register the history plugin using the properties of the Quartz.SchedulerBuilder and the error vanishes.