Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deliver fails with "Unexpected Error" after uploading package to iTunes Connect #6455

Closed
2 tasks done
igorstimoli opened this issue Oct 7, 2016 · 51 comments
Closed
2 tasks done

Comments

@igorstimoli
Copy link

New Issue Checklist

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

@nmonasterio
Copy link

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):

/Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/spaceship-0.34.3/lib/spaceship/client.rb:453:in `parse_response': [!] {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"} (Spaceship::Client::UnexpectedResponse)
    from /Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/spaceship-0.34.3/lib/spaceship/tunes/tunes_client.rb:299:in `app_version'
    from /Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/spaceship-0.34.3/lib/spaceship/tunes/app_version.rb:174:in `find'
    from /Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/spaceship-0.34.3/lib/spaceship/tunes/application.rb:102:in `edit_version'
    from /Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/deliver-1.14.1/lib/deliver/submit_for_review.rb:32:in `select_build'
    from /Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/deliver-1.14.1/lib/deliver/submit_for_review.rb:5:in `submit!'
    from /Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/deliver-1.14.1/lib/deliver/runner.rb:87:in `submit_for_review'
    from /Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/deliver-1.14.1/lib/deliver/runner.rb:30:in `run'
    from /Users/nmonasterio/.rvm/gems/ruby-2.2.3/gems/deliver-1.14.1/lib/deliver/commands_generator.rb:

@dbalas
Copy link

dbalas commented Oct 10, 2016

Same here, exact stack trace.
I do not know if it has something to do but after (or before) this error https://itunesconnect.apple.com has a "500 Interval server error"...

Edit:
Fixed: #5594

@kmpnz
Copy link

kmpnz commented Oct 10, 2016

Having the same issue as @nmonasterio. The stack trace looks exactly the same:

