NavigationLock throws uncaught JSDisconnectedException on Blazor Server #44795
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Servicing-consider
Shiproom approval is required for the issue
Milestone
Scenario:
<NavigationLock ConfirmExternalNavigation="true" />
to any pageExpected: No exception
Actual: Logs to server console:
Reason
Looks like this is simply because we do this JS interop call during
DisposeAsync
without catching theJSDisconnectedException
.Suggested fix
We should wrap that JS invocation in a
try { ... } catch (JSDisconnectedException) { /* ignored */ }
.The text was updated successfully, but these errors were encountered: