[Bug] After upgrading to 7.0, you get a Microsoft.JSInterop.JSDisconnectedException when 'unloading' the app
See original GitHub issueDescribe the bug After upgrading to 7.0, when the app becomes unloaded (an unhandled exception occurs, you navigate out of the application…) you now get a JSInterop exception:
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit ‘xvYrH0rxATtOQ2NEdAIpOBnmmBmUMjyWx0Sv_xFkUa0’.
Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
To Reproduce Steps to reproduce the behavior:
- Create a new Blazor Server project
- Add and configure Blazored.Modal
- Add a href to any page. E.g.
<a href="https://www.google.com">google</a>
- Run the App
- Click the href
- See the error in your output
Expected behavior The error should not happen
Screenshots
Hosting Model (is this issue happening with a certain hosting model?):
- Blazor Server
Additional Information Might have something to do with the following: https://github.com/dotnet/aspnetcore/issues/33336
Issue Analytics
- State:
- Created a year ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
Ok, I can see the issue and I’ll get a fix in place. What I still can’t understand is why I can’t get the error locally. Anyway, I appreciate the help figuring this one out
I am also using .NET 6.0