问题描述
在 macOS Ventura 13.7.8(Intel MacBookPro14,3)上安装 v3.5.3 x64 版本后,应用启动即崩溃,窗口无法显示。
错误日志
终端启动报错:
FATAL:mach_port_rendezvous.cc(410)] Check failed: kr == KERN_SUCCESS.
bootstrap_check_in com.anything.analyzer.MachPortRendezvousServer.<PID>: Permission denied (1100)
根因分析
- Release 构建未进行代码签名(
code object is not signed at all)
- 但
electron-builder.yml 中配置了 hardenedRuntime: true
- 没有签名时,hardened runtime 的 entitlements(
allow-jit 等)不会被 macOS 认可
- 导致 Mach 端口注册被系统拒绝,应用直接
SIGTRAP 崩溃
尝试过的修复
- 右键 → 打开(Gatekeeper 绕过)— 无效
- 移除
com.apple.quarantine 属性 — 无效
- Ad-hoc 签名(
codesign --force --deep --sign -)— 无效
- Ad-hoc 签名 +
--entitlements + --options=runtime — 需要用户自行操作,不友好
建议
请在 CI 构建流程中为 macOS 产物添加代码签名和公证(notarization),或者在 electron-builder.yml 中移除 hardenedRuntime: true。
问题描述
在 macOS Ventura 13.7.8(Intel MacBookPro14,3)上安装 v3.5.3 x64 版本后,应用启动即崩溃,窗口无法显示。
错误日志
终端启动报错:
根因分析
code object is not signed at all)electron-builder.yml中配置了hardenedRuntime: trueallow-jit等)不会被 macOS 认可SIGTRAP崩溃尝试过的修复
com.apple.quarantine属性 — 无效codesign --force --deep --sign -)— 无效--entitlements+--options=runtime— 需要用户自行操作,不友好建议
请在 CI 构建流程中为 macOS 产物添加代码签名和公证(notarization),或者在
electron-builder.yml中移除hardenedRuntime: true。