/Library/Ruby/Gems/2.0.0/gems/spaceship-0.34.3/lib/spaceship/client.rb:453:in `parse_response': [!] {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"} (Spaceship::Client::UnexpectedResponse)
    from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.34.3/lib/spaceship/tunes/tunes_client.rb:299:in `app_version'
    from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.34.3/lib/spaceship/tunes/app_version.rb:174:in `find'
    from /Library/Ruby/Gems/2.0.0/gems/spaceship-0.34.3/lib/spaceship/tunes/application.rb:102:in `edit_version'
    from /Library/Ruby/Gems/2.0.0/gems/deliver-1.14.1/lib/deliver/submit_for_review.rb:32:in `select_build'
    from /Library/Ruby/Gems/2.0.0/gems/deliver-1.14.1/lib/deliver/submit_for_review.rb:5:in `submit!'
    from /Library/Ruby/Gems/2.0.0/gems/deliver-1.14.1/lib/deliver/runner.rb:87:in `submit_for_review'
    from /Library/Ruby/Gems/2.0.0/gems/deliver-1.14.1/lib/deliver/runner.rb:30:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.105.0/lib/fastlane/actions/deliver.rb:18:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.105.0/lib/fastlane/runner.rb:202:in `block (2 levels) in execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.105.0/lib/fastlane/actions/actions_helper.rb:35:in `execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.105.0/lib/fastlane/runner.rb:187:in `block in execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.105.0/lib/fastlane/runner.rb:186:in `chdir'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.105.0/lib/fastlane/runner.rb:186:in `execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.105.0/lib/fastlane/runner.rb:112:in `trigger_action_by_name'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.105.0/lib/fastlane/fast_file.rb:140:in `method_missing'
    from Fastfile:70:in `block (2 levels) in parsing_binding'

Fastfile:70 starts the deliver process.

@nmonasterio
Copy link

Interesting, @dbalas . So, modifying your submission info hash did the trick?

Right now I have
{ add_id_info_serves_ads: false, add_id_info_uses_idfa: false, export_compliance_uses_encryption: false, export_compliance_encryption_updated: false }

I'll add these two and see if that makes any difference and report back...

content_rights_contains_third_party_content: false, content_rights_has_rights: false

Thanks!

@igorstimoli
Copy link
Author

@dbalas
thanks for your comment. It seems the problem is in the 'submission_information'

I used to have

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
})

I noticed that I should only keep one of the two export_compliance_uses_encryption OR export_compliance_encryption_updated depending on the app being submitted for the first time or updated

Even if the previous settings have been working for a long time, it seems now something changed.

@nmonasterio
Copy link

@kmpnz Did this just start happening to you (i.e., was your deliver lane working until recently)? What options are you passing for the submission-info hash, BTW?

If that's the case that some parameters are now required, I might be able to put in a PR for this, @KrauseFx , so that we fill in any defaults when they're not passed. How does that sound?

@nmonasterio
Copy link

nmonasterio commented Oct 10, 2016

@igorstimoli That did it. Nice work!

Let me know if you'd like a PR for that, then, @KrauseFx / @TKBurner . Happy to handle.

@igorstimoli
Copy link
Author

A PR sounds good, thanks @nmonasterio

@gregk8288
Copy link

gregk8288 commented Oct 10, 2016

Hi All, I'm not sure that's the issue. I have just deployed three apps to the App Store, all updates and one of the apps was successful the other 2 failed, with the same error above, after upload. It fails exactly after upload and well before the Submission Information is triggered.

[18:05:37]: This might take a few minutes. Please don't interrupt the script.
[18:06:25]: iTunes Transporter successfully finished its job
[18:06:25]: ------------------------------------------------------------------------------------------------------
[18:06:25]: Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.
[18:06:25]: ------------------------------------------------------------------------------------------------------
[18:06:25]: Finished the upload to iTunes Connect
[18:06:26]: -------------------
[18:06:26]: --- Step: slack ---
[18:06:26]: -------------------
[18:06:28]: Successfully sent Slack notification
[18:06:28]: {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"}

@igorstimoli
Copy link
Author

igorstimoli commented Oct 11, 2016

I think @gregk8288 is right
The one I found seems to be a problem, but not the only one.
This morning I had a failure and I found out that I had the correct submission_information settings for that app and I received an Unexpected error
{"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"}

Then I logged in iTunesConnect and the app was there, but the build was not processed yet, so at the point it failed it was certainly not ready for triggering the submission information

@igorstimoli igorstimoli reopened this Oct 11, 2016
@nmonasterio
Copy link

Agreed. We had submissions fail throughout the day yesterday. Same issue as everyone is experiencing.

For what it's worth, I think iTunes Connect might be having some issues itself. I was greeted with all sorts of 500 errors yesterday in the UI as well, and people are reporting that they have uploaded binaries through Application Loader only to find the .ipa disappear a few minutes later. (Will add link shortly.)

I'm going to try looking at some of the HTTP traffic when calling these methods through spaceship (e.g., find and others). Will let everyone know if I see something...

N

Sent from my Nintendo Gameboy

On Oct 11, 2016, at 3:49 AM, igorstimoli notifications@github.com wrote:

I think @gregk8288 is right
The one I found seems to be a problem, but not the only one.
This morning I had a failure and I found out that I had the correct submission_information settings for that app and I received an Unexpected error
{"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"}

The I logged in iTunesConnect and the app was there, but the build was not processed yet, so at the point it failed it was certainly not ready for triggering the submission information


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@Wojcik
Copy link

Wojcik commented Oct 11, 2016

Looks like this issue is connected to 500 error on iTC. I can't update any app while I'm getting 500 on iTC. Fastlane can give {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"} on any step (produce, deliver). Also the strangest thing is when I upload binary only ( without app icon) all is working as expected. But as soon as icon uploaded to iTC it gives 500

@kd8ssq
Copy link

kd8ssq commented Oct 11, 2016

I'm receiving the same errors as well for each app I try and update.

@nmonasterio
Copy link

@Wojcik I was able to replicate the issue with the icon vs. no-icon upload. Good find!

@TKBurner
Copy link

@igorstimoli @nmonasterio @kd8ssq @Wojcik Just wanted to let you know I reached out to the core team about this and we'll update on this thread. Is this related only to submission_info?

@igorstimoli
Copy link
Author

@TKBurner
The issue seems to be related to the submit for review process.
Even when the submission_info setting are correct the submission fails with unexpected error
Setting the submit_for_review to false allow fastlane not to fail because it skips the last submission step.

As said before, I've noticed that the failure occurs before the build is processed, so it seems that the submission_info are not processed yet at that point.

When the submit process works the output looks like

[12:24:25]: iTunes Transporter successfully finished its job
[12:24:25]: ------------------------------------------------------------------------------------------------------
[12:24:25]: Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.
[12:24:25]: ------------------------------------------------------------------------------------------------------
[12:24:25]: Finished the upload to iTunes Connect
[12:24:26]: Selecting the latest build...
[12:24:28]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:25:02]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:26:07]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:26:38]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:27:10]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:27:42]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:28:14]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:28:45]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:29:17]: Waiting iTunes Connect processing for build 1.0 (4436)... this might take a while...
[12:29:49]: Selecting build 1.0 (4436)...
[12:29:51]: Successfully selected build

But it is failing like this

[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"}

So we get an unexpected error just after the ipa is uploaded and before it is processed by iTunesConnect

@nmonasterio
Copy link

nmonasterio commented Oct 11, 2016

For context, I've been looking at the payloads for uploading the app icon. Things seem to be pretty consistent, but comparing against the upload_file method here:

POST /upload/image HTTP/1.1
Host: du-itc.itunes.apple.com
Connection: keep-alive
Content-Length: 272778
Pragma: no-cache
Cache-Control: no-cache
X-Apple-Upload-ContentProviderId: xxxxx
Origin: https://itunesconnect.apple.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: application/json, text/plain, */*
X-Original-Filename: ios-store-icon.png
X-Apple-Upload-Validation-RuleSets: MZPFT.LargeApplicationIcon
X-Apple-Request-UUID: xxxxx
X-Apple-Upload-AppleId: xxxxx
X-Apple-Upload-itctoken: xxxxx
Content-Type: image/png
X-Apple-Upload-Referrer: https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/xxxxx/ios/versioninfo
Referer: https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/xxxxx/ios/versioninfo
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8,es;q=0.6

@cdunkel
Copy link

cdunkel commented Oct 11, 2016

FYI, I've started getting a 500 Internal Server Error from iTC when even trying to view my apps in the last few minutes.

image

@365SplendidSuns
Copy link

365SplendidSuns commented Oct 11, 2016

I'm getting the same 500 Inernal Server Error on iTC as cdunkel above. Also although I started having the same problem everyone else described here I'm getting it immediately after a successful login to iTC when using fastlane now.

@nmonasterio
Copy link

@cdunkel @365SplendidSuns Saw those yesterday, too.

@TKBurner
Copy link

@cdunkel @365SplendidSuns Do you think this new issue is on Apple's side? It seems to be but I wanted to check with you. Either way we are looking into this. 👍 👍 💯

@365SplendidSuns
Copy link

365SplendidSuns commented Oct 11, 2016

@TKBurner I'd be surprised if it wasn't Apple's side to be honest. Since my last post I've actually had one app submitted fine using deliver and another which failed after successfully selecting build with the error message "You must upload a large app icon" (My icons were fine).

@nmonasterio
Copy link

@TKBurner It would seem so, especially given the fact that the payload currently being generated is just about identical. Do we have any insight on what the validation is (i.e., it might have changed)?

@kd8ssq
Copy link

kd8ssq commented Oct 11, 2016

It seems that it is ITC. I've had several times today where I've received 500 errors when I try to manage some of my apps. I've also had trouble logging in and navigating around their interface. Sometimes I receive a generic error message, other times I receive a 500 error message.

@cdunkel
Copy link

cdunkel commented Oct 11, 2016

@TKBurner it definitely seems like Apple is a big part of it. The only thing that I'm seeing that might not be Apple's fault is that if I'm doing back-to-back releases I can only make it through one run before I see this issue. Re-running Fastlane then gets me through another app release.

That said, I've been seeing the same behavior as @kd8ssq. iTC seems so unstable today that I'm amazed I'm getting anything through.

@pedro380085
Copy link

Same thing here, error signature looks the same and occurs randomly. Apple is preparing its 2017 April fools prank in advance.

@TKBurner
Copy link

@GandjaFuzz @kmpnz @cdunkel @kd8ssq @365SplendidSuns @nmonasterio Any new findings? The team is looking into this! 👍 👍 👍

@kd8ssq
Copy link

kd8ssq commented Oct 12, 2016

I've found that everything seems to upload properly (screenshots, metadata and the binary), but as soon as it gets to the step where it's supposed to wait for the binary check to be complete, it fails. The binary has still uploaded and after a few minutes I'll get an email that the processing is complete. If I try to login to ITC around the time of the error, I'll get a 500 error when I click "My Apps". After a few minutes I can view all the apps but I still get an error "We cannot process your request" if I try to view the newly uploaded app. If I let it sit for about 20 minutes then I can get into the app and manually mark it for review and everything works.

@kmpnz
Copy link

kmpnz commented Oct 13, 2016

@TKBurner My observations so far: Screenshots and the metadata are getting uploaded. The Transporter kicks in and according to the logs the binary should be uploaded as well, but I can't find in itunesconnect afterwards, even after a while. Here is a log snippet:

DEBUG [2016-10-12 13:43:40.25]: [Transporter]: DBG-X: Apple's web service operation return value:
DEBUG [2016-10-12 13:43:40.25]: [Transporter]: DBG-X:   parameter Success = true
DEBUG [2016-10-12 13:43:40.72]: [Transporter]: DBG-X: Unlocking token at path /Users/jenkins/.itmstransporter/UploadTokens/devmini.zurich.internal.xxxxxxx.io_ArnoFiva1027146839_1154498305.itmsp.token
DEBUG [2016-10-12 13:43:40.72]: [Transporter]: DBG-X: Releasing token file lock
DEBUG [2016-10-12 13:43:40.72]: [Transporter]: DBG-X: Removing token at path /Users/jenkins/.itmstransporter/UploadTokens/devmini.zurich.internal.xxxxxxx.io_ArnoFiva1027146839_1154498305.itmsp.token
DEBUG [2016-10-12 13:43:40.72]: [Transporter]: INFO: Done performing uploadDone notification to Apple.
DEBUG [2016-10-12 13:43:40.72]: [Transporter]: INFO: The package: /tmp/1154498305.itmsp has been successfully uploaded.
INFO [2016-10-12 13:43:40.88]: iTunes Transporter successfully finished its job
DEBUG [2016-10-12 13:43:40.88]: [Transporter]: DBG-X: Returning 0
INFO [2016-10-12 13:43:40.98]: ------------------------------------------------------------------------------------------------------
INFO [2016-10-12 13:43:40.98]: Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.
INFO [2016-10-12 13:43:40.98]: ------------------------------------------------------------------------------------------------------
INFO [2016-10-12 13:43:40.98]: Finished the upload to iTunes Connect
INFO [2016-10-12 13:43:41.86]: -------------------
INFO [2016-10-12 13:43:41.86]: --- Step: slack ---
INFO [2016-10-12 13:43:41.86]: -------------------
INFO [2016-10-12 13:43:42.56]: Successfully sent Slack notification
WARN [2016-10-12 13:43:42.56]: Variable Dump:
INFO [2016-10-12 13:43:42.56]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios store", :BUILD_NUMBER=>"13", :SIGH_PROFILE_PATH=>"/Users/jenkins/workspace/clients/ios/appstore-ios-xxxxxxxx-store/AppStore_ch.xxxxxxx.xxxxxx.mobileprovision", :SIGH_PROFILE_PATHS=>["/Users/jenkins/workspace/clients/ios/appstore-ios-xxxxxx-store/AppStore_ch.xxxxxxx.xxxxxx.mobileprovision"], :SIGH_UDID=>"f3cbb476-7efa-4d94-88b0-2c309ec8194d", :SIGH_PROFILE_TYPE=>"app-store", :IPA_OUTPUT_PATH=>"/Users/jenkins/workspace/clients/ios/appstore-ios-xxxxxx-store/Products/XX_Talk-4.7.2b13.ipa", :DSYM_OUTPUT_PATH=>"/Users/jenkins/workspace/clients/ios/appstore-ios-xxxxxx-store/Products/XX_Talk-4.7.2b13.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/jenkins/Library/Developer/Xcode/Archives/2016-10-12/XX_Talk-4.7.2b13 2016-10-12 13.37.11.xcarchive"}
ERROR [2016-10-12 13:43:42.56]: {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"}

@kd8ssq
Copy link

kd8ssq commented Oct 13, 2016

Just this morning I've noticed when I try to create a new app in ITC using produce, it takes a very long time to create. Most of the time my script times out, then I have to wait till I see the app created in ITC before I can continue.

[11:49:02]: Waiting for the newly created application to be available on iTunes Connect... [11:49:17]: Waiting for the newly created application to be available on iTunes Connect... [11:49:33]: Waiting for the newly created application to be available on iTunes Connect... [11:49:48]: Waiting for the newly created application to be available on iTunes Connect... [11:50:03]: Waiting for the newly created application to be available on iTunes Connect... [11:50:19]: Waiting for the newly created application to be available on iTunes Connect... [11:50:34]: Waiting for the newly created application to be available on iTunes Connect... [11:50:50]: Waiting for the newly created application to be available on iTunes Connect... [11:51:06]: Waiting for the newly created application to be available on iTunes Connect... [11:51:21]: Waiting for the newly created application to be available on iTunes Connect... [11:51:36]: Waiting for the newly created application to be available on iTunes Connect... [11:51:56]: Waiting for the newly created application to be available on iTunes Connect... [11:52:12]: Waiting for the newly created application to be available on iTunes Connect... [11:52:27]: Waiting for the newly created application to be available on iTunes Connect... [11:52:44]: Waiting for the newly created application to be available on iTunes Connect... [11:52:59]: Waiting for the newly created application to be available on iTunes Connect...

@igorstimoli
Copy link
Author

@TKBurner

still having the same issue.
I feel confident to confirm it doesn't depend on submission_info settings.
The problem is definitely on deliver submit_for_review step
Here is the output of my last try

+-------------------------------------------------------------+------------------------------------+
|                                      deliver 1.14.2 Summary                                      |
+-------------------------------------------------------------+------------------------------------+
| force                                                       | true                               |
| submit_for_review                                           | true                               |
| automatic_release                                           | true                               |
| metadata_path                                               | ./fastlane/metadata                |
| screenshots_path                                            | ./calabash_screenshots             |
| app_icon                                                    | ./fastlane/../Framework/Resourc... |
| app_version                                                 | 1.5                                |
| release_notes.default                                       | Bug fixes. General stability up... |
| app_review_information.first_name                           | xxxxxxxx                           |
| app_review_information.last_name                            | xxxxxxxx                           |
| app_review_information.phone_number                         | xxxxxxxx                           |
| app_review_information.email_address                        | xxxxxxxx                           |
| price_tier                                                  | 0                                  |
| copyright                                                   | xxxxxxxx                           |
| app_rating_config_path                                      | ./fastlane/./ratings.json          |
| submission_information.add_id_info_uses_idfa                | true                               |
| submission_information.add_id_info_serves_ads               | true                               |
| submission_information.add_id_info_limits_tracking          | true                               |
| submission_information.add_id_info_tracks_action            | false                              |
| submission_information.add_id_info_tracks_install           | false                              |
| submission_information.export_compliance_encryption_updated | false                              |
| ipa                                                         | /Users/Shared/Jenkins/Home/work... |
| username                                                    | xxxxxxxx                           |
| app_identifier                                              | xxxxxxxx                           |
| skip_binary_upload                                          | false                              |
| skip_screenshots                                            | false                              |
| skip_metadata                                               | false                              |
| dev_portal_team_name                                        | xxxxxxxx                           |
+-------------------------------------------------------------+------------------------------------+


[09:53:00]: Successfully uploaded screenshots to iTunes Connect
[09:53:02]: Price Tier unchanged (tier 0)
[09:53:03]: Uploading app icon...
[09:53:11]: Uploading binary to iTunes Connect
[09:53:12]: Going to upload updated app to iTunes Connect
[09:53:12]: This might take a few minutes. Please don't interrupt the script.
[09:54:28]: iTunes Transporter successfully finished its job
[09:54:28]: ------------------------------------------------------------------------------------------------------
[09:54:28]: Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.
[09:54:28]: ------------------------------------------------------------------------------------------------------
[09:54:28]: Finished the upload to iTunes Connect
[09:54:29]: Variable Dump:
[09:54:29]: {: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=>"xxxxxxxx", :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.xxxxxxxx.mobileprovision"], :SIGH_UDID=>"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx", :SIGH_PROFILE_TYPE=>"app-store", :IPA_OUTPUT_PATH=>"/Users/Shared/Jenkins/Home/workspace/iOS Build - Complete Release/iOS/Framework.ipa", :DSYM_OUTPUT_PATH=>"/Users/Shared/Jenkins/Home/workspace/iOS Build - Complete Release/iOS/Framework.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/Shared/Jenkins/Library/Developer/Xcode/Archives/2016-10-14/Framework 2016-10-14 09.49.28.xcarchive"}
[09:54:29]: {"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                                                       | 12          |
| 5    | cert                                                          | 60          |
| 6    | sigh                                                          | 46          |
| 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                                                           | 99          |
| 💥    | deliver                                                       | 204         |
| 17   | echo "[RaiseError/]{"reference": "fastlane_deploy","errorData | 0           |
+------+---------------------------------------------------------------+-------------+

[09:54:29]: fastlane finished with errors

@ChrisVolentine
Copy link

I've been having the having this same issue the past 2 days. I forgot to save my output, but it's identical to @igorstimoli above. The ipa successfully uploads and then fastlane fails.

I also noticed that when I try to view the app in ITC I get a 500 error saying "We can't process your request." After about 30 minutes of waiting it finally stops throwing the error in ITC.

Attached the report.xml

report.txt

@cdunkel
Copy link

cdunkel commented Oct 14, 2016

I've been seeing the problem for about as long as @ChrisVolentine. It's nice to know that I'm not alone, haha.

Unlike some of the other people in this thread I'm only seeing the error in the produce phase of the lane, not deliver. I have yet to have a problem uploading the binary, but about every 15-45 minutes my deliver step fails with the same error listed above.

Just for reference, this is my output:

+----------------+---------------------------------------+
|               Summary for produce 1.2.1                |
+----------------+---------------------------------------+
| username       | xxxx@xxxx.com       |
| app_identifier | com.xxxx.xxxx |
| app_name       | xxxxxxx                 |
| language       | English                               |
| app_version    | 4.1.0                                 |
| sku            | xxxxxxxx                            |
| skip_itc       | false                                 |
| skip_devcenter | false                                 |
+----------------+---------------------------------------+

[10:24:47]: [DevCenter] App 'com.xxxx.xxxx' already exists, nothing to do on the Dev Center
[10:24:50]: Variable Dump:

<HUGE JSON DUMP HERE>

[10:24:50]: {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"}
Users/xxx/.rvm/gems/ruby-2.2.2/gems/spaceship-0.34.3/lib/spaceship/client.rb:453:in `parse_response': [!] {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Unexpected Error"], "info"=>nil}, "statusCode"=>"ERROR"} (Spaceship::Client::UnexpectedResponse)
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/spaceship-0.34.3/lib/spaceship/tunes/tunes_client.rb:201:in `applications'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/spaceship-0.34.3/lib/spaceship/tunes/application.rb:56:in `all'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/spaceship-0.34.3/lib/spaceship/tunes/application.rb:62:in `find'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/produce-1.2.1/lib/produce/itunes_connect.rb:59:in `fetch_application'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/produce-1.2.1/lib/produce/itunes_connect.rb:16:in `create_new_app'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/produce-1.2.1/lib/produce/itunes_connect.rb:12:in `run'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/produce-1.2.1/lib/produce/manager.rb:8:in `start_producing'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/actions/produce.rb:19:in `block in run'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/actions/produce.rb:17:in `chdir'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/actions/produce.rb:17:in `run'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:202:in `block (2 levels) in execute_action'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/actions/actions_helper.rb:35:in `execute_action'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:187:in `block in execute_action'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:186:in `chdir'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:186:in `execute_action'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:112:in `trigger_action_by_name'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/fast_file.rb:140:in `method_missing'
    from Fastfile:203:in `block (2 levels) in parsing_binding'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/lane.rb:33:in `call'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/lane.rb:33:in `call'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:165:in `try_switch_to_lane'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:120:in `trigger_action_by_name'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/fast_file.rb:140:in `method_missing'
    from Fastfile:304:in `block (3 levels) in parsing_binding'
    from Fastfile:302:in `each'
    from Fastfile:302:in `block (2 levels) in parsing_binding'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/lane.rb:33:in `call'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/lane.rb:33:in `call'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:49:in `block in execute'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:45:in `chdir'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/runner.rb:45:in `execute'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/command_line_handler.rb:30:in `handle'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/commands_generator.rb:49:in `block (2 levels) in run'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/commander-4.4.0/lib/commander/command.rb:153:in `run'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/commander-4.4.0/lib/commander/runner.rb:444:in `run_active_command'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane_core-0.52.1/lib/fastlane_core/ui/fastlane_runner.rb:36:in `run!'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/commander-4.4.0/lib/commander/delegates.rb:15:in `run!'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/commands_generator.rb:244:in `run'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/commands_generator.rb:20:in `start'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/lib/fastlane/cli_tools_distributor.rb:58:in `take_off'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/gems/fastlane-1.105.0/bin/fastlane:5:in `<top (required)>'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/bin/fastlane:23:in `load'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/bin/fastlane:23:in `<main>'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
    from /Users/xxx/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'

