Notary tool returns status: Invalid

I am pretty much at a loss here...

In the past I used altool which worked. Not sure of related though, been a while since. But the same build script I use, just replaced altool with notarytool

I first codesigen

`MYNAME@MYMACNAME ~ % codesign --verbose --force --options runtime --timestamp --sign "COMPANYSIGN" "/Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/mac-MYPRODNAME-files/MYPRODNAME.app"

/Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/mac-MYPRODNAME-files/MYPRODNAME.app: replacing existing signature /Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/mac-MYPRODNAME-files/MYPRODNAME.app: signed app bundle with Mach-O thin (x86_64) [com.MYCOMPANY.MYPRODNAME] MYNAME@MYMACNAME ~ % `

Then display entitlements:


MYNAME@MYMACNAME ~ %   codesign --verbose --display --entitlements :- "/Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/mac-MYPRODNAME-files/MYPRODNAME.app"

Executable=/Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/mac-MYPRODNAME-files/MYPRODNAME.app/Contents/MacOS/MYPRODNAME
Identifier=com.MYCOMPANY.MYPRODNAME
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20500 size=127176 flags=0x10000(runtime) hashes=3967+3 location=embedded
Signature size=9057
Timestamp=16 May 2024 at 11.49.11
Info.plist entries=17
TeamIdentifier=MYTEAMID
Runtime Version=10.16.0
Sealed Resources version=2 rules=13 files=279
Internal requirements count=1 size=188
MYNAME@MYMACNAME ~ % 

Then I try do notarization (see next post)

