question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] After upgrading to 7.0, you get a Microsoft.JSInterop.JSDisconnectedException when 'unloading' the app

See original GitHub issue

Describe 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:

  1. Create a new Blazor Server project
  2. Add and configure Blazored.Modal
  3. Add a href to any page. E.g. <a href="https://www.google.com">google</a>
  4. Run the App
  5. Click the href
  6. See the error in your output

Expected behavior The error should not happen

Screenshots image

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:closed
  • Created a year ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
chrissaintycommented, Oct 14, 2022

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

0reactions
Schoof-Tcommented, Oct 14, 2022

I am also using .NET 6.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identifying what is causing interop errors : r/Blazor
In my (albeit limited) experience I've found this error occurs after another error has killed your connection. Probably your library (mudblazor ...
Read more >
JSDisconnectedException when trying to dispose ...
The component is trying to do a JS interop call after the browser connection has been closed, so it should throw this exception....
Read more >
JavaScript interop calls cannot be issued at this time. .. ...
This section only applies to Blazor Server apps. JavaScript (JS) interop calls can't be issued after a SignalR circuit is disconnected.
Read more >
ASP.NET Core Blazor JavaScript interoperability (JS interop)
This article explains general concepts on how to interact with JavaScript in Blazor apps. A Blazor app can invoke JavaScript (JS) functions ...
Read more >
NET 6 RC1 Telerik Blazor
JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found