Skip to content

fix(desktop): enable asar integrity in Windows build by removing signAndEditExecutable false (#69179) - #70976

Closed
webtecnica wants to merge 1 commit into
NousResearch:mainfrom
webtecnica:fix/windows-asar-integrity
Closed

fix(desktop): enable asar integrity in Windows build by removing signAndEditExecutable false (#69179)#70976
webtecnica wants to merge 1 commit into
NousResearch:mainfrom
webtecnica:fix/windows-asar-integrity

Conversation

@webtecnica

Copy link
Copy Markdown
Contributor

Summary

Remove signAndEditExecutable: false from the Windows electron-builder config to fix ASAR integrity metadata embedding.

Root Cause

The win build config in apps/desktop/package.json has:

"signAndEditExecutable": false

When set to false, electron-builder skips embedding ASAR integrity metadata into the resulting Hermes.exe. Without this metadata, the built resources/app.asar file is only ~176 bytes (empty/broken) instead of the expected ~42MB. Electron cannot find the app entry point, resulting in:

Fix

Remove signAndEditExecutable: false entirely. The default value for this option in electron-builder is true, which means ASAR integrity metadata will be properly embedded. If code signing is unavailable, forceCodeSigning: false provides 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 — Removed signAndEditExecutable: false from the win build config

Fixes #69179
Fixes #70825

…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
@webtecnica
webtecnica requested a review from a team July 24, 2026 20:40
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/desktop Electron desktop app (apps/desktop/*) platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows labels Jul 24, 2026
@teknium1

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

3 participants