Skip to content

[Bug]: Windows desktop app fails to compile during hermes update / hermes desktop #40187

Closed

Description

@73R3WY

Bug Description

I'm getting an error when trying to do hermes update or hermes desktop in the final stage of compiling the electron app for macOS desktop:

✓ built in 1.64s

> hermes@0.15.1 builder
> cross-env NODE_OPTIONS=--max-old-space-size=16384 electron-builder --dir

  • electron-builder  version=26.8.1 os=25.5.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=release/builder-effective-config.yaml
[before-pack] removed stale unpacked dir before staging: /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop/release/mac-arm64
  • packaging       platform=darwin arch=arm64 electron=40.9.3 appOutDir=release/mac-arm64
  • downloading     url=https://github.com/electron/electron/releases/download/v40.9.3/electron-v40.9.3-darwin-arm64.zip size=114 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v40.9.3/electron-v40.9.3-darwin-arm64.zip duration=20.56s
  • packageManager not detected by file, falling back to environment detection  resolvedPackageManager=npm detected=/Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
  • detected workspace root for project using lock file  pm=npm config=undefined resolved=/Users/jeremypacabis/.hermes/hermes-agent projectDir=/Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
  • signing         file=release/mac-arm64/Hermes.app platform=darwin type=distribution identityName=Jeremy Patrick Pacabis’s CA identityHash=98BF61097E6830E60D72447A1F273AF45EC13A0F provisioningProfile=none
  ⨯ Command failed: codesign --sign Jeremy Patrick Pacabis’s CA --force --timestamp --options runtime --entitlements electron/entitlements.mac.inherit.plist /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop/release/mac-arm64/Hermes.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak
Jeremy Patrick Pacabis’s CA: this identity cannot be used for signing code
  failedTask=build stackTrace=Error: Command failed: codesign --sign Jeremy Patrick Pacabis’s CA --force --timestamp --options runtime --entitlements electron/entitlements.mac.inherit.plist /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop/release/mac-arm64/Hermes.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/af.lproj/locale.pak
Jeremy Patrick Pacabis’s CA: this identity cannot be used for signing code
                                                                                                                                                                                                                                                                                                                                                                                                                              at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at ChildProcess.exithandler (node:child_process:417:12)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1101:16)
    at Socket.<anonymous> (node:internal/child_process:456:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:346:12)
npm error Lifecycle script `builder` failed with error:
npm error code 1
npm error path /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
npm error workspace hermes@0.15.1
npm error location /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
npm error command failed
npm error command sh -c cross-env NODE_OPTIONS=--max-old-space-size=16384 electron-builder --dir
npm error Lifecycle script `pack` failed with error:
npm error code 1
npm error path /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
npm error workspace hermes@0.15.1
npm error location /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
npm error command failed
npm error command sh -c npm run build && npm run builder -- --dir
✗ Desktop GUI build failed
  Run manually:  cd apps/desktop && npm run pack

Steps to Reproduce

  1. Run hermes update / hermes desktop

Note: using the built-in desktop app Update function does not work, clicking on update now just closes the app and not restarting it. Also, upon opening manually, the updates were not applied.

Expected Behavior

The desktop app will be updated

Actual Behavior

No updates applied, failed build.

Affected Component

Other

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/STtro
  agent.log    https://paste.rs/4v9jn
  desktop.log  https://paste.rs/JW4fO

Operating System

