-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
affected-mostThis issue impacts most of the customersThis issue impacts most of the customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-serverfeature-circuit-lifecycleIssues to do with blazor server lifecycle eventsIssues to do with blazor server lifecycle eventsseverity-majorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Description
The Blazor Server client is configured to disconnect the circuit when the user navigates away from a page.
Previously, this disconnect happened on the browser's unload
event, but this event isn't dispatched in all scenarios. it was changed to beforeunload
but that was dispatched on too many scenarios.
We need to figure out a reliable event to listen to that strikes a balance between:
- Being dispatched reliably on all browsers
- Not being dispatched in false positive scenarios (e.g. triggering a download)
Previous issue description
The ClosingTheBrowserWindow_GracefullyDisconnects_WhenNavigatingAwayFromThePage test fails.Output:
Assert.Contains() Failure\r\nNot found: (Debug, CircuitTerminatedGracefully)\r\nIn value: List<ValueTuple<LogLevel, String>> [(Debug, CircuitDisconnectStarted), (Debug, CircuitNotActive), (Information, ExecutedEndpoint), (Information, RequestFinished)]
at Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests.CircuitGracefulTerminationTests.ClosingTheBrowserWindow_GracefullyDisconnects_WhenNavigatingAwayFromThePage() in /_/src/Components/test/E2ETest/ServerExecutionTests/CircuitGracefulTerminationTests.cs:line 87
--- End of stack trace from previous location ---
Metadata
Metadata
Assignees
Labels
affected-mostThis issue impacts most of the customersThis issue impacts most of the customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-serverfeature-circuit-lifecycleIssues to do with blazor server lifecycle eventsIssues to do with blazor server lifecycle eventsseverity-majorThis label is used by an internal toolThis label is used by an internal tool