@zineer
Copy link
Contributor

zineer commented Oct 15, 2016

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

  • replace your email into line 56
  • change the submission properties on lines 73-87 to match your submission_information from your Deliverfile

Then you can chmod +x finishfailed.rb, and run it like ./finishfailed com.domain.app

It is based on https://github.com/fastlane/fastlane/blob/master/deliver/lib/deliver/submit_for_review.rb but for getting the app and edit_version it catches the exception caused by the 500 error and loops until the error goes away, then continues with the submission.

@nmonasterio
Copy link

nmonasterio commented Oct 17, 2016

Thanks for this, @zineer ! So, what you're saying is that, even with your existing submission_information payload (before this issue), you were able to just keep trying and trying and it would eventually work?

(We might be able to pull this in with a extra option to retry for x amount of times until it works, too...)

@zineer
Copy link
Contributor

zineer commented Oct 17, 2016

@nmonasterio Correct. I noticed that (at least in my case) after Deliver failed with "Unexpected Error", logging into iTunesConnect in my browser to view the new app would also throw errors, but within a minute or so I would be able to view the app. Then trying to view the version would throw another error, but it also went away within a couple minutes and I was able to see the build that was delivered was successfully uploaded and was processing. Once the build was finished processing, I was able to select it and submit the app for review. So the script I wrote above basically just handles that process which I was doing manually.

