altool fails with "The auth server returned a bad status code"

Hi All, Trying to validate some altool credentials, produces this error message.

"Failed to get authorization for username '<username/>' and password with errors:( "Error Domain=NSCocoaErrorDomain Code=0 "Status code: 0" UserInfo={NSLocalizedDescription=Status code:0, NSLocalizedFailureReason=The auth server returned a bad status code.}")

This is returned when altool is called in the following way.

xcrun altool --notarization-history 0 -u <username/> -p <password/> --output-format xml

macOS 11.2.3 and Xcode 12.5

Things that have been tried already.

  • Making sure the Apple system status page shows no issues.
  • Different networks.
  • Checked to see if any agreements need to be "activated".
  • Recreated the app-specific password multiple times.

Any other suggestions?

@Quinn - Hi Quinn, it's Sam Rowlands (again) and this is with another App Wrapper customer experiencing this issue (so not me directly).

Replies

For debugging auth issues I recommend that you start with --list-providers because it doesn’t depend on any parameters other than the credentials. So, does the following work (substituting the credentials for CCC)?

% xcrun altool --list-providers CCC

Share and Enjoy

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

  • I am using this technique and it is not clear how to resolve the auth error.

    xcrun altool --list-providers -u '<insert-apple-id>' -p '<my-password>'

    *** Error: Failed to retrieve providers info. *** Error: Unable to list providers. Failed to get authorization for username '<insert-apple-id>' and password with errors:( "Error Domain=NSCocoaErrorDomain Code=0 \"Status code: 0\" UserInfo={NSLocalizedDescription=Status code: 0, NSLocalizedFailureReason=The auth server returned a bad status code.}" ) (-1011)

Add a Comment

@Quinn As always, thank you for your prompt and helpful response. I have forwarded the information on to the customer. I'll swap out my code to use this to validate customer entered in user names and passwords in a future update.

I had the same issue, for me it helped to use "application password" generated on https://appleid.apple.com/account/manage instead of my main appleId password

Add a Comment

Application password does the trick for me too!

Hi, This error is coming often now. I have tried the following command it is giving output. xcrun altool --list-providers --username "username" --password "@keychain:NOTARIZE_PASSWORD" I am using app specific password generated for my user name. I got the following output for the above command.

2022-01-31 14:55:51.693 altool[99127:17893146] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called

ProviderName ProviderShortname PublicID                             WWDRTeamID  ------------ ----------------- ------------------------------------ ----------  xxxxx      xxxx            69a6de70-xxxxx-xxxxxx-xxxxxxxxx 82xxxxxxxxC 

macOS: 11.0.1 Xcode: 12.3

regards Prema Kumar

Just a reminder that altool is deprecated for the purposes of notarisation [1]. If you’re notarising, use the shiny new notarytool. It is better, stronger, and faster (-:

For more background on this, see WWDC 2021 Session 10261 Faster and simpler notarization for Mac apps.

Share and Enjoy

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

[1] It’s not deprecated for its other purposes, most notably, upload apps to the App Store.

  • Thanks for the reminder, updating App Wrapper to use notaryTool is on my list of things to do, but there's still some big ticket items above it. Thanks for the video link, I'll watch that soon (I think I've seen it already, but a refresher is always good).

Add a Comment