-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3927: change to async method to avoid the exception. #3938
Conversation
@zyhfish this does not resolve the issue. I enabled the "break on exception" for NavigationException(which I had previously disabled based on the Microsoft guidance) and the exception still occurs: |
I am going to roll back this PR as it causes a compilation warning as well (ie. "this async method lacks 'await' operators and will run synchronously") |
Hi @sbwalker , this is weird, I verified the changes in my local and it works fine: anyway, this should not be a real fix but just a trick to avoid the exception to display in the current thread. |
In your screencast in the exception settings, it looks different than mine. The default Visual Studio setting is to have "Break when this exception type is thrown" (like my screen shot above). In yours, this option is not selected - instead you have "break when the exception is user handled" - which I believe is responsible for the different behavior. |
Hi @sbwalker , thx so much for you checking, let me try to check whether can find another possible way to avoid this behavior. |
@zyhfish Note that in the Microsoft issue I also provided some code which is in the Identity bits added to a default .NET 8 Blazor Web app... which appears to provide a workaround for this bug: dotnet/aspnetcore#53996 (comment) Note this this exception does not happen in production - it only happens in Visual Studio when running a debugger - so although it is annoying for developers, there is a workaround by modifying the exception settings - and it does not affect production apps. |
I got the same issue. If I ignore this error, when I publish in Azure, the server is throwing Internal Error.!! |
No description provided.