I use another custom build script which handles creating Cordova apps for me and calls Fastlane as part of that, so I just have it check the exit code from fastlane and run my script from above when a failure code is found.
My Fastfile doesn't do anything after Deliver, so I don't care about Fastlane exiting early. If you need your fastfile to complete after a failed Deliver, you could probably build my script into a plugin and do a begin/rescue around Deliver in your Fastfile.

@ohayon
Copy link
Contributor

ohayon commented Oct 17, 2016

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.

@igorstimoli
Copy link
Author

For the moment I applied this inelegant change to the SubmitForReview class in deliver/submit_for_review.rb

    def submit!(options)
      app = options[:app]
      ####### here starts the change #######
      # set a timer
      start = Time.now
      UI.message("Trying to select the build...")
      # start a loop to try multiple times
      loop do
        begin
          select_build(options)
          # if select_build doesn't return any error break and continue normally
          break
        rescue
          # if select_build fails output a message and retry after 60 secs 
          UI.message("")
          UI.message("Trying again...")
          if (Time.now - start) > (60 * 2)
            UI.message("#{((Time.now - start) / 60).round} minutes passed...")
          end
          # if still failing after 20 minutes will abort
          if (Time.now - start) > (60 * 20)
            UI.message("it's taking too long!")
            UI.message("Aborting.")
            raise "Error while trying to select the build in iTunesConnect."
          end
          sleep 60
        end
      end
      ####### here ends the change #######

      UI.message("Submitting the app for review...")
      submission = app.create_submission

      # Set app submission information
      # Default Values
      submission.content_rights_contains_third_party_content = false
      submission.content_rights_has_rights = true
      submission.add_id_info_uses_idfa = false

      # User Values
      if options[:submission_information]
        options[:submission_information].each do |key, value|
          UI.message("Setting '#{key}' to '#{value}'...")
          submission.send("#{key}=", value)
        end
      end

      # Finalize app submission
      submission.complete!

      UI.success("Successfully submitted the app for review!")
    end

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