MYNAME@MYMACNAME mac-MYPRODNAME-files %   /usr/bin/xcrun notarytool submit "/Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/MYPRODNAME.zip" --wait --apple-id "MYAPPLEID" --team-id MYTEAMID --password "MYAPPPASSWORD" --verbose
[09:28:14.294Z] Debug [MAIN] Running notarytool version: 1.0.0 (21), date: 2024-05-16T09:28:14Z, command: /Library/Developer/CommandLineTools/usr/bin/notarytool submit /Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/MYPRODNAME.zip --wait --apple-id MYAPPLEID --team-id MYTEAMID --password private<String> --verbose
Conducting pre-submission checks for MYPRODNAME.zip and initiating connection to the Apple notary service...
[09:28:14.322Z] Debug [PREFLIGHT] MYPRODNAME.zip is a zip archive.
[09:28:14.325Z] Debug [PREFLIGHT] Finished completing determination of file type for MYPRODNAME.zip. Operation took 25ms.
[09:28:14.344Z] Info [API] Initialized Notary API with base URL: https://appstoreconnect.apple.com/notary/v2/
[09:28:14.351Z] Debug [CTXMGR] Created temporary directory at: file:///Volumes/DiskW/.TemporaryItems/folders.501/TemporaryItems/NSIRD_notarytool_hSqOln/
[09:28:14.723Z] Debug [CTXMGR] Copied file:///Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/MYPRODNAME.zip to file:///Volumes/DiskW/.TemporaryItems/folders.501/TemporaryItems/NSIRD_notarytool_hSqOln/MYPRODNAME.zip
[09:28:14.725Z] Debug [FILEHASH] Generating md5 and sha256 digest with buffer size 2097152 for file:///Volumes/DiskW/.TemporaryItems/folders.501/TemporaryItems/NSIRD_notarytool_hSqOln/MYPRODNAME.zip
[09:28:15.129Z] Debug [FILEHASH] MD5 digest: 8b13514f3e688008da0362cf346c16fe
[09:28:15.131Z] Debug [FILEHASH] Base64-encoded MD5 Digest: ixNRTz5ogAjaA2LPNGwW/g==
[09:28:15.133Z] Debug [FILEHASH] SHA256 digest: 3d258ae5ab2caf7329c62058d23df915ece64cefe232205174973131f790871d
[09:28:15.134Z] Debug [FILEHASH] Finished generating file hashes for MYPRODNAME.zip. Operation took 406ms.
[09:28:15.137Z] Debug [API] Sending submissions payload: submissionPayload(submissionName: "MYPRODNAME.zip", md5: "8b13514f3e688008da0362cf346c16fe", sha256: "3d258ae5ab2caf7329c62058d23df915ece64cefe232205174973131f790871d", notifications: [])
[09:28:15.140Z] Info [API] Preparing POST request to URL: https://appstoreconnect.apple.com/notary/v2/submissions?
[09:28:15.141Z] Debug [AUTHENTICATION] Delaying current request to refresh app-specific password token
[09:28:15.143Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/asp?, Parameters: [:]
[09:28:15.145Z] Debug [AUTHENTICATION] Authenticating request with Basic Auth. Username: MYAPPLEID, Password: private<String>, Team ID: MYTEAMID
[09:28:15.148Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[09:28:15.610Z] Debug [API] Received response status code: 200, message: no error, URL: https://appstoreconnect.apple.com/notary/v2/asp?, Correlation Key: WLXX2N3U6IEF5S7YOFSGY4QJIQ
[09:28:15.613Z] Debug [TASKMANAGER] Completed Task with ID 2 has received a parsable response.
[09:28:15.614Z] Debug [TASKMANAGER] Ending Task Manager loop.
[09:28:15.617Z] Info [AUTHENTICATION] Caching retrieved app-specific password token with ID: MYTEAMID:MYAPPLEID, token: private<String>
[09:28:15.619Z] Debug [AUTHENTICATION] Authenticating request with App Specific Password credentials. AppleID: MYAPPLEID, Password: private<String>, Team ID: MYTEAMID
[09:28:15.621Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[09:28:16.413Z] Debug [API] Received response status code: 200, message: no error, URL: https://appstoreconnect.apple.com/notary/v2/submissions?, Correlation Key: PHB4QDAUCK5JKE7IIDMLI26UVI
[09:28:16.415Z] Debug [TASKMANAGER] Completed Task with ID 1 has received a parsable response.
[09:28:16.418Z] Debug [TASKMANAGER] Ending Task Manager loop.
[09:28:16.420Z] Debug [MAIN] Received Submission Response: private<NewSubmission>
Submission ID received
  id: 75b7dc7b-364b-4929-a6f1-184bf3fd830d
[09:28:16.422Z] Debug [UPLOAD] Starting upload to S3 of file:///Volumes/DiskW/.TemporaryItems/folders.501/TemporaryItems/NSIRD_notarytool_hSqOln/MYPRODNAME.zip
[09:28:16.425Z] Debug [UPLOAD] Beginning upload to https://s3.us-west-2.amazonaws.com with S3 Acceleration.
[09:28:16.429Z] Info [UPLOAD] Starting PUT upload to S3 at Bucket: notary-submissions-prod, Key: prod/AROARQRX7CZS3PRF6ZA5L:75b7dc7b-364b-4929-a6f1-184bf3fd830d
[09:28:17.948Z] Info [UPLOAD] Completed PUT upload with etag: "8b13514f3e688008da0362cf346c16fe"
[09:28:17.950Z] Info [UPLOAD] Attempting to shutdown local S3 upload service.
[09:28:17.952Z] Info [UPLOAD] Successfully shutdown local S3 upload service.
Successfully uploaded file
  id: 75b7dc7b-364b-4929-a6f1-184bf3fd830d
  path: /Volumes/DiskW/projects-cool-MYNAME/MYPRODPATH/osx/final_MYPRODNAME-dist/MYPRODNAME.zip
Waiting for processing to complete.
[09:28:17.955Z] Info [API] Beginning to wait for submission id: 75b7dc7b-364b-4929-a6f1-184bf3fd830d
[09:28:17.957Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Parameters: [:]
[09:28:17.958Z] Debug [AUTHENTICATION] Using cached token value for app-specific password request: MYTEAMID:MYAPPLEID
[09:28:17.959Z] Debug [AUTHENTICATION] Authenticating request with App Specific Password credentials. AppleID: MYAPPLEID, Password: private<String>, Team ID: MYTEAMID
[09:28:17.962Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[09:28:18.362Z] Debug [API] Received response status code: 200, message: no error, URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Correlation Key: 57KNHN7LEBJ3OIYN7QALED6JVM
[09:28:18.365Z] Debug [TASKMANAGER] Completed Task with ID 3 has received a parsable response.
[09:28:18.367Z] Debug [TASKMANAGER] Ending Task Manager loop.
[09:28:18.369Z] Info [API] Initial status: In Progress)
[09:28:18.371Z] Info [API] Waiting 5 seconds before next poll...
[09:28:23.374Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Parameters: [:]
[09:28:23.377Z] Debug [AUTHENTICATION] Using cached token value for app-specific password request: MYTEAMID:MYAPPLEID
[09:28:23.379Z] Debug [AUTHENTICATION] Authenticating request with App Specific Password credentials. AppleID: MYAPPLEID, Password: private<String>, Team ID: MYTEAMID
[09:28:23.381Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[09:28:23.867Z] Debug [API] Received response status code: 200, message: no error, URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Correlation Key: LCSKFK6SWNEQAYSLKCBQM2TBVM
[09:28:23.870Z] Debug [TASKMANAGER] Completed Task with ID 4 has received a parsable response.
[09:28:23.873Z] Debug [TASKMANAGER] Ending Task Manager loop.
[09:28:23.876Z] Info [API] Received new status: In Progress
Current status: In Progress...[09:28:23.878Z] Info [API] Waiting 5 seconds before next poll...
[09:28:28.884Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Parameters: [:]
[09:28:28.886Z] Debug [AUTHENTICATION] Using cached token value for app-specific password request: MYTEAMID:MYAPPLEID
[09:28:28.887Z] Debug [AUTHENTICATION] Authenticating request with App Specific Password credentials. AppleID: MYAPPLEID, Password: private<String>, Team ID: MYTEAMID
[09:28:28.889Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[09:28:29.325Z] Debug [API] Received response status code: 200, message: no error, URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Correlation Key: QLGY77XI6XOPUK57YWMKZTYZZA
[09:28:29.329Z] Debug [TASKMANAGER] Completed Task with ID 5 has received a parsable response.
[09:28:29.332Z] Debug [TASKMANAGER] Ending Task Manager loop.
[09:28:29.334Z] Info [API] Received new status: In Progress
Current status: In Progress....[09:28:29.335Z] Info [API] Waiting 5 seconds before next poll...
[09:28:34.340Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Parameters: [:]
[09:28:34.343Z] Debug [AUTHENTICATION] Using cached token value for app-specific password request: MYTEAMID:MYAPPLEID
[09:28:34.347Z] Debug [AUTHENTICATION] Authenticating request with App Specific Password credentials. AppleID: MYAPPLEID, Password: private<String>, Team ID: MYTEAMID
[09:28:34.350Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[09:28:34.843Z] Debug [API] Received response status code: 200, message: no error, URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Correlation Key: UEXX2MT2O224VR355B34TZK4A4
[09:28:34.845Z] Debug [TASKMANAGER] Completed Task with ID 6 has received a parsable response.
[09:28:34.847Z] Debug [TASKMANAGER] Ending Task Manager loop.
[09:28:34.849Z] Info [API] Received new status: In Progress
Current status: In Progress.....[09:28:34.851Z] Info [API] Waiting 5 seconds before next poll...
[09:28:39.853Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Parameters: [:]
[09:28:39.854Z] Debug [AUTHENTICATION] Using cached token value for app-specific password request: MYTEAMID:MYAPPLEID
[09:28:39.856Z] Debug [AUTHENTICATION] Authenticating request with App Specific Password credentials. AppleID: MYAPPLEID, Password: private<String>, Team ID: MYTEAMID
[09:28:39.858Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[09:28:40.254Z] Debug [API] Received response status code: 200, message: no error, URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Correlation Key: GTFTIB7L665HT574EVFF5FZ7DM
[09:28:40.256Z] Debug [TASKMANAGER] Completed Task with ID 7 has received a parsable response.
[09:28:40.259Z] Debug [TASKMANAGER] Ending Task Manager loop.
[09:28:40.261Z] Info [API] Received new status: In Progress
Current status: In Progress......[09:28:40.264Z] Info [API] Waiting 5 seconds before next poll...
[09:28:45.271Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Parameters: [:]
[09:28:45.273Z] Debug [AUTHENTICATION] Using cached token value for app-specific password request: MYTEAMID:MYAPPLEID
[09:28:45.274Z] Debug [AUTHENTICATION] Authenticating request with App Specific Password credentials. AppleID: MYAPPLEID, Password: private<String>, Team ID: MYTEAMID
[09:28:45.277Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls.
[09:28:45.758Z] Debug [API] Received response status code: 200, message: no error, URL: https://appstoreconnect.apple.com/notary/v2/submissions/75b7dc7b-364b-4929-a6f1-184bf3fd830d?, Correlation Key: 46TRNSULLTAA7FL4LDUYSNEDCU
[09:28:45.760Z] Debug [TASKMANAGER] Completed Task with ID 8 has received a parsable response.
[09:28:45.763Z] Debug [TASKMANAGER] Ending Task Manager loop.
[09:28:45.765Z] Info [API] Received new status: Invalid
Current status: Invalid.......
[09:28:45.767Z] Info [API] Submission in terminal status: Invalid
Processing complete
  id: 75b7dc7b-364b-4929-a6f1-184bf3fd830d
  status: Invalid
[09:28:45.772Z] Debug [CTXMGR] Removed temporary directory: Optional(file:///Volumes/DiskW/.TemporaryItems/folders.501/TemporaryItems/NSIRD_notarytool_hSqOln/)
MYNAME@MYMACNAME mac-MYPRODNAME-files % 

This problem now went away. And I did nothing different to my knowledge.

Would still be nice if one could lookup the error reason somewhere?

And problem occured again... Anyway to get more information?

Anyway to get more information?

When the notary service issues an Invalid response, it generates a log that offers some insight into what it’s complaining about. For instructions on how to get that log, see Fetching the Notary Log.

In the past I used altool which worked. Not sure of related though

Probably not. This status means that your submission made it to the notary service, and the path it took is unlikely to affect its assessment.

Note It sounds like you managed this transition yourself, but we have a technote that explain it in detail: TN3147 Migrating to the latest notarization tool.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Notary tool returns status: Invalid
 
 
Q