Electron macOS应用苹果公证持续失败,求问题排查方案
苹果Electron应用公证(Notarisation)失败问题
在macOS平台运行Electron应用时,持续遇到苹果公证失败问题,多次尝试后公证状态仍显示为Invalid,且报告中的错误始终一致。
操作流程
- 执行代码签名命令:
反馈:codesign --sign "Apple Distribution: Name Lastname (123456)" --deep --force --timestamp=auto path/to/Application.appApplication.app: replacing existing signature - 验证签名:
结果:codesign --verify --deep --strict --verbose=4 path/to/Application.app--prepared:/path/to/Application.app/Contents/Frameworks/SomeFramework.framework --validated:/path/to/Application.app/Contents/Frameworks/SomeFramework.framework --prepared:/path/to/Application.app/Contents/Frameworks/AnotherFramework.framework --validated:/path/to/Application.app/Contents/Frameworks/AnotherFramework.framework Application.app: valid on disk Application.app: satisfies its Designated Requirement - 执行构建:
npm build - 打包:
zip -r Application.zip Application.app - 上传公证:
查询状态结果:xcrun notarytool submit Application.zip --apple-id your-apple-id --team-id your-team-id --password your-app-specific-passwordSuccessfully received submission info createdDate: 2024-08-15T18:21:31.520Z id: 55daf39a-4be9-4dd6-a490-1890d33f9e75 name: Application.zip status: Invalid
公证错误报告
- 错误1:
- 路径:
path/to/Application.app/Contents/Frameworks/SomeFramework.framework/SomeFramework - 提示:
The signature of the binary is invalid. - 架构:
arm64
- 路径:
- 错误2:
- 路径:
path/to/Application.app/Contents/Frameworks/SomeFramework.framework/Versions/Current/Helpers/chrome_crashpad_handler - 提示:
The signature does not include a secure timestamp. - 架构:
arm64
- 路径:
已尝试操作
单独对每个有问题的组件签名后重新执行全流程,但问题仍未解决。
请问我哪里操作有误?
内容的提问来源于stack exchange,提问作者Justme
相关产品推荐
相关产品推荐

