Skip to content

fix(build): make MAS installer signing work; correct verifier checks#22

Merged
julia-kafarska merged 1 commit into
mainfrom
fix/mas-installer-identity
Jun 22, 2026
Merged

fix(build): make MAS installer signing work; correct verifier checks#22
julia-kafarska merged 1 commit into
mainfrom
fix/mas-installer-identity

Conversation

@julia-kafarska

Copy link
Copy Markdown
Member

Problem

npm run electron:build:mas failed at the final step with:

Cannot find valid "3rd Party Mac Developer Installer" identity to sign MAS installer

even though the cert is present and valid in the keychain.

Cause

mas.identity was set to the full string Apple Distribution: Julia Kafarska (8Y2UTZ2NBZ). electron-builder reuses mas.identity as the search qualifier for the installer cert too (macPackager.js), and that string can never appear in a 3rd Party Mac Developer Installer: line, so the lookup returned null.

Fix

  • electron-builder.json — use the bare qualifier Julia Kafarska (8Y2UTZ2NBZ). The app still signs with Apple Distribution (electron-builder tries that type first for MAS) and the installer now resolves to the 3rd Party cert. Build completes and produces a signed .pkg.
  • scripts/verify-mas-build.mjs — only require com.apple.security.inherit on Mach-O executables (helpers, login helper, ffmpeg) that spawn as their own process. Dylibs / frameworks / .node bundles load in-process and must not carry it; a valid team signature is sufficient. Also skip symlinks when walking the bundle so the framework's Versions/Current alias isn't traversed back into Versions/A (was reporting each binary 3×).

Verification

npm run electron:build:mas now completes; verify:mas reports all checks passing (Apple Distribution signature, App Sandbox, embedded profile + team match, every helper/ffmpeg signed + inherit, every library signed). Output: releases/macos/mas-arm64/Out Loud-2.0.0-arm64.pkg.

The mas.identity was set to the full "Apple Distribution: ..." string.
electron-builder reuses mas.identity as the search qualifier for the installer
cert too, and that string can never match a "3rd Party Mac Developer Installer"
line, so the pkg step failed with "Cannot find valid identity". Use the bare
"Julia Kafarska (8Y2UTZ2NBZ)" qualifier: the app still resolves to Apple
Distribution (tried first for MAS) and the installer resolves to the 3rd Party
cert.

verify-mas-build.mjs: only require com.apple.security.inherit on Mach-O
executables (helpers, login helper, ffmpeg) that spawn as their own process.
Dylibs/frameworks/.node bundles load in-process and must not carry it — a valid
team signature is enough. Also skip symlinks when walking the bundle so the
framework's Versions/Current alias isn't traversed back into Versions/A.
@julia-kafarska julia-kafarska merged commit 1285520 into main Jun 22, 2026
1 check passed
@julia-kafarska julia-kafarska deleted the fix/mas-installer-identity branch June 22, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant