fix(desktop): enable asar integrity in Windows build by removing signAndEditExecutable false (#69179) - #70976
Conversation
…y on Windows (NousResearch#69179) Remove 'signAndEditExecutable: false' from the Windows electron-builder config. When set to false, electron-builder skips embedding ASAR integrity metadata, producing a broken resources/app.asar (176 bytes instead of ~42MB) that leaves Electron unable to find the app entry point. Fixes NousResearch#69179 Fixes NousResearch#70825
|
Closing — #69179 is fixed on main via #71119 + #71218, and the root cause was verified against reporter data: a raw un-staged/corrupt Electron binary shipped by the self-update rebuild (207,462,400-byte stock exe), not missing ASAR integrity metadata. signAndEditExecutable: false is deliberate in our local-rebuild path — end-user machines have no signing infrastructure, and enabling exe editing there introduces rcedit rewrite failures (one of the corruption sources the new gate defends against). The gate now verifies the rebuilt exe before it replaces anything and rolls back on failure. If #70825 (Electron help text) still reproduces on a build containing #71119, please re-report there with the new integrity-gate output. Thanks @webtecnica for digging into the builder config. |
Summary
Remove
signAndEditExecutable: falsefrom the Windows electron-builder config to fix ASAR integrity metadata embedding.Root Cause
The
winbuild config inapps/desktop/package.jsonhas:When set to
false, electron-builder skips embedding ASAR integrity metadata into the resultingHermes.exe. Without this metadata, the builtresources/app.asarfile is only ~176 bytes (empty/broken) instead of the expected ~42MB. Electron cannot find the app entry point, resulting in:Fix
Remove
signAndEditExecutable: falseentirely. The default value for this option in electron-builder istrue, which means ASAR integrity metadata will be properly embedded. If code signing is unavailable,forceCodeSigning: falseprovides the safety valve — the build still embeds integrity metadata and produces a working binary, just without a digital signature.This is a minimal, targeted fix.
Files changed
apps/desktop/package.json— RemovedsignAndEditExecutable: falsefrom thewinbuild configFixes #69179
Fixes #70825