-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"app can't be opened" even if notarization succeeds #8509
Comments
Looks like your app is trying to do something that it doesn't have Entitlements for? That and/or the provisioning profile could be misconfigured. |
I believe that provisioning profile is for development purpose only, isn't it? I don't have any explicit settings for the profile. Here is what I did:
const { notarize } = require("@electron/notarize")
const path = require("node:path")
module.exports = async (context) => {
if (process.platform !== 'darwin') {
return;
}
await notarize({
appPath: path.join(context.appOutDir, `${context.packager.appInfo.productFilename}.app`),
appleId: "XXX",
appleIdPassword: "XXX",
teamId: "XXX"
})
console.log(`(scripts/notarize.cjs) Notarization complete.`)
}; (credentials are hard-coded only for test purpose, did not upload to any repository) Did I miss something here? here is my electron-builder's setting. (json5) // @see - https://www.electron.build/configuration/configuration
{
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
"appId": "...",
"asar": true,
"directories": {
"output": "release/${version}"
},
"files": [
"dist",
"dist-electron"
],
"mac": {
"target": { "target": "default", "arch": "x64" },
"artifactName": "${productName}-${version}-Installer.${ext}",
"notarize": false
},
"afterSign": "scripts/notarize.cjs",
"win": {
"requestedExecutionLevel": "requireAdministrator",
"target": { "target": "nsis", "arch": "x64" },
"artifactName": "${productName}-${version}-Setup.${ext}",
"certificateSubjectName": "..."
},
"nsis": {
"oneClick": false,
"perMachine": true,
"allowToChangeInstallationDirectory": false,
"deleteAppDataOnUninstall": false
},
"extraResources": ["vpn", "!vpn/*.ovpn"],
"protocols": { "name": "SSO Redirect", "schemes": [ "..." ] },
"publish": { "provider": "generic", "url": "http://localhost:8443/downloads/", "timeout": 30000 }
} I believe in recent And here is my entitlements:
fyi, my app is custom openvpn GUI app. Is there anything weird in my settings that I can dig into? |
Not sure what the name of your entitlements file is, so I felt it worth mentioning. If the entitlements file isn't located in your build resources (expecting |
I had to add specific node_modules to my asarUnpack for my app to work as it couldn't find the node_modules: #6200 (comment) For me specifically it was:
Electron Version: 32.1.2 |
...ok, upon further inspection, my |
Sorry, false alarm; it works with electron-builder 24.13.3 |
Does anyone has same phenomenon, where all builds succeeds but then, can't be opened on other macOS?
It is code-signed, and notarized successfully... (
spctl
command result captured)When I run it on terminal using
open
command, I get following error:The text was updated successfully, but these errors were encountered: