npmmacos95% confidence\u2191 30

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

Full error message
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.

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/#

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/35a97f42d1d57bc4bf55ed37e9a9de9789f4b47c99c60a612e3f165de754df3e
hash \u00b7 35a97f42d1d57bc4bf55ed37e9a9de9789f4b47c99c60a612e3f165de754df3e
Notarizing Electron apps throws - &quot;You must first sign… — DepScope fix | DepScope