fix(release): take the electron-builder keychain-password fix - #990
Merged
Merged
Conversation
Signing with CSC_LINK never reached codesign: app-builder-lib 26.15.3 creates its temporary keychain with a random password but then passes the CERTIFICATE password to security set-key-partition-list, so the step died with SecKeychainUnlock 'passphrase you entered is not correct' right after a successful import (run 35282765891). Upstream electron-builder#10066, fixed by #10101 and backported in #10172. Reading the published tarballs, 26.15.3, 26.15.7 and 26.16.0 all pass the certificate password; 26.16.1 passes keychainPassword. The declared range moves to ^26.16.1 so a fresh install cannot resolve back to a broken 26.15.x. npm's rewrite would also have pruned 27 nested vitest esbuild entries that main needs, so the lockfile keeps main's key order and those entries are preserved. Fixes #989 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpFfu5xMd77Y2sNUeytvCG
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.
Problem
The first macOS release run with signing secrets configured, 35282765891 on
1a1410ac, failed inPackage macOS artifactsbefore anything was signed:The preceding
security import … -P <cert password>succeeded, so the configuredCSC_KEY_PASSWORDis correct.Fixes #989
Cause
app-builder-lib@26.15.3,out/codeSign/macCodeSign.js:createKeychain()creates the temporary keychain with a random password (randomBytes(32)), thencreate-keychain -p <keychainPassword>.importCerts()imports with the certificate password (correct), then runsset-key-partition-list … -k <certificate password>— but that flag takes the keychain password. The two can never match, so everyCSC_LINK-based signing run fails.Upstream: electron-userland/electron-builder#10066, fixed by #10101, backported in #10172.
Verified by unpacking each published tarball and reading the same line:
set-key-partition-list … -kpassword(certificate password)passwordpasswordkeychainPasswordChange
Lockfile plus one range.
electron-builder26.15.3 → 26.16.1, withapp-builder-lib,dmg-builder,electron-publish,builder-utiland dev-only transitive dependencies following. All of it isdevDependencies, so nothing here ships inside the app.The declared range moves
^26.15.3→^26.16.1, becauselateston npm is still 26.15.3: under the old range a fresh install resolves straight back to the broken version. That is also whynpm update electron-builderalone does not fix this.npm update's rewrite would have pruned 27 unrelated entries (node_modules/vitest/node_modules/esbuildand its@esbuild/*platform packages), whichmainneeds because vitest's vite wantsesbuild ^0.27.0 || ^0.28.0and the deduped root is 0.25.12. The lockfile is therefore rebuilt inmain's key order with those entries preserved: 0 entries added, 0 removed.Verification
npm audit --omit=dev --audit-level=high --package-lock-onlyexits 0.npm ls --package-lock-only --allreports exactly the same two pre-existing problem lines asmain— no new inconsistencies.release.ymlrun on this branch withpublish_release=falseis dispatched to exercise sign → notarize → staple → verify. Its result will be added here.Note on the earlier run
That run also showed
APPLE_IDandAPPLE_APP_SPECIFIC_PASSWORDarriving empty inpackage-macos, despite being added to the repo six minutes before that job started. GitHub resolves secrets when the run starts, not when each job starts, so secrets added mid-run never reach later jobs. Any run must be dispatched after the secrets exist.🤖 Generated with Claude Code
https://claude.ai/code/session_01MpFfu5xMd77Y2sNUeytvCG