@sunboshan
Copy link

sunboshan commented Oct 19, 2016

ITC returns 500 when uploading an icon and save.

The JSON for icon looks like this:

"largeAppIcon": {
        "value": {
            "assetToken": "Purple71/v4/cd/f9/f6/cdf9f60d-8c39-4c29-e5b4-c49a664714ad/pr_source.png",
            "sortOrder": null,
            "type": null,
            "size": 80012,
            "width": 1024,
            "height": 1024,
            "checksum": 1e120bf7347d0ddac785fd45c1da0e6d,
            "originalFileName": "icon.png"
        }
    }

Before Apple made change to ITC, we only need to change assetToken and originalFileName part, leave the rest nil. But after Apple made the change, it will cause 500 error.

The solution is simply provide assetToken, originalFileName, size, width, height and checksum in the JSON. It will work. Leave the fix for @KrauseFx

It should fix #6425 as well.

@nmonasterio
Copy link

nmonasterio commented Oct 20, 2016

@sunboshan Interesting. I did compare the payloads last week and didn't see anything different per se. I hadn't thought about newly required fields. Have you tested passing the extra parameters? If so, what did you base your checksum hash on (file name, arbitrary string, ...)? (The other three should be easy additions.)

It should be an easy PR, unless @KrauseFx wants to handle it directly.

