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.

MAS distribution pkg rejected during review process

See original GitHub issue
  • Version: 19.55.3
  • Target: mas

Hi guys! I have an issue with review process in Mac App Store My mac key in build settings looks like this:

package.json

{"mac": {
      "type": "distribution",
      "extendInfo": {
        "ElectronTeamID": "XXXXXXXXW4"
      },
      "category": "public.app-category.business",
      "entitlements": "build/entitlements.mas.plist",
      "entitlementsInherit": "build/entitlements.mas.inherit.plist",
      "target": [
        {
          "target": "mas"
        }
      ]
    }

I got .app and .pkg  files. This package could not be loaded though Application Loader with error

ERROR ITMS-90287: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: ‘com.apple.developer.team-identifier’ in ‘xxxxxx/Payload/xxxxxxxx.app/Contents/MacOS/Xxxxxxx’.

If I resign it with next script sign.sh

#!/bin/bash

APP="XXXXXXXXX"
APP_PATH="install/mas/Xxxxxxxxx.app"
RESULT_PATH="AppStore/$APP.pkg"
APP_KEY="3rd Party Mac Developer Application: XXXXXXXXXX (XXXXXXXXXXXXX)"
INSTALLER_KEY="3rd Party Mac Developer Installer: XXXXXXXXX (XXXXXXXXXXX)"
CHILD_PLIST="plists/child.plist"
PARENT_PLIST="plists/parent.plist"
LOGINHELPER_PLIST="plists/loginhelper.plist"

FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"

codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Electron Framework"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libnode.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper EH.app/Contents/MacOS/$APP Helper EH"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper EH.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper NP.app/Contents/MacOS/$APP Helper NP"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper NP.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/MacOS/$APP"

codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"

productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"

My plists child.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>

parent.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.network.client</key>
    <true/>
  </dict>
</plist>

loginhelper.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.inherit</key>
    <true/>
  </dict>
</plist>

It passes Application Loader validation and successfully loads to App Store. But during review I always receive the next issue:

Your app crashed on Mac running macOS 10.13 when we: Launched the app. No crash log was generated by this crash. Next Steps Please revise your app and test it to ensure that it runs as expected. Should you require more assistance with resolving this issue, Apple Developer Technical Support is available to provide direct one-on-one support for discrete code-level questions.

If I set taget as “mas-dev” it runs locally without any issues. Also I have newly generated certificates “3rd Party Mac Developer Application: XXXXXXXXXX (XXXXXXXXXXXXX)” “3rd Party Mac Developer Installer: XXXXXXXXX (XXXXXXXXXXX)”

Application is correctly sandboxed.

I couldn’t understand what the issue is. Does anyone have any suggestion?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
nyanevcommented, Feb 12, 2018

I have the same problem but can’t find the solution

1reaction
develarcommented, Jul 1, 2018

One p12 can contain several certs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MAS distribution pkg got rejected … | Apple Developer Forums
Hi guys! I have an issue with review process in Mac App Store. App was developed using Electron. I have done everything according...
Read more >
Code signing rejected - unnotarized Developer ID #3828
I've generated a Developer ID Application certificate using Xcode and I can see it in login on Keychain. When I run electron_builder I...
Read more >
Fixing Section 2.5.2 - Saagar Jha
In a second case we removed the package manager from iSH, but the reviewer used the wget tool to redownload it and then...
Read more >
ENTRY SUMMARY ACCEPTANCE AND REJECTION POLICY
1.5 Rejected entry summaries must be returned to CSP in valid status with payment within 2 working days from day of rejection or...
Read more >
Frequently Asked Questions - Cannabis Control Commission
Priority or expedited review in the Commission's licensing review process when a completed license application is received;; Fee waivers;; Pre-certification and ...
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