PuzzleUser puzzleUser = await PuzzleUser.GetPuzzleUserForCurrentUser(dbContext, authContext.User, userManager);
Event thisEvent = await GetEventFromRoute();
if (thisEvent != null && await puzzleUser.IsRegisteredForEvent(dbContext, thisEvent))
{
authContext.Succeed(requirement);
}
Repro steps:
Result: crash!
Possible causes discussed on discord:
Possible crash dump: https://portal.azure.com/#view/AppInsightsExtension/ViewDebugInfoBlade/ComponentId~/%7B%22SubscriptionId%22%3A%22569b1f1c-2487-4adc-ae04-343095c10a4e%22%2C%22ResourceGroup%22%3A%22puzzlehunt_rg%22%2C%22Name%22%3A%22puzzlehunt%22%2C%22LinkedApplicationType%22%3A0%2C%22ResourceId%22%3A%22%2Fsubscriptions%2F569b1f1c-2487-4adc-ae04-343095c10a4e%2FresourceGroups%2Fpuzzlehunt_rg%2Fproviders%2Fmicrosoft.insights%2Fcomponents%2Fpuzzlehunt%22%2C%22ResourceType%22%3A%22microsoft.insights%2Fcomponents%22%2C%22IsAzureFirst%22%3Afalse%7D/StampId/westus2-ey2ahqc2dsyvq/SnapshotId/e85dbbd38faf446cab0a1aa85c99e948/SnapshotTimestamp/2025-08-13T03%3A53%3A25.7590468Z/OpenedFrom/DetailsIFramePart_%5Bobject%20Object%5D
Also found, another possible crash on line 170 of AuthorizationHelper.cs: