notarize
notarize copied to clipboard
skipped macOS notarization reason=`notarize` options were not provided
I'm getting this output from electron-builder, and I'm not sure what it means, exactly.
Here's the relevant section of my package.json:
"build": {
"appId": "com.example.MyApplication",
"afterSign": "electron/notarize.js",
"asarUnpack": [ ... ],
"publish": { ... },
"files": [
"build/**/*",
"node_modules/**/*"
],
"mac": {
"category": "public.app-category.productivity",
"icon": "build/icons/icon.icns",
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"provisioningProfile": "embedded.provisionprofile"
},
"dmg": {
"sign": false
}
...
},
The electron/notarize.js file looks like this:
require('dotenv').config();
const { notarize } = require('@electron/notarize');
const password = '@keychain:EE_PASSWORD';
exports.default = async function notarizing (context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}
const appName = context.packager.appInfo.productFilename;
return await notarize({
appBundleId: 'com.example.MyApplication',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: password,
teamId: process.env.TEAM_ID
});
};
So...what option did I not provide?
Facing the same issue
From my understanding you can feed a notarize object inside the mac config (check the electron builder docs, some params must be passed from env variables).
Using a customg js is an alternative.
I'm getting the same message
Getting the same message -- it seems to still be notarizing though, I think? The application opens as expected anyway. Possibly an incorrect log?
AFAIK if you are using electron-builder you can either:
- use the "notarize" procedure handled by electron-builder via configuration (see docs) OR
- use electron-notarize directly in the after-sign hook.
If you chose the latter (as I did) you'll get the "skipped macOS notarization" warning by electron-builder because you are skipping the built-in procedure (1). Built-in procedure requires you to pass few arguments via env variables and others via config. I had problems debugging it so I used path 2.
AFAIK if you are using electron-builder you can either:
- use the "notarize" procedure handled by electron-builder via configuration (see docs) OR
- use electron-notarize directly in the after-sign hook.
If you chose the latter (as I did) you'll get the "skipped macOS notarization" warning by electron-builder because you are skipping the built-in procedure (1). Built-in procedure requires you to pass few arguments via env variables and others via config. I had problems debugging it so I used path 2.
Thank you. Looks like I can safely ignore it then, possibly we can also set notarize: False which I expect will either hide the error or display something else a bit more clear.
Can someone please provide an example of notarize property in electron.manifest.json?
AFAIK if you are using electron-builder you can either:
- use the "notarize" procedure handled by electron-builder via configuration (see docs) OR
- use electron-notarize directly in the after-sign hook.
If you chose the latter (as I did) you'll get the "skipped macOS notarization" warning by electron-builder because you are skipping the built-in procedure (1). Built-in procedure requires you to pass few arguments via env variables and others via config. I had problems debugging it so I used path 2.
Thank you. Looks like I can safely ignore it then, possibly we can also set notarize: False which I expect will either hide the error or display something else a bit more clear.
Yes! This does make sense now.
Running this command against my built app indicates that it is, indeed notarised:
spctl --assess -vv --type install MyApp.app
Closing this issue now.