Skip to content

Conversation

@mdsakalu
Copy link

@mdsakalu mdsakalu commented Jan 9, 2026

Summary

  • Add missing entitlements required for Electron's crashpad to work properly on macOS when the app is ad-hoc signed (not notarized)
  • Add the entitlements config to electron-builder so entitlements are applied to the main app bundle, not just inherited by child processes

Problem

When building MarkText without an Apple Developer certificate, the app is ad-hoc signed. On recent macOS versions, the app would bounce in the dock but never open a window, with crashpad errors like:

[FATAL:crashpad/handler/mac/exception_handler_server.cc:76] Check failed: kr == KERN_SUCCESS. mach_port_request_notification: (os/kern) invalid capability (20)

Solution

Added two entitlements to build/mac/entitlements.mac.plist:

  • com.apple.security.cs.disable-library-validation
  • com.apple.security.get-task-allow

And configured electron-builder to apply these entitlements to the main app bundle.

Testing

  1. Build the app: npm run build:mac
  2. Install WITHOUT running xattr -cr or manual codesign
  3. Launch the app - it should open without bouncing/crashing
  4. Verify entitlements: codesign -d --entitlements - dist/mac-arm64/marktext.app

🤖 Generated with Claude Code

Add missing entitlements required for Electron's crashpad to work
properly on macOS when the app is ad-hoc signed (not notarized):
- com.apple.security.cs.disable-library-validation
- com.apple.security.get-task-allow

Also add the entitlements config to electron-builder so entitlements
are applied to the main app bundle, not just inherited by child processes.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@peterjthomson
Copy link

Does this degrade the app in any way? If not should it be the default on master or should we somehow aim for a "community signed" edition ?

@Tkaixiang
Copy link
Owner

Hey, thanks for this PR. I would appreciate the help of anyone with a MacOS device to test this PR :)

@Tkaixiang Tkaixiang added the help wanted Extra attention is needed label Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants