Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

[Blazor] Enable WebAssembly boot resource retries by default - #70799

Merged
pavelsavara merged 1 commit into
mainfrom
pavelsavara/enable-download-retry
Nov 24, 2026
Merged

pavelsavara merged 1 commit into
mainfrom
pavelsavara/enable-download-retry

Conversation

@pavelsavara

@pavelsavara pavelsavara commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

[Blazor] Enable WebAssembly boot resource retries by default

Let the runtime retry failed Blazor WebAssembly boot resource downloads.

Description

Remove Blazor's enableDownloadRetry: false override so the runtime can recover from a cached empty or error response for a fingerprinted boot resource (dotnet/runtime#136527). Healthy cache hits still use the cache; a failed force-cache fetch can be retried with cache: "reload" without disabling integrity checks. This also enables ordinary bounded runtime retries. Download concurrency is unchanged, and apps can still opt out through configureRuntime.

Validation

  • npm run build --workspace src/Components/Web.JS — passed for Debug and Release on current main with the fix, after rebuilding the SignalR workspaces.
  • From src/Components/Web.JS, ..\..\..\node_modules\.bin\eslint.cmd -c .\src\.eslintrc.js .\src\Platform\Mono\MonoPlatform.ts — passed on current main with the fix.
  • Before moving the one-line fix onto current main, ran the reporter's cache-recovery scenario with local Playwright/Chrome and a published .NET 12 standalone app. The original bundle stayed stuck on a cached empty HTTP 200 or 404 after origin repair. The patched bundle performed exactly one reload fetch with integrity still enabled and rendered on Mono. The next boot used the healthy cache without another origin request, and explicit opt-out preserved the no-retry behavior. CoreCLR passed the download assertions, but end-to-end rendering was not validated with that older checkout's Blazor bundle. The browser repro was not rerun after moving onto current main.

Fixes #69488

This change and PR description were prepared with GitHub Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pavelsavara pavelsavara self-assigned this Nov 23, 2026
@github-actions github-actions Bot added the area-blazor Includes: Blazor, Razor Components label Nov 23, 2026
@pavelsavara pavelsavara added this to the .NET 12 Planning milestone Nov 23, 2026
@pavelsavara
pavelsavara marked this pull request as ready for review November 23, 2026 19:45
@pavelsavara
pavelsavara requested a review from a team as a code owner November 23, 2026 19:45
Copilot AI balanced review requested due to automatic review settings November 23, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The default startup change lacks a permanent browser regression test verifying that an unusable cached fingerprinted resource triggers a reload fetch with integrity checking and allows Blazor to render without explicit retry configuration.

1 open issue
What changed in this PR

Enables the runtime’s default retry behavior for Blazor WebAssembly boot resources, allowing recovery from unusable cached responses described in #69488.

Changes:

  • Removes Blazor’s enableDownloadRetry: false override.
  • Leaves download concurrency unchanged and preserves application opt-out through configureRuntime.
File Description
src/​Components/​Web.JS/​src/​Platform/​Mono/​MonoPlatform.ts Removes the retry-disabling loader setting so runtime defaults apply.

Review effort: Balanced

@PureWeen

Copy link
Copy Markdown
Member

/review

@pavelsavara
pavelsavara merged commit 8a73d98 into main Nov 24, 2026
33 checks passed
@pavelsavara
pavelsavara deleted the pavelsavara/enable-download-retry branch November 24, 2026 16:09
@pavelsavara

Copy link
Copy Markdown
Member Author

/backport to release/11.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 35%

No docs needed: bug-fix-style change enabling runtime download retries by default, with no documented behavior affected. A human could optionally mention the retry behavior in the Blazor WebAssembly caching and integrity article.

Documentation surfaces considered

  • Conceptual article: Not required — Only file changed is MonoPlatform.ts (one-line removal of the retry override). It's an internal resilience fix, and existing docs don't describe download retry behavior.
  • Migration guidance: Not required — No user action required when upgrading.
  • Breaking change: Not required — No removed APIs or failing operations; opt-out remains available.

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — f0914fb0 Deployed Nov 24, 2026 by pavelsavara via conclusion #449
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[blazor-wasm] A cached empty or error response for a boot resource is reused forever (force-cache); the app never boots again, even after a hard reload

5 participants