Skip to content
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

skipped macOS notarization reason=notarize options were not provided #175

Closed
ndtreviv opened this issue Jan 16, 2024 · 8 comments
Closed

Comments

@ndtreviv
Copy link

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?

@cloudsolace
Copy link

Facing the same issue

@vitto32
Copy link

vitto32 commented Jan 22, 2024

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.

@kai-shimada
Copy link

kai-shimada commented Jan 26, 2024

I'm getting the same message

@dMARLAN
Copy link

dMARLAN commented Feb 14, 2024

Getting the same message -- it seems to still be notarizing though, I think? The application opens as expected anyway. Possibly an incorrect log?

@vitto32
Copy link

vitto32 commented Feb 14, 2024

AFAIK if you are using electron-builder you can either:

  1. use the "notarize" procedure handled by electron-builder via configuration (see docs) OR
  2. 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.

@dMARLAN
Copy link

dMARLAN commented Feb 14, 2024

AFAIK if you are using electron-builder you can either:

  1. use the "notarize" procedure handled by electron-builder via configuration (see docs) OR
  2. 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.

@nazar322
Copy link

Can someone please provide an example of notarize property in electron.manifest.json?

@ndtreviv
Copy link
Author

AFAIK if you are using electron-builder you can either:

  1. use the "notarize" procedure handled by electron-builder via configuration (see docs) OR
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants