fix(self-update): minimal asInvoker manifest — stop uffs-update.exe SxS crash (os error 14001)#456
Merged
Merged
Conversation
…xS crash (os error 14001) The asInvoker manifest added in #454 (to defeat Installer Detection / os error 740) made the cross-compiled uffs-update.exe fail to *start at all* on Windows with ERROR_SXS_CANT_GEN_ACTCTX (os error 14001, "side-by-side configuration is incorrect"). Every invocation died, including the apply-phase smoke test (`uffs-update --version`), so `uffs --update` rolled back with "smoke test failed for uffs-update". Root cause: the richer manifest carried `<assemblyIdentity>` (plus a `<compatibility>` supportedOS block and `<windowsSettings>`). `<assemblyIdentity>` in an application manifest makes the loader attempt a side-by-side assembly resolution that fails for a plain console binary — ERROR_SXS_CANT_GEN_ACTCTX. Fix: strip the manifest to the single thing this helper needs — a `trustInfo`/`asInvoker` block — removing every SxS activation-context surface. This keeps the #454 740-fix (asInvoker still defeats Installer Detection) while eliminating the 14001 crash. Verified by cross-compiling (cargo xwin) and inspecting the embedded PE manifest: `requestedExecutionLevel level="asInvoker"` present; zero real `<assemblyIdentity type=>` / `<supportedOS Id=>` elements. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
githubrobbi
added a commit
that referenced
this pull request
Jun 18, 2026
…S 14001 cause (#457) The actual root cause of uffs-update.exe failing to start with ERROR_SXS_CANT_GEN_ACTCTX (os error 14001, "Invalid Xml syntax ... on line 1") was a literal double hyphen inside the manifest's XML comment: the comment body contained the example CLI invocation `uffs --update`, and XML forbids "--" anywhere inside a <!-- --> comment. Windows' strict side-by-side manifest parser rejected the whole manifest. This was present in BOTH the original #454 manifest and the #456 "minimal" rewrite — both carried that same `uffs --update` line in the comment — which is why #456 (dropping <assemblyIdentity>) did not fix it. The Application event log (SideBySide id 59) pinpointed it: "Error in manifest or policy file ... on line 1. Invalid Xml syntax." Fix: reword the comment so no "--" appears in the body, and add an explicit DO-NOT-USE-double-hyphen warning so this never regresses. Verified by extracting the embedded RT_MANIFEST from a freshly cross-compiled uffs-update.exe and running `xmllint --noout` on it: now well-formed (previously malformed). asInvoker is retained, so the #454 Installer-Detection / os error 740 fix still stands. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After #454 shipped (v0.6.9),
uffs-update.exefails to start at all on Windows:Every invocation dies — including the apply-phase smoke test (
uffs-update --version) — souffs --updaterolls back with "smoke test failed for uffs-update". The self-updater can't even update itself.Root cause
The asInvoker manifest added in #454 (to defeat Installer Detection /
os error 740) also carried<assemblyIdentity>, a<compatibility>supportedOS block, and<windowsSettings>.<assemblyIdentity>in an application manifest makes the loader attempt a side-by-side assembly resolution that fails for a plain console binary →ERROR_SXS_CANT_GEN_ACTCTX(14001).uffs.exehappened to survive the same elements, butuffs-update.exedid not — so rather than chase the exact divergence, strip the manifest to only what this helper needs.Fix
Reduce
app.manifestto a singletrustInfo/asInvokerblock — removing every SxS activation-context surface (assemblyIdentity,compatibility,windowsSettings). This:asInvokerstill defeats Installer Detection (no moreos error 740), andVerification
Cross-compiled with
cargo xwinand inspected the embedded PE manifest:requestedExecutionLevel level="asInvoker"— present (1)<assemblyIdentity type=>— 0<supportedOS Id=>— 0🤖 Generated with Claude Code