fastlane: Deliver fails with "Unexpected Error" after uploading package to iTunes Connect
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
Deliver fails with “Unexpected Error” after uploading package to iTunes Connect It happened three time with three different apps after the last deliver update (v1.41.1)
Complete output when running fastlane, including the stack trace and command used
[14:10:07]: ---------------------
[14:10:07]: --- Step: deliver ---
[14:10:07]: ---------------------
[14:10:07]: Login to iTunes Connect (XXXXXXXXXXX)
[14:10:10]: Login successful
+--------------------------------------------------------------------+-----------------------------+
| deliver 1.14.1 Summary |
+--------------------------------------------------------------------+-----------------------------+
| force | true |
| submit_for_review | true |
| automatic_release | true |
| metadata_path | ./fastlane/metadata |
| screenshots_path | ./calabash_screenshots |
| app_icon | ./fastlane/../Framework/... |
| app_version | 1.2 |
| release_notes.default | Bug fixes. General stabi... |
| app_review_information.first_name | XXXXXXX |
| app_review_information.last_name | XXXXXXX |
| app_review_information.phone_number | XXXXXXXXXXXXXXXX |
| app_review_information.email_address | XXXXXXXXXXXXXXXXXXXXXXXXXXX |
| app_review_information.notes | XXXXXXXXXXXXXXXXXXXXXXXXXXX |
| price_tier | 0 |
| copyright | XXXXXXXXXXXXXXX |
| app_rating_config_path | ./fastlane/./ratings.json |
| submission_information.add_id_info_uses_idfa | false |
| submission_information.export_compliance_uses_encryption | false |
| submission_information.export_compliance_encryption_updated | false |
| submission_information.content_rights_contains_third_party_content | false |
| ipa | /Users/Shared/Jenkins/Ho... |
| username | XXXXXXXXXXXXXXXXXXXXXX |
| app_identifier | XXXXXXXXXXXXXXXXXXXXXXXXX |
| skip_binary_upload | false |
| skip_screenshots | false |
| skip_metadata | false |
+--------------------------------------------------------------------+-----------------------------+
[14:10:13]: Making sure the latest version on iTunes Connect matches '1.2' from the ipa file...
[14:10:14]: '1.2' is the latest version on iTunes Connect
[14:10:14]: Loading './fastlane/metadata/en-GB/description.txt'...
[14:10:14]: Loading './fastlane/metadata/en-GB/keywords.txt'...
[14:10:14]: Loading './fastlane/metadata/en-GB/release_notes.txt'...
[14:10:14]: Loading './fastlane/metadata/en-GB/support_url.txt'...
[14:10:14]: Loading './fastlane/metadata/en-GB/privacy_url.txt'...
[14:10:14]: Loading './fastlane/metadata/primary_category.txt'...
[14:10:14]: Loading './fastlane/metadata/secondary_category.txt'...
[14:10:14]: Detected languages: ["en-GB", "default"]
[14:10:15]: Activating language en-GB...
[14:10:17]: Uploading metadata to iTunes Connect
[14:10:18]: Successfully uploaded initial set of metadata to iTunes Connect
[14:10:19]: Starting with the upload of screenshots...
[14:10:19]: Uploading 5 screenshots for language en-GB
[14:10:19]: Uploading './calabash_screenshots/en-GB/iPhone6Plus_screenshot_0.png'...
[14:10:23]: Uploading './calabash_screenshots/en-GB/iPhone6Plus_screenshot_1.png'...
[14:10:26]: Uploading './calabash_screenshots/en-GB/iPhone6Plus_screenshot_2.png'...
[14:10:32]: Uploading './calabash_screenshots/en-GB/iPhone6Plus_screenshot_3.png'...
[14:10:34]: Uploading './calabash_screenshots/en-GB/iPhone6Plus_screenshot_4.png'...
[14:10:40]: Saving changes
[14:10:43]: Successfully uploaded screenshots to iTunes Connect
[14:10:44]: Price Tier unchanged (tier 0)
[14:10:45]: Uploading app icon...
[14:10:48]: Uploading binary to iTunes Connect
[14:10:49]: Going to upload updated app to iTunes Connect
[14:10:49]: This might take a few minutes. Please don't interrupt the script.
[14:11:38]: iTunes Transporter successfully finished its job
[14:11:38]: ------------------------------------------------------------------------------------------------------
[14:11:38]: Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.
[14:11:38]: ------------------------------------------------------------------------------------------------------
[14:11:38]: Finished the upload to iTunes Connect
[14:11:41]: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[14:11:41]: Variable Dump:
[14:11:41]: {:PLATFORM_NAME=>nil, :LANE_NAME=>"deploy", :BUILD_NUMBER=>"There does not seem to be a CURRENT_PROJECT_VERSION key set for this project. Add this key to your target's expert build settings.", :PRODUCE_APPLE_ID=>"1151383393", :CERT_FILE_PATH=>"/Users/Shared/Jenkins/Home/workspace/iOS Build - Complete Release/iOS/CM68X7BFDE.cer", :CERT_CERTIFICATE_ID=>"CM68X7BFDE", :SIGH_PROFILE_PATH=>"/Users/Shared/Jenkins/Home/workspace/iOS Build - Complete Release/iOS/AppStore_com.XXXXXXXX.XXXXXXXX.mobileprovision", :SIGH_PROFILE_PATHS=>["/Users/Shared/Jenkins/Home/workspace/iOS Build - Complete Release/iOS/AppStore_com.XXXXXXXX.XXXXXXXXX.mobileprovision"], :SIGH_UDID=>"XXXXXXX-XXXXX-XXXXXX-XXXXX-XXXXXXX", :SIGH_PROFILE_TYPE=>"app-store", :IPA_OUTPUT_PATH=>"/Users/Shared/Jenkins/Home/workspace/iOS Build - Complete Release/iOS/XXXXXXX.ipa", :DSYM_OUTPUT_PATH=>"/Users/Shared/Jenkins/Home/workspace/iOS Build - Complete Release/iOS/XXXXXXXXXX.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/Shared/Jenkins/Library/Developer/Xcode/Archives/2016-10-07/Framework 2016-10-07 14.08.45.xcarchive"}
[14:11:41]: {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"}
+------+---------------------------------------------------------------+-------------+
| fastlane summary |
+------+---------------------------------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------------------------------------------+-------------+
| 1 | Verifying required fastlane version | 0 |
| 2 | team_id | 0 |
| 3 | increment_build_number | 0 |
| 4 | produce | 13 |
| 5 | cert | 62 |
| 6 | sigh | 43 |
| 7 | git -C .. apply fastlane/stopAskLocation.patch | 0 |
| 8 | git -C .. apply -R fastlane/stopAskLocation.patch | 0 |
| 9 | open afp://admin:AIp4ssw0rd@buildservershost.private/Shared | 0 |
| 10 | [ -d /Volumes/Shared/Dropbox\ \(AppInstitute\)/AppInstitute\ | 0 |
| 11 | cp ../AppStore_com.* /Volumes/Shared/Dropbox\ \(AppInstitute\ | 0 |
| 12 | cp ../*.mobileprovision /Volumes/Shared/Dropbox\ \(AppInstitu | 0 |
| 13 | cp production_* /Volumes/Shared/Dropbox\ \(AppInstitute\)/App | 0 |
| 14 | update_project_code_signing | 0 |
| 15 | gym | 84 |
| 💥 | deliver | 94 |
+------+---------------------------------------------------------------+-------------+
[14:11:42]: fastlane finished with errors```
### Configuration Files
Please copy the complete content of your `Fastfile` and any other configuration files you use below:
Fastfile:
```ruby
fastlane_version "1.105.0"
team_id "XXXXXXXXXXX"
ENV["FASTLANE_ITC_TEAM_ID"] = "XXXXXXXXX"
lane :deploy do |options|
increment_build_number( build_number: "4447" )
produce({
app_name: "XXXXXXX",
language: "UK English",
app_version: "1.2",
sku: "XXXXXXXX",
team_name: "XXXXXXX Ltd"
})
cert
sigh( force: true )
ENV["SNAPSHOT_SKIP_OPEN_SUMMARY"] = "1"
sh "git -C .. apply fastlane/stopAskLocation.patch"
sh "git -C .. apply -R fastlane/stopAskLocation.patch"
update_project_code_signing( path: "Framework.xcodeproj")
ENV["FASTLANE_XCODE_LIST_TIMEOUT"]="120"
gym(
scheme: "Framework",
)
ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t Aspera,Signiant,DAV -m diagnostic"
deliver(
force: true,
submit_for_review: options[:submit],
automatic_release: options[:release],
metadata_path: "./fastlane/metadata"
)
end
Deliverfile:
screenshots_path "./calabash_screenshots"
basePath = "./fastlane/"
app_icon basePath + "../Framework/Resources/Images.xcassets/AppIcon.appiconset/icon_1024.png"
app ENV["PRODUCE_APPLE_ID"]
app_version '1.2' # you can pass this if you want to verify the version number with the ipa file
release_notes({
'default' => 'Bug fixes. General stability updates.'
})
release_notes({
'default' => 'Bug fixes. General stability updates.'
})
app_review_information({
first_name: ENV['BUILD_USER_FIRST_NAME'],
last_name: ENV['BUILD_USER_LAST_NAME'],
phone_number: "XXXXXXXXXXX",
email_address: ENV['BUILD_USER_EMAIL'],
notes: "The 'Listen Now' tab allows the user to play music from an audio stream hosted on the internet (http://XX.XX.XX.XX:8040/listen.pls).
Push notifications are used to:
* inform users when updates are available
* respond to forms submitted via the app
* notify a user when they receive any new messages from the Message Centre within the app
* send users notifications, user specific opt in offers, and loyalty points when they are in a specific physical location (geo-fencing), which requires access to the phone's GPS location
"
})
price_tier 0
copyright "#{Time.now.year} XXXXXXXXX"
app_rating_config_path basePath + "./ratings.json"
submission_information({
add_id_info_uses_idfa: false,
export_compliance_uses_encryption: false,
export_compliance_encryption_updated: false,
content_rights_contains_third_party_content: false
})
ipa ENV["IPA_OUTPUT_PATH"]
Environment
Jenkins version 2.7.2
MacOS X version 10.11.3
fastlane version 1.105.0
Do you use bundler to execute fastlane (i.e. bundle exec fastlane)?
NO
Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)?
NO
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 51 (7 by maintainers)
Commits related to this issue
- Fix upload of app icon for app and watch Similar to https://github.com/fastlane/fastlane/pull/6423 Fixes https://github.com/fastlane/fastlane/issues/6425 Fixes https://github.com/fastlane/fastlane/is... — committed to fastlane/fastlane by KrauseFx 8 years ago
- Fix upload of app icon for app and watch (#6652) * Fix upload of app icon for app and watch Similar to https://github.com/fastlane/fastlane/pull/6423 Fixes https://github.com/fastlane/fastlane/is... — committed to fastlane/fastlane by KrauseFx 8 years ago
Hey everyone, thanks for all the reports, and sorry it took so long. Thanks to @sunboshan, it was easy to reproduce the issue and provide a fix. I’ve just pushed https://github.com/fastlane/fastlane/pull/6652, which we’ll merge and release as soon as possible 🚀
We’ll update this GitHub issue once the new version is live ✨
spaceship 0.36.1 has been shipped which resolves this issue. You can update to it by running:
gem update spaceship. Please let us know if this resolves this issue for you. 👍Hi everyone!
We are going to hold off on trying to write a fix/workaround for this for the time being as this is something that is happening on Apple’s end (given that they are displaying 500’s on the web) and we expect them to fix it in the not-so-distant future.
In the mean time, we would encourage you to submit issues to iTunesConnect’s support center with reports that this happens even when uploading via the web UI.
I put together a ruby script that uses Spaceship to finish submitting an app for review if the deliver fails right after upload as it seems to for most of us. https://gist.github.com/zineer/17a516aeebc16cd731190f26184d01e2 You’ll need to make at least a few tweaks to match your purposes including
submission_informationfrom your DeliverfileThen you can
chmod +x finishfailed.rb, and run it like./finishfailed com.domain.appIt is based on https://github.com/fastlane/fastlane/blob/master/deliver/lib/deliver/submit_for_review.rb but for getting the
appandedit_versionit catches the exception caused by the 500 error and loops until the error goes away, then continues with the submission.deliver 1.14.3 has been released with the fix! 🚀
@nmonasterio the
checksumshould be based on the binary of the image file(not 100% sure though). Yet you don’t need to get those information by yourself. After upload the image by sending POST request to https://du-itc.itunes.apple.com/upload/image, you will get response like this:@KrauseFx already has the fix for screenshot files in #6423, need to do similar fix for icon files. This has been tested for bunch of apps, providing
assetToken,originalFileName,size,width,heightandchecksumwill fix the 500 error.For the moment I applied this inelegant change to the SubmitForReview class in deliver/submit_for_review.rb
it’s based on @zineer script concept, but applied directly to deliver source code
@ohwutup waiting for a better solution from your side I want to let you know that trying this with four apps the average waiting time has been 5 minutes before deliver was able to select the build and exit the loop. After that everything worked properly
Just started seeing the same error as well, starting yesterday. We were able to deploy some 20 apps with no issue Thursday afternoon, with submission for review and everything.
Thursday night/Friday morning, we were able to upload but started getting Unexpected Errors on submission for review. Starting in the afternoon, we were seeing the same error as yours upon upload.
Just verified, and it’s still there.
Relevant portion of our stack trace (seeing this both in Jenkins and on a local release):
Can confirm it works here.
Thank you for the insight, @sunboshan . I can confirm that by leaving out the app_icon option from deliver the submission succeeds without any errors. Would be great if this could get fixed.
ITC returns 500 when uploading an icon and save.
The JSON for icon looks like this:
Before Apple made change to ITC, we only need to change
assetTokenandoriginalFileNamepart, leave the rest nil. But after Apple made the change, it will cause 500 error.The solution is simply provide
assetToken,originalFileName,size,width,heightandchecksumin the JSON. It will work. Leave the fix for @KrauseFxIt should fix #6425 as well.
@dbalas thanks for your comment. It seems the problem is in the ‘submission_information’
I used to have
I noticed that I should only keep one of the two
export_compliance_uses_encryptionORexport_compliance_encryption_updateddepending on the app being submitted for the first time or updatedEven if the previous settings have been working for a long time, it seems now something changed.