macOS 26.5.1

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Activity

  1. added
    type/bugSomething isn't working
    P2Medium — degraded but workaround exists
    comp/cliCLI entry point, hermes_cli/, setup wizard
    on Jun 6, 2026
  2. 73R3WY commented on Jun 14, 2026

    @73R3WY
    Author

    Hello @xxxigm , by any chance this will be merged to prod? So that hermes update works correctly...

  3. xxxigm commented on Jun 14, 2026

    @xxxigm

    Hello @xxxigm , by any chance this will be merged to prod? So that hermes update works correctly...

    Hey @73R3WY . I can’t merge it myself — waiting on a maintainer review.

    In the meantime, you can unblock locally by disabling keychain auto-discovery (so the build uses ad-hoc signing):

    CSC_IDENTITY_AUTO_DISCOVERY=false hermes update

    or:

    cd ~/.hermes/hermes-agent/apps/desktop && CSC_IDENTITY_AUTO_DISCOVERY=false npm run pack

    This skips the signing error and lets the build finish.

    If you hit the “Update closes with no effect” issue, it’s tracked in #42782 and fixed once the build succeeds.

    For faster help, you can also open a support ticket here:
    https://discord.com/channels/1053877538025386074/1485307775444844625

  4. 73R3WY commented on Jun 14, 2026

    @73R3WY
    Author

    CSC_IDENTITY_AUTO_DISCOVERY=false npm run pack

    Thank you @xxxigm , I was able to update my build after this.

  5. xxxigm commented on Jun 14, 2026

    @xxxigm

    CSC_IDENTITY_AUTO_DISCOVERY=false npm run pack

    Thank you @xxxigm , I was able to update my build after this.

    Hi @teknium1 Could you take a look at this issue? Thanks!

  6. 73R3WY commented on Jun 15, 2026

    @73R3WY
    Author

    Hi again @xxxigm , I'm getting a new error while executing CSC_IDENTITY_AUTO_DISCOVERY=false npm run pack:

    > hermes@0.15.1 pack
    > npm run build && npm run builder -- --dir
    
    
    > hermes@0.15.1 build
    > node scripts/assert-root-install.cjs && node scripts/write-build-stamp.cjs && node scripts/stage-native-deps.cjs && tsc -b && vite build && npm run postbuild
    
    [write-build-stamp] wrote apps/desktop/build/install-stamp.json -> 3e7e9b24d40c (main)
    [stage-native-deps] build/native-deps/node-pty: 22 files
    vite v8.0.16 building client environment for production...
    ✓ 11787 modules transformed.
    ✗ Build failed in 633ms
    error during build:
    Build failed with 9 errors:
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    ...
        at aggregateBindingErrorsIntoJsError (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:48:18)
        at unwrapBindingResult (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:18:128)
        at #build (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/rolldown/dist/shared/rolldown-build-CrPk_lZe.mjs:3246:34)
        at async buildEnvironment (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/vite/dist/node/chunks/node.js:33253:64)
        at async Object.build (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/vite/dist/node/chunks/node.js:33675:19)
        at async Object.buildApp (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/vite/dist/node/chunks/node.js:33672:153)
        at async CAC.<anonymous> (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/vite/dist/node/cli.js:777:3) {
      errors: [Getter/Setter]
    }
    npm error Lifecycle script `build` failed with error:
    npm error code 1
    npm error path /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
    npm error workspace hermes@0.15.1
    npm error location /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
    npm error command failed
    npm error command sh -c node scripts/assert-root-install.cjs && node scripts/write-build-stamp.cjs && node scripts/stage-native-deps.cjs && tsc -b && vite build && npm run postbuild
    npm error Lifecycle script `pack` failed with error:
    npm error code 1
    npm error path /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
    npm error workspace hermes@0.15.1
    npm error location /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
    npm error command failed
    npm error command sh -c npm run build && npm run builder -- --dir
    

    Note: I was able to pull updates to main branch before attempting to build.

  7. xxxigm commented on Jun 15, 2026

    @xxxigm

    Hi again @xxxigm , I'm getting a new error while executing CSC_IDENTITY_AUTO_DISCOVERY=false npm run pack:

    > hermes@0.15.1 pack
    > npm run build && npm run builder -- --dir
    
    
    > hermes@0.15.1 build
    > node scripts/assert-root-install.cjs && node scripts/write-build-stamp.cjs && node scripts/stage-native-deps.cjs && tsc -b && vite build && npm run postbuild
    
    [write-build-stamp] wrote apps/desktop/build/install-stamp.json -> 3e7e9b24d40c (main)
    [stage-native-deps] build/native-deps/node-pty: 22 files
    vite v8.0.16 building client environment for production...
    ✓ 11787 modules transformed.
    ✗ Build failed in 633ms
    error during build:
    Build failed with 9 errors:
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    [rolldown:vite-resolve] plugin `rolldown:vite-resolve` threw an error
    
    Caused by:
        "./react-shim" is not exported under the conditions ["module", "browser", "production", "import"] from package /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap (see exports field in /Users/jeremypacabis/.hermes/hermes-agent/node_modules/@assistant-ui/tap/package.json)
    
    ...
        at aggregateBindingErrorsIntoJsError (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:48:18)
        at unwrapBindingResult (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:18:128)
        at #build (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/rolldown/dist/shared/rolldown-build-CrPk_lZe.mjs:3246:34)
        at async buildEnvironment (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/vite/dist/node/chunks/node.js:33253:64)
        at async Object.build (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/vite/dist/node/chunks/node.js:33675:19)
        at async Object.buildApp (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/vite/dist/node/chunks/node.js:33672:153)
        at async CAC.<anonymous> (file:///Users/jeremypacabis/.hermes/hermes-agent/node_modules/vite/dist/node/cli.js:777:3) {
      errors: [Getter/Setter]
    }
    npm error Lifecycle script `build` failed with error:
    npm error code 1
    npm error path /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
    npm error workspace hermes@0.15.1
    npm error location /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
    npm error command failed
    npm error command sh -c node scripts/assert-root-install.cjs && node scripts/write-build-stamp.cjs && node scripts/stage-native-deps.cjs && tsc -b && vite build && npm run postbuild
    npm error Lifecycle script `pack` failed with error:
    npm error code 1
    npm error path /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
    npm error workspace hermes@0.15.1
    npm error location /Users/jeremypacabis/.hermes/hermes-agent/apps/desktop
    npm error command failed
    npm error command sh -c npm run build && npm run builder -- --dir
    

    Note: I was able to pull updates to main branch before attempting to build.

    An issue has already been logged, so it’s just a matter of waiting patiently.

  8. Kadin-Hunter commented on Jun 15, 2026

    @Kadin-Hunter

    I’m getting a similar issue on Mac 26.5.1

    
                                  at genericNodeError (node:internal/errors:983:15)
        at wrappedFn (node:internal/errors:537:14)
        at ChildProcess.exithandler (node:child_process:417:12)
        at ChildProcess.emit (node:events:519:28)
        at maybeClose (node:internal/child_process:1101:16)
        at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
    npm error Lifecycle script `builder` failed with error:
    npm error code 1
    npm error path /Users/hunter/.hermes/hermes-agent/apps/desktop
    npm error workspace hermes@0.15.1
    npm error location /Users/hunter/.hermes/hermes-agent/apps/desktop
    npm error command failed
    npm error command sh -c cross-env NODE_OPTIONS=--max-old-space-size=16384 electron-builder --dir
    npm error Lifecycle script `pack` failed with error:
    npm error code 1
    npm error path /Users/hunter/.hermes/hermes-agent/apps/desktop
    npm error workspace hermes@0.15.1
    npm error location /Users/hunter/.hermes/hermes-agent/apps/desktop
    npm error command failed
    npm error command sh -c npm run build && npm run builder -- --dir
    ✗ Desktop GUI build failed
      Run manually:  cd apps/desktop && npm run pack
      If the log shows Electron download retries, rebuild via a mirror:
        ELECTRON_MIRROR=<mirror-base-url> hermes desktop --force-build
    

    ive tried the suggestions above and still receiving the error. thanks Hermes team for being so awesome and changing the way I work and analyze my life!

  9. xxxigm commented on Jun 15, 2026

    @xxxigm

    @73R3WY @Kadin-Hunter Try it!

    hermes update
    hermes desktop --force-build
    
  10. 36 remaining items

  11. GottZ commented on Jul 26, 2026

    @GottZ

    This was generated by AI during triage.

    Summary

    One PR references #40187, but it addresses the original macOS keychain identity auto-discovery failure rather than the issue’s remaining Windows build/update sub-case. Its macOS fix is already present on main, with only the narrower CSC_NAME identity-preservation gap remaining.

    Related pull requests

    Suggested consolidation

    Do not merge #40223 as-is. Keep it open only for a narrowly rebased CSC_NAME guard and test against the existing main implementation, then close it after that salvage lands; continue tracking the distinct Windows failure under #40187.

    Cross-PR triage: Reviewed 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 7 kB of PR diffs, 7 kB of issue/PR text, 9 kB of discussion (15 comments), 1 verify verdict. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

  12. aimpn286-byte commented on Sep 6, 2026

    @aimpn286-byte

    Additional reproducible Windows case after updating to Hermes v0.21.0.

    Environment:

    • Windows 10.0.19045
    • Node v24.12.0 / npm 11.19.0
    • Electron 40.10.2

    Command:

    npm run pack --workspace apps/desktop
    

    The renderer/main build completes, but electron-builder fails in before-pack while staging node-pty:

    [before-pack] failed to stage native deps for this target:
    The operation completed successfully.
    ...\\apps\\desktop\\dist\\node_modules\\node-pty\\package.json
    

    The likely cause is duplicate host-target staging. npm run build already stages node-pty and get-windows into dist/node_modules; then before-pack stages the same win32-x64 payload again. On Windows this conflicts with Electron Builder over the destination tree. The error text is misleading: the Win32 error code is empty even though the operation fails.

    I reproduced this immediately after updating to v0.21.0. As a local workaround, I changed the packaging logic to reuse the payload already staged by build for the matching host platform/architecture, while retaining re-staging for cross-target builds. I also added delete-then-copy retries for native files/directories.

    Validation after the workaround:

    • npm run pack --workspace apps/desktop: passed
    • npm exec --workspace apps/desktop vitest run scripts/stage-native-deps.test.mjs: 29 passed, 1 skipped
    • fresh release\\win-unpacked\\Hermes.exe launched and remained responsive
    • icudtl.dat, app.asar, locales, and V8 snapshot files were present

    Could this fix be incorporated into main so Windows users do not need to reapply it after each update?

  13. added
    P1High — major feature broken, no workaround
    and removed
    P2Medium — degraded but workaround exists
    needs-reproBug needs reproduction steps
    on Sep 6, 2026
  14. added
    os/windowsNative Windows behaviour or breakage: PowerShell install, Windows paths, cmd.exe, WSL-vs-native diff
    and removed on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundarea/install-updateInstaller, updater, packaging, wheels, doctorcomp/desktopElectron desktop app (apps/desktop/*)os/windowsNative Windows behaviour or breakage: PowerShell install, Windows paths, cmd.exe, WSL-vs-native diffsweeper:risk-platform-windowsSweeper risk: may break or behave differently on native Windowstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions