Skip to content

fix: Update service worker to fetch dotnet.js instead of dotnet.boot.js for .NET 10 (backport #1004) - #1005

Merged
jeromelaban merged 6 commits into
release/stable/10.0from
unobot/release/stable/10.0/bp1004
Nov 19, 2025
Merged

jeromelaban merged 6 commits into
release/stable/10.0from
unobot/release/stable/10.0/bp1004

Conversation

@unodevops

Copy link
Copy Markdown
Contributor

In .NET 10, dotnet.boot.js was merged into dotnet.js for performance. The service worker still attempted to fetch the non-existent file, causing a 404 error when PWA is enabled.

Changes

  • service-worker.js: Changed fetch target from _framework/dotnet.boot.js to _framework/dotnet.js
  • ShellTask.cs: Updated offline files manifest to reference dotnet.js instead of dotnet.boot.js, and fixed uno-config.js path to include {PackageAssetsFolder}/ prefix for correct PWA caching
  • CI Scripts: Updated all .NET SDK versions from preview builds to stable 10.0.100 release in .github/workflows/ci.yml and build/ci/dotnet-install.yml

The boot configuration extraction logic (regex matching /*json-start*/ and /*json-end*/ markers) remains unchanged, as the format is identical between files.

Warning

<issue_title>[ServiceWorker] Error processing blazor.boot.json: Failed to fetch dotnet.boot.js: 404</issue_title>
<issue_description>### Current behavior 🐛

When PWA is enabled, the service worker shows the following error message:

[ServiceWorker] Error processing blazor.boot.json: Failed to fetch dotnet.boot.js: 404 

This is expected as in net10, this file does not exist anymore.

Expected behavior 🎯

No error message.

How to reproduce it (as minimally and precisely as possible) 🔬

No response

Workaround 🛠️

No response

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

No response

Uno.Sdk version (and other relevant versions) 📦

10.0.10

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

No response</issue_description>

Comments on the Issue (you are @copilot in this section)

Original prompt

This section details on the original issue you should resolve

<issue_title>[ServiceWorker] Error processing blazor.boot.json: Failed to fetch dotnet.boot.js: 404</issue_title>
<issue_description>### Current behavior 🐛

When PWA is enabled, the service worker shows the following error message:

[ServiceWorker] Error processing blazor.boot.json: Failed to fetch dotnet.boot.js: 404 

This is expected as in net10, this file does not exist anymore.

Expected behavior 🎯

No error message.

How to reproduce it (as minimally and precisely as possible) 🔬

No response

Workaround 🛠️

No response

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

No response

Uno.Sdk version (and other relevant versions) 📦

10.0.10

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

This is an automated backport of #1004

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jeromelaban
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@jeromelaban
jeromelaban merged commit 3b70768 into release/stable/10.0 Nov 19, 2025
@jeromelaban
jeromelaban deleted the unobot/release/stable/10.0/bp1004 branch November 19, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants