Repository navigation
Retry the in-build macOS notarization - #60
Merged
Merged
Conversation
With APPLE_* credentials set, electron-builder notarizes the signed .app right after codesigning, in one attempt. A dropped connection to Apple's notary service then fails the build: the macOS x64 jobs for 5.1.0 (NSURLErrorDomain -1005 while stapling) and 5.1.1 (-1009 while waiting on the submission) both died there. The retries added in #46 cover only the workflow's later dmg/zip notarization. electron-builder.json now sets mac.notarize to false and names an afterSign hook, scripts/notarize-mac-app.js, which runs at the same point (after codesigning, before the dmg and zip are built) and makes the same @electron/notarize call with the same credentials: it loads app-builder-lib's own @electron/notarize (the top-level 3.x is ESM-only and needs Node 22.12; the release runners use Node 20) and mirrors MacTargetHelper.getNotarizeOptions. It tries up to three times, 30 s and 60 s apart, and does nothing for Windows, Linux and Mac App Store builds or without credentials. Tests check the options and errors against electron-builder's own getNotarizeOptions for every credential form, the retry and give-up paths, and that electron-builder's resolveFunction would load the hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
Runs app-builder-lib's resolveFunction on the configured afterSign path, as electron-builder does when it loads hooks; it fails if the hook stops exporting afterSign. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
iLevyTate
pushed a commit
that referenced
this pull request
Nov 1, 2026
- package.json / package-lock.json: 5.1.2. - CHANGELOG: 5.1.2 section for the glob and minimatch tooling updates (#61, #62) and the retried macOS notarization (#60); compare links. - SECURITY.md: applies to 5.1.2; example patch versions. - BETA_TESTER_GUIDE / INSTALL_GUIDE: current version and download names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
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.
Summary
APPLE_*credentials set, electron-builder notarizes the signed.appright after codesigning, in one attempt. A dropped connection to Apple's notary service then fails the whole build. The macOS x64 jobs for 5.1.0 (NSURLErrorDomain -1005while stapling) and 5.1.1 (-1009while waiting on the submission) both died there. The retries from ci(mac-release): retry Apple notary and stapler network calls #46 only cover the workflow's later dmg/zip notarization.electron-builder.jsonnow setsmac.notarize: falseand names anafterSignhook,scripts/notarize-mac-app.js. The hook runs at the same point (after codesigning, before the dmg and zip are built) and makes the same@electron/notarizecall with the same credentials. It tries up to three times, 30 s and 60 s apart.@electron/notarize(2.5.0), the copy electron-builder uses. The top-level 3.x is ESM-only and needs Node 22.12, but the release runners use Node 20.MacTargetHelper.getNotarizeOptions: Apple ID, API key or keychain profile, with the same errors.docs/MAC_SIGNING.mddescribes the hook in the workflow walkthrough.Scope
Type of Change
Test Plan
Automated
npm run format:check(Prettier on the changed files)npm run lint(ESLint on the hook and its test)npm test:notarizeMacApp,electron-builder-config,verifyElectronFusesConfig,verifyPackagedArtifacts(all pass),knip:files, andcompliance:commercial:verify(inventory unchanged)test/notarizeMacApp.test.jscovers:getNotarizeOptions, for 8 credential casesresolveFunctionloads the configured hook asafterSign(this check fails if the export is removed)Manual QA
docs/TESTING.md)Manual QA notes:
mac-release.ymlrun is the real test. The log should show[notarize] StratoSort Stack.app notarized and stapledin the signed build step.Checklist
Generated by Claude Code