Skip to content

[Bug] Exceptions being logged during dispose #34

@BritBlaster

Description

@BritBlaster

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingTriageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions