-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Table.razor.cs #2797
Update Table.razor.cs #2797
Conversation
In DisposeAsync() Method of Tab.razor.cs, I add a try - catch around the JSInterop call method "await JsInvokeAsync(JSInteropConstants.UnbindTableScroll, _tableBodyRef);" in order to prevent some error and warning entry in the Windows Event Viewer.
Codecov ReportBase: 41.59% // Head: 41.63% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2797 +/- ##
==========================================
+ Coverage 41.59% 41.63% +0.04%
==========================================
Files 544 544
Lines 25712 25740 +28
Branches 260 260
==========================================
+ Hits 10694 10718 +24
- Misses 14978 14982 +4
Partials 40 40
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. β View full report at Codecov. |
π€ This is a ...
π Related issue link
#2794
π‘ Background and solution
Here the details of the Error:
Category: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer
EventId: 100
Unhandled exception rendering component: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
Exception:
Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at AntDesign.AntComponentBase.JsInvokeAsync(String code, Object[] args)
at AntDesign.Table`1.DisposeAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c__DisplayClass69_0.<g__HandleAsyncExceptions|1>d.MoveNext()
Our apps run in .NET 6.0, with Visual Studio 2022, in Blazor Server and 0.12.5 package version of Ant-Design-Blazor.
For information, it's not an issue you can see in your apps, even our logging error system doesn't see it. It occured when SignalR connection is disconnected. As we can see in the error details, it happened because of the method DisposeAsync() of the component Table. After a quick check, we can see that in this method we can foud in Table.razor.cs, there is a call to a jsInterop method.
In DisposeAsync() Method of Tab.razor.cs, I add a try - catch around the JSInterop call method "await JsInvokeAsync(JSInteropConstants.UnbindTableScroll, _tableBodyRef);" in order to prevent some error and warning entry in the Windows Event Viewer.
π Changelog
There is no changes from userside