You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Electron macOS应用苹果公证持续失败,求问题排查方案

苹果Electron应用公证(Notarisation)失败问题

在macOS平台运行Electron应用时,持续遇到苹果公证失败问题,多次尝试后公证状态仍显示为Invalid,且报告中的错误始终一致。

操作流程

  • 执行代码签名命令:
    codesign --sign "Apple Distribution: Name Lastname (123456)" --deep --force --timestamp=auto path/to/Application.app
    
    反馈:Application.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-password
    
    查询状态结果:
    Successfully 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 15:42:17