Skip to content

fix v2.0 elevation chain failing "Deployment interrupted"#23107

Merged
IDCs merged 2 commits into
v2.0from
fix/app-444
May 11, 2026
Merged

fix v2.0 elevation chain failing "Deployment interrupted"#23107
IDCs merged 2 commits into
v2.0from
fix/app-444

Conversation

@IDCs
Copy link
Copy Markdown
Contributor

@IDCs IDCs commented May 11, 2026

  • Fixes "Deployment interrupted" on elevated symlink deploys. Three root causes addressed: (1) --run moved to top of main() so it runs before the renderer's watchdog expires, (2) node_modules/json-socket re-added to asarUnpack, (3) <resourcesPath>/app.asar.unpacked/node_modules prepended to the elevated tmp script's moduleRoot since ELECTRON_RUN_AS_NODE disables Electron's asar redirect.
  • Replaces console.error in elevatedMain (lost in detached elevated process) with a logError helper that writes to vortex.log. Adds [elevation-trace] entries so future failures have a grep-able fingerprint.
  • Drive-by: fixes nxm protocol handler being registered with undefined due to a stray void operator (regression from d443c0e).

fixes APP-444
fixes #23043
fixes #23073

IDCs added 2 commits May 11, 2026 11:31
Three independent issues each broke elevated symlink deployment in v2.0:

1. main.ts ran telemetry/IPC/Sass init before the --run branch, eating the
   renderer's monitorConsent watchdog on UAC-elevated cold starts. The --run
   handler is now the first thing main() does after argv parsing.
2. node_modules/json-socket was no longer in electron-builder's asarUnpack,
   so it wasn't available as a real file to the elevated Node child.
3. runElevated()'s moduleRoot used standard Node paths only. With
   ELECTRON_RUN_AS_NODE=1 the elevated child has no asar redirect, so even
   with json-socket unpacked it wouldn't be found at the asar.unpacked
   location. Prepending <resourcesPath>/app.asar.unpacked/node_modules to
   moduleRoot solves this in production; the path is harmless in dev.

The failure mode was invisible: elevatedMain's handleError only wrote to
console.error, lost in the detached elevated process. Replaced with a
logError helper that appends to vortex.log via ELECTRON_USERDATA. Added
[elevation-trace] entries on the renderer and in main.ts so the next
failure produces a single grep-able fingerprint; [ELEVATED] is reserved
for errors, success is proven by [MAIN] traces + [RENDERER] initialised
received.
makeNXMLinkCallback(api) was wrapped in `void`, which discards the
returned callback function. As a result api.registerProtocol was called
with `undefined` as the handler, so opening nxm:// links did nothing.

Introduced in d443c0e (fix NXM handler notification firing on every
startup) when the call site was wrapped to suppress the unused-return
warning.
@IDCs IDCs self-assigned this May 11, 2026
@IDCs IDCs requested a review from a team as a code owner May 11, 2026 10:36
@IDCs IDCs merged commit 1e79865 into v2.0 May 11, 2026
8 checks passed
@IDCs IDCs deleted the fix/app-444 branch May 11, 2026 14:20
pull Bot pushed a commit to A-Archives-and-Forks/Vortex that referenced this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment