Skip to content

fix(release): build in CI + catch startup errors#109

Merged
graydawnc merged 1 commit intomainfrom
fix/ci-release-and-startup-catch
Apr 24, 2026
Merged

fix(release): build in CI + catch startup errors#109
graydawnc merged 1 commit intomainfrom
fix/ci-release-and-startup-catch

Conversation

@graydawnc
Copy link
Copy Markdown
Collaborator

@graydawnc graydawnc commented Apr 24, 2026

Summary

  • Fixes macOS 15.6.1: Spool 0.3.7 crashes immediately on launch (EXC_BREAKPOINT / SIGTRAP in CrBrowserMain) #108: 0.3.7 crashes immediately on launch on any Mac not on the maintainer's provisioning profile.
  • Root cause: scripts/release.sh ran pnpm run build locally, and electron-builder auto-discovered an Apple Development certificate from Keychain. Dev certs are tied to specific device UDIDs via the embedded provisioning profile — on any other Mac, hardened-runtime codesign enforcement kills the app at startup with EXC_BREAKPOINT / SIGTRAP in CrBrowserMain.
  • The existing .github/workflows/release.yml already sets CSC_IDENTITY_AUTO_DISCOVERY=false, so moving the build to CI produces a consistent unsigned (ad-hoc) artifact that runs on any machine.

Changes

  • scripts/release.sh: now bumps version, pushes the tag, dispatches release.yml on that tag, then gh run watch --exit-status blocks until CI finishes. No more local build / local gh release create.
  • packages/app/src/main/index.ts: .catch() on app.whenReady().then(...) — any startup rejection now logs, shows an error dialog, and exits with code 1 instead of surfacing as an opaque SIGTRAP via Node's unhandled-rejection path. This makes future startup regressions actually diagnosable.
  • README.md: note that local DMG testing uses pnpm --filter @spool/app build:mac, release.sh is CI-only now.

Test plan

  • Run ./scripts/release.sh on a new throwaway branch commit → expect bump → tag push → workflow dispatch → watch → release appears with CI-built artifacts
  • Download the resulting DMG on a second Mac (different UDID), xattr -dr com.apple.quarantine /Applications/Spool.app, launch → expect app opens normally instead of SIGTRAP
  • Optional: temporarily break startup (e.g. throw inside whenReady) → expect error dialog + non-zero exit instead of silent crash

🤖 Generated with Claude Code

…rors

0.3.7 shipped signed with a local "Apple Development" cert (tied to specific
device UDIDs via the embedded provisioning profile), so launching on any
other Mac failed codesign enforcement and crashed immediately at startup
with EXC_BREAKPOINT / SIGTRAP in CrBrowserMain (#108).

Root cause: scripts/release.sh ran `pnpm run build` locally with
electron-builder auto-discovering the maintainer's keychain. The CI
workflow already has CSC_IDENTITY_AUTO_DISCOVERY=false, so moving the
build there produces a consistent unsigned (ad-hoc) artifact that runs
on any machine after the quarantine bit is removed.

Changes:
- release.sh: bump + tag + push + dispatch release.yml, then gh run watch
  until CI finishes. No more local build or local `gh release create`.
- main/index.ts: add .catch() on app.whenReady().then(...). Any startup
  rejection now logs + shows an error dialog + exits with code 1 instead
  of surfacing as an opaque SIGTRAP via Node's unhandled-rejection path.
- README: note that local DMG testing uses `pnpm -F @spool/app build:mac`.
@graydawnc graydawnc merged commit 8754e4f into main Apr 24, 2026
4 checks passed
@graydawnc graydawnc deleted the fix/ci-release-and-startup-catch branch April 24, 2026 13:14
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.

macOS 15.6.1: Spool 0.3.7 crashes immediately on launch (EXC_BREAKPOINT / SIGTRAP in CrBrowserMain)

1 participant