question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR ITMS-90283: Invalid Provisioning Profile. The provisioning profile included in the bundle is invalid [Missing code-signing certificate]

See original GitHub issue

The dmg file is working perfectly. But when I try to verify via Transporter, I am getting the following error.

Error

error

Version:

  • electron: 5.0.1
  • electron-builder: 21.2.0
  • electron-notarize: 0.1.1
  • electron-webpack: 2.7.4
  • Working on: MacOS Catalina 10.15

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

certficates

Build folder

Screenshot 2019-11-08 at 4 03 22 PM

Provision Profiles

apple-profiles

Also, the Notarization step is also passed. Is am missing anything here?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
johannesjocommented, Sep 27, 2020

I have the same issue or at least a similar issue for a long time now. Didn’t find any solution so far.

1reaction
Ali-Bakercommented, Sep 14, 2022

I have the same issue or at least a similar issue for a long time now. Didn’t find any solution so far.

That worked for me, Thanks @johannesjo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid Provisioning Profile. The … | Apple Developer Forums
All provisioning profiles are valid and code signing certs valid, we are using the App Store Connect API and key is active. Any...
Read more >
ERROR ITMS-90283: Invalid Provisioning Profile. The ...
ERROR ITMS-90283 : Invalid Provisioning Profile. The provisioning profile included in the bundle is invalid [Missing code-signing certificate].
Read more >
Invalid Provisioning Profile Missing Codesigning Certificate
ERROR ITMS90283 : Invalid Provisioning Profile.The provisioning profile included in the bundle is invalid [Missing codesigning certificate] #4401. ERROR ...
Read more >
ERROR ITMS-90161: "Invalid Provisioning Profile?
The provisioning profile included in the bundle se.jansoft.jsNordicWeather1 [Payload/jsNordicWeather.iOS.app] is invalid. [Missing code-signing certificate] ...
Read more >
Unable to deploy to App Store - "Invalid Provisioning Profile"
The provisioning profile included in the bundle com.domain.appname [Payload/App.app] is invalid. [Missing code-signing certificate].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found