JSDisconnectedException on Blazor Server #1227

Closed
opened 2026-01-29 17:50:43 +00:00 by claunia · 2 comments
Owner

Originally created by @eharbitz on GitHub (May 3, 2024).

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
It is a bit hard to trigger the exception consistently. When navigating around on the page where there are Radzen charts this can happen as the component holding the Radzen chart is disposed. Also, when refreshing the page, the exception is sometimes thrown and shows up in for example Sentry. When removing the Radzen nuget package, we don't see this exception being thrown anymore.

Expected behavior
The exception should be caught in a try-catch as explained here: https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/?view=aspnetcore-8.0#javascript-interop-calls-without-a-circuit

Originally created by @eharbitz on GitHub (May 3, 2024). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** It is a bit hard to trigger the exception consistently. When navigating around on the page where there are Radzen charts this can happen as the component holding the Radzen chart is disposed. Also, when refreshing the page, the exception is sometimes thrown and shows up in for example Sentry. When removing the Radzen nuget package, we don't see this exception being thrown anymore. **Expected behavior** The exception should be caught in a try-catch as explained here: https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/?view=aspnetcore-8.0#javascript-interop-calls-without-a-circuit
Author
Owner

@akorchev commented on GitHub (May 3, 2024):

Hi @eharbitz,

We would gladly accept a pull request that implements the suggested change!

@akorchev commented on GitHub (May 3, 2024): Hi @eharbitz, We would gladly accept a pull request that implements the suggested change!
Author
Owner

@eharbitz commented on GitHub (May 3, 2024):

We have stopped using Radzen and that is when we noticed that these exceptions disappeared. So, just wanted to let you know about this issue.

Thanks for creating Radzen, we enjoyed using it, but we had to switch because we didn't get it to work that nicely with Blazor server: The charts caused a lot of signal r messages to be sent when hovering over the charts. So, we have switched to using a pure javascript chart library, and then we do the js interop ourself.

@eharbitz commented on GitHub (May 3, 2024): We have stopped using Radzen and that is when we noticed that these exceptions disappeared. So, just wanted to let you know about this issue. Thanks for creating Radzen, we enjoyed using it, but we had to switch because we didn't get it to work that nicely with Blazor server: The charts caused a lot of signal r messages to be sent when hovering over the charts. So, we have switched to using a pure javascript chart library, and then we do the js interop ourself.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1227