radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.42k stars 763 forks source link

JSDisconnectedException on Blazor Server #1499

Open eharbitz opened 3 months ago

eharbitz commented 3 months ago

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

akorchev commented 3 months ago

Hi @eharbitz,

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

eharbitz commented 3 months ago

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.