Version:
The dmg
file is working perfectly. But when I try to verify via Transporter, I am getting the following error.
Error
Build Configuration
"build": {
"appId": "<APP_ID>",
"productName": "<PRODUCT_NAME",
"copyright": "<COMPANY_NAME>",
"afterSign": "scripts/notarize.js",
"directories": {
"buildResources": "resources",
"output": "release"
},
"mac": {
"hardenedRuntime": true,
"gatekeeperAssess": false,
"category": "public.app-category.developer-tools",
"target": ["mas"],
"icon": "resources/icon.icns",
"identity": "<IDENTITY>",
"provisioningProfile": "build/mac.provisionprofile",
"type": "distribution",
"electronLanguages": ["en"],
"entitlements": "build/mac.plist",
"entitlementsInherit": "build/mac.plist"
},
"mas": {
"hardenedRuntime": false,
"provisioningProfile": "build/mas.provisionprofile",
"type": "distribution",
"electronLanguages": ["en"],
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist"
},
"dmg": {
"sign": false,
"contents": [
{
"x": 130,
"y": 220
},
{
"x": 410,
"y": 220,
"type": "link",
"path": "/Applications"
}
]
},
"files": [
"dist/",
"node_modules/",
"app_prod.html",
"main.prod.js",
"main.prod.js.map",
"package.json",
"assets/"
],
"win": {
"target": ["nsis"]
},
"linux": {
"target": ["deb", "AppImage"],
"category": "Development"
}
},
notarize.js
require('dotenv').config();
const { notarize } = require('electron-notarize');
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}
const appName = context.packager.appInfo.productFilename;
return await notarize({
appBundleId: process.env.BUNDLE_ID,
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASS,
});
};
mac.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
entitlements.mas.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.application-identifier</key>
<string>APPLICATION_ID</string>
<key>com.apple.developer.team-identifier</key>
<string>TEAM_ID</string>
<key>com.apple.security.application-groups</key>
<array>
<string>BUNDLE_ID</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.all</key>
<true/>
<key>com.apple.security.application-groups</key>
<string>security</string>
</dict>
</plist>
entitlements.mas.inherit.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
</dict>
</plist>
My certficates
Build folder
Provision Profiles
Also, the Notarization step is also passed. Is am missing anything here?
I had the same error message with a newer version of electron. What actually was the issue for me, was that I had multiple x.provisionprofile
s, and instead of embedded.provisionprofile
(as is stated by the electron builder documentation) one of the others was used thus leading to this error. You can check the complete source code and build setup here:
https://github.com/johannesjo/super-productivity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With