Sign Electron Application on MacOs
Summary
Reference: #3529 (closed) and #3584 (closed)
We have integrated a Jenkins instance to automate the certification of our Mac binary. Unfortunately, this setup does not currently support the signing process required for Electron applications. Seeking guidance on adapting our infrastructure for Electron app signing, as outlined in Electron's documentation on code signing.
What is the current bug behavior?
Notarization failed: {"uuid":"794dfdaa-0a36-4a51-9713-60cddaa89e3e","notarizationStatus":{"status":"ERROR","message":"Notarization has failed on Apple notarization service","moreInfo":"Failed to notarize the requested file (status=Invalid). Error code=OptionalInt.empty. Reason: Optional.empty","log":"{\n \"logFormatVersion\": 1,\n \"jobId\": \"f8d4b827-a160-4d4d-8f07-60b291df0fc2\",\n \"status\": \"Invalid\",\n \"statusSummary\": \"Archive contains critical validation errors\",\n \"statusCode\": 4000,\n \"archiveFilename\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg\",\n \"uploadDate\": \"2024-02-06T13:36:16.715Z\",\n \"sha256\": \"5e1f4ac6a4af6128aa468be70763acaf69fdaf39963f25efd79780253d56d516\",\n \"ticketContents\": null,\n \"issues\": [\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib\",\n \"message\": \"The binary is not signed.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib\",\n \"message\": \"The signature does not include a secure timestamp.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib\",\n \"message\": \"The binary is not signed.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib\",\n \"message\": \"The signature does not include a secure timestamp.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib\",\n \"message\": \"The binary is not signed.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib\",\n \"message\": \"The signature does not include a secure timestamp.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib\",\n \"message\": \"The binary is not signed.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib\",\n \"message\": \"The signature does not include a secure timestamp.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt\",\n \"message\": \"The binary is not signed.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt\",\n \"message\": \"The signature does not include a secure timestamp.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt\",\n \"message\": \"The executable does not have the hardened runtime enabled.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087724\",\n \"architecture\": \"x86_64\"\n },\n {\n \"severity\": \"error\",\n \"code\": null,\n \"path\": \"aspect-model-editor-v5.1.1-mac-14394387365538383039.dmg/Aspect-Model-Editor.app/Contents/MacOS/Aspect-Model-Editor\",\n \"message\": \"The signature of the binary is invalid.\",\n \"docUrl\": \"https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087735\",\n \"architecture\": \"x86_64\"\n }\n ]\n}\n"}}
(What actually happens)
What is the expected correct behavior?
The Jenkins infrastructure should be capable of signing Electron applications for Mac, following the guidelines and requirements specified in the Electron documentation for code signing.
Relevant logs and/or screenshots
(Add a link to or paste any relevant logs - please use code blocks (```) to format console output, logs, and code, as it's very hard to read otherwise.)
Priority
- Urgent
- High
- Medium
- Low
Severity
- Blocker
- Major
- Normal
- Low
Impact
The impact of this issue is moderate, given that it does not block our release process but introduces inefficiencies. Without direct support for Electron app signing in our Jenkins infrastructure, we may face delays or need to rely on manual signing processes. This could affect our ability to quickly deploy updates or new releases of our Electron-based applications. It is not blocking a release immediately but could become more critical as we scale our use of Electron for desktop applications.