Using a Blazor application and Firefox, upon closing the window/application, CircuitHandler OnCircuitClosedAsync is not called. #57996
Labels
area-blazor
Includes: Blazor, Razor Components
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
question
Status: Resolved
Is there an existing issue for this?
Describe the bug
While running a Blazor application, upon opening a new window in MS Edge, Chrome, and Firefox, the OnCircuitOpenedAsync method is called in the CircuitHandler.
However, the problem is that the CircuitHandler method OnCircuitClosedAsync method is NOT called when you close a firefox window/application. The other browsers closing action causes the method to be called.
Expected Behavior
Upon closing Firefox window/browser the OnCircuitAsync method should be called to nofity of the circuit closure.
Steps To Reproduce
In Visual Studio, Set a breakpoint on OnCircuitOpenedAsync and OnCircuitClosedAsync method. Run the application. Open Firefox and access the application. Notice that OnCircuitOpenedAsync is called. Close Firefox browser. Observe OnCircuitClosedAsync is never called.
Exceptions (if any)
None
.NET Version
8.0.401
Anything else?
Visual Studio 2022 Enterprise Version 17.11.4
dotnet --info
.NET SDK:
Version: 8.0.401
Commit: 811edcc344
Workload version: 8.0.400-manifests.251308be
MSBuild version: 17.11.4+37eb419ad
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.401\
.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[android]
Installation Source: VS 17.11.35312.102
Manifest Version: 34.0.113/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.113\WorkloadManifest.json
Install Type: FileBased
[maui-windows]
Installation Source: VS 17.11.35312.102
Manifest Version: 8.0.82/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.82\WorkloadManifest.json
Install Type: FileBased
[maccatalyst]
Installation Source: VS 17.11.35312.102
Manifest Version: 17.5.8030/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.5.8030\WorkloadManifest.json
Install Type: FileBased
[ios]
Installation Source: VS 17.11.35312.102
Manifest Version: 17.5.8030/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.5.8030\WorkloadManifest.json
Install Type: FileBased
[wasm-tools-net6]
Installation Source: VS 17.11.35312.102
Manifest Version: 8.0.8/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net6\8.0.8\WorkloadManifest.json
Install Type: FileBased
[wasm-tools-net7]
Installation Source: VS 17.11.35312.102
Manifest Version: 8.0.8/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net7\8.0.8\WorkloadManifest.json
Install Type: FileBased
[wasm-tools]
Installation Source: VS 17.11.35312.102
Manifest Version: 8.0.8/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.8\WorkloadManifest.json
Install Type: FileBased
[aspire]
Installation Source: VS 17.11.35312.102
Manifest Version: 8.1.0/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.1.0\WorkloadManifest.json
Install Type: FileBased
Host:
Version: 8.0.8
Architecture: x64
Commit: 08338fcaa5
.NET SDKs installed:
8.0.400 [C:\Program Files\dotnet\sdk]
8.0.401 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.33 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
The text was updated successfully, but these errors were encountered: