Skip to content
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

[Bug] Exceptions being logged during dispose #34

Open
BritBlaster opened this issue Mar 16, 2024 · 1 comment
Open

[Bug] Exceptions being logged during dispose #34

BritBlaster opened this issue Mar 16, 2024 · 1 comment
Labels
Bug Something isn't working Triage Issue needs to be triaged

Comments

@BritBlaster
Copy link

Describe the bug
I am noticing a lot of exceptions being recorded in the log when (automatic) disposing is being called on BlazoredVideo component. Not sure if this is me using the component incorrectly. I think the exception is harmless, but it would be nice to suppress it in the log.

To Reproduce
I am not sure what steps specifically are necessary and under what conditions the log messages are being recorded. Will update this issue if I get more info.

Expected behavior
Log messages suppressed if not indicative of an actual problem.

Screenshots
Example log entry:
"@mt":"Unhandled exception rendering component: {Message}","@l":"Warning","@x":"Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.\r\n at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)\r\n at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)\r\n at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)\r\n at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)\r\n at Microsoft.JSInterop.Implementation.JSObjectReference.DisposeAsync()\r\n at Blazored.Video.BlazoredVideo.DisposeAsyncCore()\r\n at Blazored.Video.BlazoredVideo.System.IAsyncDisposable.DisposeAsync()\r\n at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c__DisplayClass74_0.<g__HandleAsyncExceptions|1>d.MoveNext()","Message":"JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.","EventId":{"Id":100,"Name":"ExceptionRenderingComponent"},"SourceContext":"Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer","RequestId":"0HN2308GEOR03:00000041","RequestPath":"/_blazor/disconnect","ConnectionId":"0HN2308GEOR03","ClientIp":"::1"}

Hosting Model (is this issue happening with a certain hosting model?):

  • Blazor Server

Additional context
Add any other context about the problem here.

@BritBlaster BritBlaster added Bug Something isn't working Triage Issue needs to be triaged labels Mar 16, 2024
@BritBlaster
Copy link
Author

BritBlaster commented Mar 17, 2024

Created a pull request with changes to resolve issue. See https://stackoverflow.com/questions/72488563/blazor-server-side-application-throwing-system-invalidoperationexception-javas for an example of what causes the JSDisconnectedException in Blazor server apps with SignalR.

PR: #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant