Skip to content

[release/8.0] [Blazor] each navigation to external logs 2 errors a minute later #53297

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

Merged
merged 5 commits into from
Jan 16, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 11, 2024

Backport of #53271 to release/8.0

/cc @javiercn

[Blazor] each navigation to external logs 2 errors a minute later

Capture an exception and log a message when navigation fails because the session has ended.

Description

  • The user clicks the link to the target URL.
  • That link is intercepted in the JavaScript.
  • .NET is called to determine if navigation to the URL needs to be prevented.
  • It is determined that there is no need to prevent navigation and "navigateTo" is called via JS interop in NavigationManager.ts.
  • The URL is determined to be external by "navigateTo" and the location is set to the new URL.
  • The unload event in the browser is automatically triggered, which in turn triggers the call to _disconnect.
  • As a result, the promise to "navigateTo" never completes (the page gets unloaded before that) and the associated task in .NET ends up getting cancelled with a timeout.

Fixes #45267

Customer Impact

Customers see a large number of errors in their logs when their sites contain links to external sites, which in turn can trigger alerts in their incident monitoring systems.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

The scenario in which the issue happens is well defined and the fix is simple.

Verification

  • Manual (required)
  • Automated

image

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.1

  • Make necessary changes in eng/PatchConfig.props

@github-actions github-actions bot requested a review from a team as a code owner January 11, 2024 08:01
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Jan 11, 2024
@ghost ghost added this to the 8.0.x milestone Jan 11, 2024
@ghost
Copy link

ghost commented Jan 11, 2024

Hi @github-actions[bot]. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@mkArtakMSFT mkArtakMSFT added the Servicing-consider Shiproom approval is required for the issue label Jan 11, 2024
@ghost
Copy link

ghost commented Jan 11, 2024

Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@mkArtakMSFT mkArtakMSFT added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jan 12, 2024
@ghost
Copy link

ghost commented Jan 12, 2024

Hi @github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

@mkArtakMSFT mkArtakMSFT merged commit 303c6f9 into release/8.0 Jan 16, 2024
@mkArtakMSFT mkArtakMSFT deleted the backport/pr-53271-to-release/8.0 branch January 16, 2024 16:46
@ghost ghost modified the milestones: 8.0.x, 8.0.2 Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components Servicing-approved Shiproom has approved the issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants