.NET Core - Exception when starting up

Tags: #<Tag:0x00007f499ac84598>


I am getting two System.ArgumentNullException: ‘Value cannot be null.
Parameter name: key’ exceptions when starting up a ASP.NET core 2.2 application with Hangfire 1.7.8. The call on which the exception is thrown in both cases is
Hangfire.SqlServer.dll!Hangfire.SqlServer.SqlServerConnection.GetFirstByLowestScoreFromSet(string key, double fromScore, double toScore, int count)

One exception seems to be after calls to DelayedJobScheduler and the other exception is after calls to RecurringJobScheduler

If I skip past the exceptions and continue debugging in my local environment then I am able to bypass these exceptions. I am worried about what will happen in production though. I have a simple hangfire test project with one solution and I get no errors. The project getting errors is the ‘real world’ solution.
Any comments would help. Thank you


Having same issue… any solution yet?


Unfortunately I don’t have an answer to why this issue exists. This issue does not cause problems when run in production - only when running locally. I can say that when updating my entire solution to .NET core 3.1 the issue goes away altogether. To make things more confusing I do not experience this issue on another machine (still with the .NET core 2.2 solution)