From eafe84f01373a713c4a3cdf93416ceba1a0c343c Mon Sep 17 00:00:00 2001 From: Robert M1 <50460704+githubrobbi@users.noreply.github.com> Date: Wed, 17 Jun 2026 21:56:00 -0700 Subject: [PATCH] =?UTF-8?q?fix(self-update):=20remove=20'--'=20from=20mani?= =?UTF-8?q?fest=20XML=20comment=20=E2=80=94=20the=20real=20SxS=2014001=20c?= =?UTF-8?q?ause?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ) 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 --- crates/uffs-update/app.manifest | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/uffs-update/app.manifest b/crates/uffs-update/app.manifest index bfbac68b9..60640a450 100644 --- a/crates/uffs-update/app.manifest +++ b/crates/uffs-update/app.manifest @@ -10,8 +10,14 @@ heuristic from force-elevating this binary purely because its NAME contains "update" — without it, `uffs.exe` (non-elevated) cannot spawn `uffs-update.exe`; it fails with ERROR_ELEVATION_REQUIRED (os error 740), - breaking every `uffs --update` operation. The self-update helper only - rewrites files in the user's own install dir; it never needs Administrator. + breaking every `uffs` self-update operation. The helper only rewrites + files in the user's own install dir; it never needs Administrator. + + DO NOT write a double hyphen anywhere inside this comment block. XML + forbids "- -" (no space) in a comment body, and Windows' side-by-side + manifest parser rejects the whole manifest as "Invalid Xml syntax" if it + finds one — which is exactly the os error 14001 crash this file once had + (the old comment contained the literal CLI flag with two leading dashes). WHY MINIMAL — nothing but `trustInfo`: an earlier, richer version of this manifest (with ``, a `` supportedOS block,