Good find!

@cdunkel
Copy link

cdunkel commented Oct 20, 2016

I did speak to a member of Apple developer support, especially since I was getting 500 errors in the iTC web UI whenever I would try to view my apps immediately after a Fastlane failure. He did confirm that they have been speaking with other developers who were seeing a similar issue, so they were reasonably confident that it was a systemic issue on their end. It does seem to be intermittent, though, so it sounded like they're having trouble tracking it down.

If I hear more back from them I'll post it here.

@sunboshan
Copy link

@nmonasterio the checksum should 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:

{
  "token" : "Purple71/v4/4e/3c/f1/4e3cf119-13a0-65b3-f7f2-f7cb824cb0d8/pr_source.png",
  "tokenType" : "AssetToken",
  "type" : "MZLargeApplicationIconType.SOURCE",
  "width" : 1024,
  "height" : 1024,
  "hasAlpha" : false,
  "length" : 61037,
  "md5" : "d41d8ed98f00b204e9800998ecf8427e"
}

@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, height and checksum will fix the 500 error.

@GeospatialMax
Copy link

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.

@TKBurner
Copy link

Hi @GeovationMax Thanks for following up. I notified the core team that this issue is still present. 👍

@summera
Copy link
Contributor

summera commented Oct 20, 2016

I've also been seeing the same errors: 500s and "We can't process your request." pages for some of the apps we update/create.

I've been submitting for review manually to see if that helps. However, today I'm starting to see newly created apps take exceptionally long to appear on ITC. I've had the counter in Produce::ItunesConnect#create_new_app run out and throw Couldn't find newly created app on iTunes Connect - please check the website for more information. Anyone seeing the same?

@KrauseFx
Copy link
Member

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 #6652, which we'll merge and release as soon as possible 🚀

We'll update this GitHub issue once the new version is live ✨

asfalcone pushed a commit that referenced this issue Oct 21, 2016
* Fix upload of app icon for app and watch

Similar to #6423
Fixes #6425
Fixes #6455

* Update tests
@asfalcone
Copy link
Contributor

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. 👍

@asfalcone
Copy link
Contributor

deliver 1.14.3 has been released with the fix! 🚀

@meyskens
Copy link

Can confirm it works here.

Op 21 okt. 2016, om 20:13 heeft Andrea Falcone notifications@github.com het volgende geschreven:

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. 👍


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #6455 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ABjMuKGjPt8BTMiXZTkaL8ceUMFJbLInks5q2QDigaJpZM4KREpL.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests