-
Notifications
You must be signed in to change notification settings - Fork 460
Description
🐛 Bug Report
JSDisconnectedException thrown when using FluentCombobox during page refresh or circuit disposal.
💻 Repro or Code Sample
<FluentCombobox AriaLabel="Pre-selected option" Items="Names" @bind-Value="@name" Height="200px" />
@code{
string? name = "1";
List Names = new List() { "1", "2", "3", "4" };
}
😯 Current Behavior
When refreshing the page or when the Blazor Server circuit disconnects, the following error occurs:
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[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.
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.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
at Microsoft.FluentUI.AspNetCore.Components.FluentCombobox1.DisposeAsync() in /_/src/Core/Components/List/FluentCombobox.razor.cs:line 182 at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c__DisplayClass93_0.<<Dispose>g__HandleAsyncExceptions|0>d.MoveNext() fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] Unhandled exception in circuit 'EkT9isRhuLxzsV4ey3SVbRWJxpCdIeGB5KNj9xNgdmU'. 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.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args) at Microsoft.FluentUI.AspNetCore.Components.FluentCombobox1.DisposeAsync() in /_/src/Core/Components/List/FluentCombobox.razor.cs:line 182
at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c__DisplayClass93_0.<g__HandleAsyncExceptions|0>d.MoveNext()
🌍 Your Environment
- OS & Device: Windows 10,Windows Server 2022
- Browser:Microsoft Edge
- .NET and Fluent UI Blazor library Version [e.g. 9.0.3 and 4.11.8]