MacOS notarization on command line returning 'unsupported url' when getting status
Asked Answered
O

1

2

The issue is when getting the notarization status after uploading a request

It's like this, I've got an older kernel extension, with the latest mac update notarizing it will be required and I'm trying to get this done in an automated way (command line).

First thing I wanted to do was see if I could get anything to upload and get any status back.

So after building the kext in xcode, I used ditto to create the archive that needs to be sent to apple:

cd <builddir> && ditto -c -k --keepParent "MyApp.kext" "MyApp.kext.zip"

Once that is done I upload it:

xcrun altool --notarize-app --primary-bundle-ip "com.myapp.." --username "[email protected]" --password "mypassword" -asc-provider "MyProvider" --file MyApp.kext.zip

This returns the request id that I need

So the above steps work, the next step is what's giving me issues, getting the status of the request, tried both the specific request as fetching them all

xcrun altool --notarization-info <id> -u "[email protected]" -p "mypassword" -asc-provider "MyProvider"

OR

xcrun altool --notarization-history 0 -u "[email protected]" -p "mypassword" -asc-provider "MyProvider"

The two commands both give me:

*** Error: Connection failed! Error Message - unsupported URL
*** Error: Apple Services operation failed. unsupported URL

On google I'm not having any luck on finding any error with "unsupported URL"

Does anyone have any experience with this?

Offence answered 8/8, 2019 at 12:28 Comment(4)
I think I've seen this error before, but I forget what exactly caused it, but definitely a mistake in the way I submitted the command. In your case it looks like it might be that --notarization-info doesn't actually need the --asc-provider option. Try leaving that off. Also note that it's --asc-provider with 2 hyphens, not -asc-provider. (I don't know why your --notarize-app worked, as it should have 2 hyphens there too.)Scoggins
I mistyped the command here, need the asc-provider because I'm in more than 1 team, without it it gives an errorOffence
My point is, if you look at the output of xcrun altool --help, the --notarization-info sub-command does not need --asc-provider. (The UUID is unambiguous)Scoggins
You are correct and works, not only that, I did indeed not only mistype here, but also on the command line (stupid mistake) and everything works now. Thank you for noticing itOffence
S
3

I've seen this error before, I forget what exactly caused it, but it definitely would have been a mistake in the way I submitted the command. Unfortunately, altool does not appear to have been written with user-friendliness in mind and does not seem to do much in the way of command line validation.

With that in mind, taking a closer look at your command lines, I notice:

  • It should be --asc-provider, not -asc-provider. Two hyphens, not one.
  • The --notarization-info sub-command actually does not need the --asc-provider option as the UUID is unambiguous for identifying the notarisation transaction you're after.

Tips for anyone finding this answer after a web search for this error message:

  • Compare xcrun altool --help with your actual command. Check number of hyphens, and make sure the command you're running requires or supports the arguments you are passing.
  • Check that all strings (user name, provider, bundle IDs, password (I strongly recommend the keychain provider over providing the literal password on the command line!), etc.) are correctly escaped and surrounded by quotes for good measure.
Scoggins answered 9/8, 2019 at 10:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.