Log date · Sat
How do you test electron-builder differential updates?
Test install, differential download, fallback and startup on the real update server; match metadata to final artifacts.
How should we verify the update pipeline?
After upgrading electron-builder, test installation, differential update and startup verification through the real release pipeline, and make sure metadata describes the final artifacts. In our own ASAR comparison, both archives were 298 bytes, but the first version’s SHA-256 failed against the second. Recording a fresh digest for version two passed. Equal size does not mean equal content.
Released at 09:52 UTC on 26 September 2026, version 26.17.0 added NSIS store-asar mode and fixes for cached blockmap consistency and multi-range downloads. [1] These changes warrant a fresh acceptance test instead of assuming that existing post-processing still fits.
| Question | Finding |
|---|---|
| Archive sizes? | 298 bytes each. |
| Old digest on new version? | Failed; a new digest passed. |
| Was a differential update tested? | No; this illustrates artifact consistency. |
What store-asar changes
The release notes list #10201, #10163 and #10219 as v26 backports. They also list rootVolumeOnly for the macOS 26 pkg installer, a linux.files Flatpak fix, and fixes to pnpm dependency collection and Windows workspace-root detection. [1] For updates, the important point is that package layout, cache state and server responses all matter together.
PR #10201 explains that nsis.differentialPackage defaults to true. With "store-asar", app.asar is stored uncompressed in the differential-aware package while the rest remains compressed. [2] Unchanged regions can then remain byte-identical for reuse by differential downloads, at the cost of a potentially larger full package. The PR reports one sample growing from 30.8 MB to 33.1 MB; those figures are not a prediction for your app.
nsis:
differentialPackage: store-asarCheck hash ordering with two archives
We used Node.js 20.19.5 and @electron/asar 3.4.1 to package a one-file sample we wrote: first release 1, then release 2. Electron-builder is not available in our toolchain, so this uses another official tool to illustrate pairing an artifact with its record. It is not a test of 26.17.0, NSIS, blockmaps, signing or an update download.
== package first version and record digest ==
out/v1.asar: OK
== change sample, package second version ==
298 out/v1.asar
298 out/v2.asar
596 total
== compare old digest against second version ==
out/v2.asar: FAILED
shasum: WARNING: 1 computed checksum did NOT match
stale digest rejected
== record and verify final bytes ==
out/v2.asar: OKOur SHA-256 is a separate digest of the whole file, used to show ordering. It is neither an electron-updater blockmap nor Electron’s ASAR integrity mechanism. The latter records a header hash at packaging and checks it at runtime when enabled; a missing or mismatched header hash terminates the app. [4] If an archive is replaced after relevant metadata is generated, regenerate and verify the affected artifacts using your build tool’s workflow rather than merely renaming a file.
Test the cache and the server
PR #10163 describes a specific failure: a cached installer is removed while its old blockmap remains. A subsequent full download refreshes the installer, but the stale blockmap can still drive the next differential plan, causing a checksum failure and full-download fallback. The fix removes the old cached blockmap when no new one is produced and improves error distinction. [3] In logs, distinguish a successful full fallback after a differential failure, a corrupt full download, and a run that never attempted a differential download.
Keep the old installer and its matching metadata in an isolated test channel, publish a new candidate there, and upgrade from the old version. Record requests, actual bytes downloaded, installed version and startup result. Cover a normal cache, a missing cached installer and a fresh install separately. Exercise multi-range responses against the actual update server: the release specifically calls out real servers. [1] Check that fallback and user feedback are appropriate; a final successful launch alone can conceal a failed differential path.
Recommendations by case
The table gives engineering recommendations, not measured benefits. Keep the old and new versions, server and initial cache state fixed when comparing runs; otherwise a difference in transfer size is hard to attribute.
| Question | Finding |
|---|---|
| Enabling store-asar | Compare full-package size and bytes transferred on the same upgrade path. |
| Replacing app.asar after build | Place processing before relevant metadata and signing, then verify the installed result. |
| Cache may be incomplete | Reproduce a missing installer in isolation and inspect fallback and logs. |
| Using your own update server | Test real multi-range responses and updater behavior end to end. |
Also verify the Windows installer and update-package signatures and the updater’s signature-verification configuration. Signatures and digests answer different questions about publisher identity and byte consistency. Keep the build version, installer, metadata and logs associated so a fallback can be traced to the files actually used.
Run checks on your own app
For your own candidate, record the installer artifact’s digest after all authorized post-processing, then install or update from a test channel and record the installed resources/app.asar digest. Replace paths for your platform and project. Files from these two stages need not be identical: establish the expected relationship and compare corresponding stages rather than treating any two digests as an automatic pass or failure.
shasum -a 256 path/to/your-installer.exe
shasum -a 256 path/to/installed/resources/app.asarFinally compare the installed file inventories before and after the update, launch the app and exercise critical functions, and verify that signing and integrity checks behave as intended. Retain the test-channel installers, matching metadata and blockmaps, and evidence of both a successful differential run and a fallback before promoting the build to a production channel.
Your checklist
- Upgrade from the old release to the candidate in an isolated channel.
- Compare full-package size with actual differential bytes.
- Test a missing cached installer and full-download fallback.
- Verify final signatures, metadata and installed resources.
- Exercise multi-range responses and critical functions on the real server.
Primary sources
- GitHub: electron-builder release electron-builder@26.17.0 · Source date 2026-09-26 · Checked 2026-10-12
- electron-builder PR #10201: store-asar · Checked 2026-11-11
- electron-builder PR #10163: cached blockmap consistency · Checked 2026-11-11
- Electron: ASAR Integrity · Checked 2026-11-11