anything-analyzer
anything-analyzer copied to clipboard
macOS Ventura: 应用启动崩溃,bootstrap_check_in Permission denied,窗口无法显示
问题描述
在 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。
这个等等。。我没搞过苹果签名,等劳动节之后