Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notarizing Electron apps throws - "You must first sign the relevant contracts online. (1048)" error

I am trying to Notarize an electron app to make it run on macOS Catalina. The packaging was successful but the xcrun altool command is throwing "You must first sign the relevant contracts online. (1048)" error.

Electron app package.json contents:

"mac": {
      "entitlements": "./build/entitlements.mac.inherit.plist",
      "hardenedRuntime": true,
      "type": "distribution",
      "category": "public.app-category.productivity",
      "icon": "build/icon.icns",
      "target": [
        "dmg",
        "zip"
      ]
    },
   "dmg": {
      "sign": false,

entitlements.mac.inherit.plist file:

<?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.application-identifier</key>
    <string><app.bundle.name></string>
    <key>com.apple.developer.team-identifier</key>
    <string><TEAMID></string>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.application-groups</key>
    <array>
      <string><app.bundle.name></string>
    </array>
    <key>com.apple.security.network.client</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
    <key>com.apple.security.inherit</key>
    <true/>
  </dict>
</plist>

I ran the command as mentioned in https://stackoverflow.com/a/53121755

xcrun altool --notarize-app -f App.dmg --primary-bundle-id app.bundle.name -u <username> -p <app-specific-password>

It is throwing You must first sign the relevant contracts online. (1048) error. I am unable to proceed with the app signing. Help!

ps: electron-notarize package is throwing the same error.


It has been two years since I asked this and I had to bookmark my own question just because Apple keeps annoying the devs with such frequent policy changes.

like image 872
Ganesh Rathinavel Avatar asked Oct 12 '19 20:10

Ganesh Rathinavel


2 Answers

TLDR: There are two places where contracts may need to be signed. Check at these URLs:

  • https://appstoreconnect.apple.com/agreements/
  • https://developer.apple.com/account/

I also got the error "Error: You must first sign the relevant contracts online. (1048)".

Navigating to developer.apple.com memberships or anything else didn’t reveal prompt. It turned out, my Apple developer account had no "admin" rights within our organization and I could not see the legal prompts, but there was no indication of this.

After a team member with admin access navigated to https://appstoreconnect.apple.com/ there was a pending agreement that had to be accepted and the error went away.

UPD. Comments suggested that the agreements could also be directly reviewed at https://appstoreconnect.apple.com/agreements/#

like image 77
Misha Reyzlin Avatar answered Nov 04 '22 17:11

Misha Reyzlin


You can also navigate to https://developer.apple.com/account/#/overview/{companyid}

At the top will be a prompt to agree the updated license agreement. In case you don't have the rights there will be a button which generates an email containing the link to those who can.

like image 30
MoxxiManagarm Avatar answered Nov 04 '22 16:11

MoxxiManagarm