Xcode 11 using organizer to upload IPA fails

1.7k Views Asked by At

I recently upgraded to Catalina and Xcode 11.

Now when I try to upload an archive from the organizer, I get a simple error saying «"Error Domain=WorkerErrorDomain Code=-10000 "An error occurred uploading to the App Store."»

Since this isn't really an error message, I tried to use xcrun altool to upload the ipa.

That's when things get interesting. This fails with the following error:

Java 1.5 or Java 1.6 is required. Currently, java is the default java version. Please upgrade.

Java 1.6 is ancient! There's not even a downloadable package available for Catalina.

Any ideas what's going wrong here?

This is the output of the command line tool (redacted for paths and secret-codes):

Using tool '/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources/DTAppAnalyzerExtractor'.
'DTAppAnalyzerExtractor': self.executablePath: /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources/DTAppAnalyzerExtractor
Launching: /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Resources/DTAppAnalyzerExtractor --input-dir /var/folders/bj/xxxxx/T/myipa.ipa --output-file /var/folders/bj/xxxxx/T/DTAppAnalyzerExtractorOutput-xxxxx.zip
Web service call (validateSoftwareSPIUsage) result: (null)
Using template named: purple-metadata-template
Sending request to iTunesTransporter...
Command: /usr/local/itms/bin/iTMSTransporter
Arguments: -m upload -u '[email protected]' -vp json -TxHeaders xxxxx== -sessionid xxxxx -sharedsecret xxxxx -f '/var/folders/bj/xxxxx/T/xxxxx/xxxx.itmsp' -indicator true -v eXtreme -Dtransporter.client='altool' -Dtransporter.client.version='4.00 (1181)'
Java 1.5 or Java 1.6 is required. Currently, java is the default java version. Please upgrade.
Error:
Java 1.5 or Java 1.6 is required. Currently, java is the default java version. Please upgrade.
Out:
Errors: (null)
*** Error: Errors uploading '/Library/Documents/myapp.ipa': (
    "Error Domain=WorkerErrorDomain Code=-10000 \"An error occurred uploading to the App Store.\" UserInfo={NSLocalizedDescription=An error occurred uploading to the App Store., NSLocalizedFailureReason=An error occurred uploading to the App Store.}"
3

There are 3 best solutions below

2
On BEST ANSWER

The culprit was a directory on my system named "/usr/local/itms/" which had a very old iTMSTransporter from 2008 in it. Xcode using that old tool for some reason. After I deleted that whole directory and relaunched Xcode, it worked!

Credit goes to @BigZaphod on twitter! (This is a direct quote)

2
On

Usexcodebuild is better

xcodebuild -exportArchive -exportOptionsPlist /pathTo/ExportOptionsUpload.plist -archivePath /pathTo/App.xcarchive

ExportOptionsUpload.plist include

<key>destination</key>
<string>upload</string>

See detail by

man xcodebuild  
0
On

Go to Preferences > Network > Advanced > Proxies and check "Auto Proxy Discovery" and "Automatic Proxy Configuration", other proxy options cannot be checked. And finally uncheck "SOCKS Proxy" option, this resolved the issue for me.