fix(updater): ship signed NSIS installer so Windows auto-update installs (#96) - #97
Merged
amirlehmam merged 1 commit intoJul 16, 2026
Conversation
The Windows release shipped a .zip, which electron-updater's NsisUpdater can download and checksum-verify but has no way to install — quitAndInstall() no-ops and the app relaunches on the same version (issue amirlehmam#96). - electron-builder: switch win.target from `dir` to `nsis` (the nsis block was already configured); add a space-free artifactName. - release.yml: build the installer, retarget SignPath signing + latest.yml at the installer, drop the manual zip, and generate latest.yml LAST from the signed installer so its sha512 matches the shipped file. - Only publish latest.yml when signing succeeds: with win.publisherName pinned to "SignPath Foundation", electron-updater Authenticode-verifies the downloaded installer, so an unsigned NSIS installer would fail the update. Unsigned releases still ship the installer for manual download but don't advertise an auto-update (graceful no-op instead of a broken one). - Add a regression test asserting the Windows target is nsis, not dir/zip. Per amirlehmam#32 this is gated on active code-signing (unsigned NSIS also trips SmartScreen harder than a zip); it activates automatically once the SignPath OSS quota is restored (amirlehmam#71), with no further changes. Closes amirlehmam#96 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amirlehmam
added a commit
that referenced
this pull request
Jul 16, 2026
….26.0 PR #97 switched the release artifact to an NSIS installer so auto-update can actually install (#96), but dropped the portable zip that the docs and wmux.org point users at. Restore it as an additional release asset; latest.yml keeps pointing at the installer only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQkPd2DNXsM2AaKqiLdZFh
Owner
|
Merged and shipped in v0.26.0 — thank you, the analysis in this PR (and #96) was spot-on, including the reasoning for gating Two follow-up commits on master after the merge:
|
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.
Closes #96.
The problem
On Windows the app detects and downloads updates, but can never install them. The release ships a
.zip(wmux-<ver>-win-x64.zip) as the update artifact. electron-updater on Windows usesNsisUpdater, which installs by running an NSIS.exe— it has no path to apply a zip. So the download and checksum both succeed (it looks like it's working), butquitAndInstall()no-ops and the app relaunches on the same version. The updater's own comment already flags the zip as the acknowledged follow-up (#71).The fix
Ship a real NSIS installer whose hashes match
latest.yml:electron-builder.json— switchwin.targetfromdirtonsis(thensisblock was already configured) and add a space-freeartifactName(wmux-${version}-setup.exe).release.yml— build the installer (drop--dir), retarget the SignPath signing steps at the installer, remove the manualCompress-Archivezip, and generatelatest.ymllast, from the signed installer, so itssha512matches the exact file that ships. The redundantrceditstep is removed — electron-builder already embedswin.icon, the version, andFileDescription(taskbar-pinning name) into the packaged exe.nsis, notdir/zip, so this can't silently regress.Respecting the signing sequencing (#32)
Per #32, an NSIS installer isn't worth shipping until code-signing is live, since (a) unsigned NSIS trips SmartScreen harder than a zip, and (b) with
win.publisherNamepinned toSignPath Foundation, electron-updater now Authenticode-verifies the downloaded installer — an unsigned NSIS installer would fail that check and the update would throw.So this PR is designed to degrade gracefully and is gated behind active signing:
latest.ymlis only published when the SignPath submission succeeds (the verify step is already fatal). Unsigned releases still ship the installer for manual download, but don't advertise an auto-update — a no-op, not a broken update. (updater.tsalready treats a missinglatest.ymlas "update check skipped", [Bug] v0.15.0 release missing latest.yml — auto-updater throws 404 on every launch #68.)Net: merge-safe now (auto-update simply stays dormant while unsigned), and it starts working the moment signing is live.
Notes for review
artifactConfigurationSlug=initial, which was set up for the old unpackedwmux.exe. Submitting the installer.exemay need that artifact configuration updated on the SignPath side. It's non-fatal (continue-on-error), but worth checking when quota returns.windows-latest, clean path) — theOneDrive - Pulsaspaced-path winCodeSign issue fromCLAUDE.mddoesn't apply on the runner..blockmapis emitted, so updates are full downloads (verified by the top-levelsha512) rather than differential — correct, just not delta-optimized.Testing
npm test— full suite green (211 passed), including the new target guard.release/wmux-<ver>-setup.exe(signing submit/download/verify,latest.yml, artifact upload, release upload).