Skip to content

fix: Skip dotnet.js fingerprinting when WasmFingerprintAssets is off - #1088

Merged
MartinZikmund merged 2 commits into
mainfrom
dev/mazi/fingerprint-assets-off
Oct 7, 2026
Merged

MartinZikmund merged 2 commits into
mainfrom
dev/mazi/fingerprint-assets-off

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

Fixes #1087

What changed

With WasmFingerprintAssets=false, the SDK emits unfingerprinted dotnet.js, dotnet.native.js and dotnet.runtime.js. dotnet.js fingerprinting was still on by default, so the publish-time rewrite mistook dotnet.runtime.js for dotnet.<hash>.js. It wrote that into uno-config.js, and the app failed at startup with Cannot read properties of undefined (reading 'withModuleConfig').

  • Root cause: WasmShellEnableDotnetJsFingerprinting now defaults to false when WasmFingerprintAssets is false. An explicit value still wins.
  • Hardening: _UnoUpdateDotnetJsFingerprintPublishOutput also excludes the plain dotnet.native.js / dotnet.runtime.js, matching the WebWorker target. If fingerprinting is forced on while assets aren't fingerprinted, the build now fails with UNOWASM001 instead of producing a broken uno-config.js.
  • Docs: the fingerprinting page mentions the new default.

Validation

src/Uno.Wasm.Tests.Fingerprint/test-fingerprint.sh has a new Test 8: publish with -p:WasmFingerprintAssets=false, then assert that uno-config.js references dotnet.js and the file exists.

  • Before the fix (Windows, .NET 10.0.400): the published uno-config.js had dotnet_js_filename = "dotnet.runtime.js".
  • After the fix, the full script (Tests 1–8) passes locally.
  • -p:WasmFingerprintAssets=false -p:WasmShellEnableDotnetJsFingerprinting=true now fails with error UNOWASM001.

Found via the unoplatform/uno SamplesApp WebAssembly runtime tests on bootstrap 10.1.0-dev.217 (unoplatform/uno#24830). They work around it for now by setting WasmShellEnableDotnetJsFingerprinting=false.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RmQxnEJV3aAPGZu877LCaK

MartinZikmund and others added 2 commits September 30, 2026 15:46
With asset fingerprinting off the SDK emits plain dotnet.native.js and
dotnet.runtime.js, which the publish glob took for dotnet.<hash>.js and
wrote into uno-config.js, so the runtime never started (fixes #1087).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RmQxnEJV3aAPGZu877LCaK
@github-actions

Copy link
Copy Markdown

@mergify

mergify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund merged commit a73a216 into main Oct 7, 2026
18 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/fingerprint-assets-off branch October 7, 2026 15:48
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.

dotnet.js fingerprinting points uno-config.js at dotnet.runtime.js when WasmFingerprintAssets is false

2 participants