fastlane: Issues with deliver, can't upload binary / IPA
New Issue Checklist
- [ X ] Updated fastlane to the latest version
- [ X ] I have read the Contribution Guidelines
Issue Description
Having issues uploading the app to iTunes with deliver. First everything worked using FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT=1
but for some developer accounts it doesn’t seem to work. Also tried it without adding the shell script, but also gives an error.
Adding it, asks for my credentials again… Both outputs are displayed below. Credentials are 100% correct, also used the same to login to the developer portal and to iTunes Connect.
Complete output when running fastlane, including the stack trace and command used
*Without FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT=1 *
17:25:24]: Making sure the latest version on iTunes Connect matches '7.1.0' from the ipa file...
[17:25:25]: '7.1.0' is the latest version on iTunes Connect
[17:25:28]: Uploading metadata to iTunes Connect
[17:25:29]: Successfully uploaded initial set of metadata to iTunes Connect
[17:25:30]: Starting with the upload of screenshots...
[17:25:30]: Successfully uploaded screenshots to iTunes Connect
[17:25:33]: Uploading binary to iTunes Connect
[17:25:33]: Going to upload updated app to iTunes Connect
[17:25:33]: This might take a few minutes. Please don't interrupt the script.
[17:25:35]: The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
[17:25:35]: We crashed.... Send me an e-mail!
[17:25:35]: Variable Dump:
[17:25:35]: {:PLATFORM_NAME=>:ios, :LANE_NAME=>"ios uploadNewApp", :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.", :VERSION_NUMBER=>"20160917", :PRODUCE_APPLE_ID=>"1062829454", :SIGH_PROFILE_PATH=>"/Users/xxx/Documents/iOS/fastlane/appstore.mobileprovision", :SIGH_PROFILE_PATHS=>["/Users/xxx/Documents/iOS/fastlane/appstore.mobileprovision"], :SIGH_UDID=>"23c4e5e0-faea-444e-b379-e80859207826", :SIGH_PROFILE_TYPE=>"app-store", :IPA_OUTPUT_PATH=>"/Users/xxx/Documents/iOS/xxx.ipa", :DSYM_OUTPUT_PATH=>"/Users/xxx/Documents/iOS/xxx.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/xxx/Library/Developer/Xcode/Archives/2016-09-16/xxx 2016-09-16 17.23.01.xcarchive"}
[17:25:35]: Could not upload binary to iTunes Connect. Check out the error above
+------+-----------------------------+-------------+
| fastlane summary |
+------+-----------------------------+-------------+
| Step | Action | Time (in s) |
+------+-----------------------------+-------------+
| 1 | download | 0 |
| 2 | reset_git_repo | 0 |
| 3 | git_pull | 3 |
| 4 | push_to_git_remote | 1 |
| 5 | cocoapods | 12 |
| 6 | set_info_plist_value | 0 |
| 7 | update_app_identifier | 0 |
| 8 | increment_build_number | 0 |
| 9 | increment_version_number | 0 |
| 10 | set_info_plist_value | 0 |
| 11 | update_app_identifier | 0 |
| 12 | produce | 6 |
| 13 | sigh | 10 |
| 14 | update_project_provisioning | 0 |
| 15 | gym | 133 |
| 16 | set_changelog | 7 |
| 17 | deliver | 13 |
+------+-----------------------------+-------------+
[17:25:35]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane...
➡️ [pilot] "Error receiving the newly uploaded binary" on the very first upload
https://github.com/fastlane/fastlane/issues/5125 [open] 38 💬
3 weeks ago
➡️ pilot crashes on upload
https://github.com/fastlane/fastlane/issues/4821 [open] 22 💬
3 weeks ago
➡️ Could not upload binary to iTunes Connect
https://github.com/fastlane/fastlane/issues/4339 [closed] 17 💬
11 May 2016
and 28 more at: https://github.com/fastlane/fastlane/search?q=Could%20not%20upload%20binary%20to%20iTunes%20Connect.%20Check%20out%20the%20error%20above&type=Issues&utf8=✓
[!] Could not upload binary to iTunes Connect. Check out the error above
*With FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT=1 *
[17:29:36]: ▸ Touching xxx.app.dSYM
[17:29:37]: ▸ Archive Succeeded
[17:29:37]: You're using Xcode 7, the `provisioning_profile_path` value will be ignored
[17:29:37]: Please follow the Code Signing Guide: https://codesigning.guide (for match) or https://github.com/fastlane/fastlane/tree/master/fastlane/docs/Codesigning
[17:29:37]: $ /usr/bin/xcrun /Users/xxx/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/gym-1.9.0/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/sb/dm_3d1vs6ll1h4qqk18yj6vw0000gq/T/gym_config20160916-92957-199dacp.plist' -archivePath /Users/xxx/Library/Developer/Xcode/Archives/2016-09-16/xxx\ 2016-09-16\ 17.27.55.xcarchive -exportPath '/var/folders/sb/dm_3d1vs6ll1h4qqk18yj6vw0000gq/T/gym_output20160916-92957-1nhjzut'
[17:29:54]: Compressing 1 dSYM(s)
[17:29:54]: $ cd '/Users/xxx/Library/Developer/Xcode/Archives/2016-09-16/xxx 2016-09-16 17.27.55.xcarchive/dSYMs' && zip -r '/Users/xxx/Documents/iOS/xxx.app.dSYM.zip' *.dSYM
[17:29:56]: ▸ adding: xxx.app.dSYM/ (stored 0%)
[17:29:56]: ▸ adding: xxx.app.dSYM/Contents/ (stored 0%)
[17:29:56]: ▸ adding: xxx.app.dSYM/Contents/Info.plist (deflated 51%)
[17:29:56]: ▸ adding: xxx.app.dSYM/Contents/Resources/ (stored 0%)
[17:29:56]: ▸ adding: xxx.app.dSYM/Contents/Resources/DWARF/ (stored 0%)
[17:29:56]: ▸ adding: xxx.app.dSYM/Contents/Resources/DWARF/xxx (deflated 72%)
[17:29:56]: Successfully exported and compressed dSYM file
[17:29:56]: Successfully exported and signed the ipa file:
[17:29:56]: /Users/xxx/Documents/iOS/xxx.ipa
[17:29:56]: ---------------------------
[17:29:56]: --- Step: set_changelog ---
[17:29:56]: ---------------------------
[17:29:57]: Going to update version 7.1.0
[17:29:57]: Going to update the changelog to:
We fixed a bug in iOS 10 where you were unable to use the buttons in our app.. Sorry!
[17:29:58]: Updating changelog for existing version 7.1.0
[17:29:58]: Uploading changes to iTunes Connect...
[17:29:59]: 👼 Successfully pushed the new changelog to https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/1062829454/ios/versioninfo/
[17:30:00]: ---------------------
[17:30:00]: --- Step: deliver ---
[17:30:00]: ---------------------
[17:30:00]: Login to iTunes Connect (appledeveloper@domain.com)
[17:30:04]: Login successful
+-------------------------------------------------------------+------------------------------------+
| deliver 1.13.3 Summary |
+-------------------------------------------------------------+------------------------------------+
| force | true |
| app_version | 7.1.0 |
| submit_for_review | true |
| username | appledeveloper@domain.com |
| automatic_release | true |
| app_review_information.first_name | Micha |
| app_review_information.last_name | van Eijk |
| app_review_information.phone_number | +31681123727 |
| app_review_information.email_address | micha@getxxx.com |
| app_review_information.demo_user | +31 (Netherlands) 99999 |
| app_review_information.demo_password | ******** |
| app_review_information.notes | Please check for Netherlands or... |
| submission_information.export_compliance_encryption_updated | false |
| submission_information.add_id_info_uses_idfa | false |
| ipa | /Users/xxx/Documents/iOS/Xx... |
| app_identifier | uk.application.xxx |
| screenshots_path | ./fastlane/screenshots |
| metadata_path | ./fastlane/metadata |
| skip_binary_upload | false |
| skip_screenshots | false |
| skip_metadata | false |
+-------------------------------------------------------------+------------------------------------+
[17:30:04]: Making sure the latest version on iTunes Connect matches '7.1.0' from the ipa file...
[17:30:05]: '7.1.0' is the latest version on iTunes Connect
[17:30:08]: Uploading metadata to iTunes Connect
[17:30:10]: Successfully uploaded initial set of metadata to iTunes Connect
[17:30:12]: Starting with the upload of screenshots...
[17:30:12]: Successfully uploaded screenshots to iTunes Connect
[17:30:14]: Uploading binary to iTunes Connect
[17:30:14]: Going to upload updated app to iTunes Connect
[17:30:14]: This might take a few minutes. Please don't interrupt the script.
[17:30:18]: [Transporter Error Output]: Your Apple ID or password was entered incorrectly. (-20101)
-------------------------------------------------------------------------------------
The login information you enter will be stored in your Mac OS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` env variable
More information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Username: appledeveloper@company.com
The login credentials for 'appledeveloper@comapny.com' seem to be wrong
Do you want to re-enter your password? (y/n)
y
Removing Keychain entry for user 'appledeveloper@company.com'...
keychain: "/Users/xxx/Library/Keychains/login.keychain"
version: 256
class: "inet"
attributes:
0x00000007 <blob>="deliver.appledeveloper@company.com"
0x00000008 <blob>=<NULL>
"acct"<blob>="appledeveloper@company.com"
"atyp"<blob>="dflt"
"cdat"<timedate>=0x32303135313132373132353132365A00 "20151127125126Z\000"
"crtr"<uint32>=<NULL>
"cusi"<sint32>=<NULL>
"desc"<blob>=<NULL>
"icmt"<blob>=<NULL>
"invi"<sint32>=<NULL>
"mdat"<timedate>=0x32303135313132373132353132365A00 "20151127125126Z\000"
"nega"<sint32>=<NULL>
"path"<blob>=<NULL>
"port"<uint32>=0x00000000
"prot"<blob>=<NULL>
"ptcl"<uint32>=0x00000000
"scrp"<sint32>=<NULL>
"sdmn"<blob>=<NULL>
"srvr"<blob>="deliver.appledeveloper@company.com"
"type"<uint32>=<NULL>
password has been deleted.
-------------------------------------------------------------------------------------
The login information you enter will be stored in your Mac OS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` env variable
More information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Password (for appledeveloper@company.com): **********
[17:31:35]: Please run this tool again to apply the new password
[17:31:35]: Transporter transfer failed.
[17:31:35]:
[17:31:35]: Your Apple ID or password was entered incorrectly. (-20101)
[17:31:35]: Your Apple ID or password was entered incorrectly. (-20101)
Return status of iTunes Transporter was 1: Your Apple ID or password was entered incorrectly. (-20101)
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
[17:31:35]: Password contains special characters, which may not be handled properly by iTMSTransporter. If you experience problems uploading to iTunes Connect, please consider changing your password to something with only alphanumeric characters.
[17:31:35]: Could not download/upload from iTunes Connect! It's probably related to your password or your internet connection.
[17:31:35]: We crashed.... Send me an e-mail!
[17:31:35]: Variable Dump:
[17:31:35]: {:PLATFORM_NAME=>:ios, :LANE_NAME=>"ios uploadNewApp", :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.", :VERSION_NUMBER=>"20160917", :PRODUCE_APPLE_ID=>"1062829454", :SIGH_PROFILE_PATH=>"/Users/xxx/Documents/iOS/fastlane/appstore.mobileprovision", :SIGH_PROFILE_PATHS=>["/Users/xxx/Documents/iOS/fastlane/appstore.mobileprovision"], :SIGH_UDID=>"23c4e5e0-faea-444e-b379-e80859207826", :SIGH_PROFILE_TYPE=>"app-store", :IPA_OUTPUT_PATH=>"/Users/xxx/Documents/iOS/xxx.ipa", :DSYM_OUTPUT_PATH=>"/Users/xxx/Documents/iOS/xxx.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/xxx/Library/Developer/Xcode/Archives/2016-09-16/xxx 2016-09-16 17.27.55.xcarchive"}
[17:31:35]: Could not upload binary to iTunes Connect. Check out the error above
+------+-----------------------------+-------------+
| fastlane summary |
+------+-----------------------------+-------------+
| Step | Action | Time (in s) |
+------+-----------------------------+-------------+
| 1 | download | 0 |
| 2 | reset_git_repo | 0 |
| 3 | git_pull | 2 |
| 4 | push_to_git_remote | 1 |
| 5 | cocoapods | 12 |
| 6 | set_info_plist_value | 0 |
| 7 | update_app_identifier | 0 |
| 8 | increment_build_number | 0 |
| 9 | increment_version_number | 0 |
| 10 | set_info_plist_value | 0 |
| 11 | update_app_identifier | 0 |
| 12 | produce | 7 |
| 13 | sigh | 10 |
| 14 | update_project_provisioning | 0 |
| 15 | gym | 123 |
| 16 | set_changelog | 3 |
| 17 | deliver | 94 |
+------+-----------------------------+-------------+
[17:31:35]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane...
➡️ [pilot] "Error receiving the newly uploaded binary" on the very first upload
https://github.com/fastlane/fastlane/issues/5125 [open] 38 💬
3 weeks ago
➡️ pilot crashes on upload
https://github.com/fastlane/fastlane/issues/4821 [open] 22 💬
3 weeks ago
➡️ Could not upload binary to iTunes Connect
https://github.com/fastlane/fastlane/issues/4339 [closed] 17 💬
11 May 2016
and 28 more at: https://github.com/fastlane/fastlane/search?q=Could%20not%20upload%20binary%20to%20iTunes%20Connect.%20Check%20out%20the%20error%20above&type=Issues&utf8=✓
[!] Could not upload binary to iTunes Connect. Check out the error above
Configuration Files
Please copy the complete content of your Fastfile
and any other configuration files you use below:
Fastfile:
require 'open-uri'
require 'digest'
require 'pathname'
require 'git'
require 'rest-client'
require 'slack-notifier'
require 'tinify'
# Define the API url
$apiUrl = 'http://server.local:222/api/'
# Ask for the identifier, has to match the one from the portal.
#
# Set the slack URL to send messages to
ENV["SLACK_URL"] ||= "https://hooks.slack.com/services/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"
if !ENV["DROPBOX_FOLDER"] || ENV["DROPBOX_FOLDER"] == ''
raise 'Missing dropbox folder!'
end
platform :ios do
desc "Development function to clear the entire project, you don't have to use it in normale cases.."
lane :clear do
reset_git_repo(
force: true
)
git_pull
end
desc "Update app version to app store"
lane :uploadNewApp do |options|
appidentifier = $appJson["identifier"]
set_info_plist_value(path: './Company-Info.plist', key: 'CFBundleIdentifier', value: "$(PRODUCT_BUNDLE_IDENTIFIER)")
update_app_identifier(
xcodeproj: 'Company.xcodeproj', # Optional path to xcodeproj, will use the first .xcodeproj if not set
plist_path: 'Company-Info.plist', # Path to info plist file, relative to xcodeproj
app_identifier: appidentifier # The App Identifier
)
produce(
username: $appJson["apple_id_user"],
app_identifier: appidentifier,
app_name: "#{$appJson["name"]} Store",
app_version: $appJson["version_no"]
)
sigh(
username: $appJson["apple_id_user"],
output_path: "./fastlane/",
app_identifier: appidentifier,
filename: "appstore.mobileprovision"
)
update_project_provisioning(
xcodeproj: "./Company.xcodeproj/",
profile: "./fastlane/appstore.mobileprovision"
)
gym(scheme: "Company")
set_changelog(changelog: "Changelog", version: $appJson['version_no'], username: $appJson['apple_id_user'], app_identifier: appidentifier)
download_screenshots($appJson['identifier'], './screenshots/')
deliver(
force: true,
app_version: $appJson['version_no'],
submit_for_review: true,
username: $appJson["apple_id_user"],
automatic_release: true
)
slack(
channel: "@michavaneijk",
message: "Uploaded new version of #{$appJson['name']} to the App Store",
success: true,
payload: {
'Version' => $appJson['version_no'],
'Build number' => $build_number
},
default_payloads: []
)
end
# After no errors!
after_all do |lane|
# Success!
end
# Error!
error do |lane, exception|
puts "We crashed.... Send me an e-mail!"
# Do something! Say it on slack!
end
end
Environment
fastlane version (run fastlane -v
): fastlane 1.103.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
)? rvm
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 38 (17 by maintainers)
it worked for me too. thank you, @hjanuschka
usually this is a perma fix - apple uses some weird own transfer protocol - from aspera which has troubles behind most common firewalls 😃 “-t DAV” fallsback protocol to a more standardized one.
can you close issue?
@belakva can you try adding this on top of your fastfile?
ENV['DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS'] = '-t DAV'
or if you use deliver directly from commandline
DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS="-t DAV" deliver ....
looks like another aspera problem
@larsacus yes, that’s a good breakdown of what’s going on.
Hi all, I’ll try to provide a little context and history for what’s probably going on here 😄
In the past, we have had problems with the
iTMSTransporter
shell script provided by Xcode. Its job is to take the input parameters and form a call to the underlying Java application that handles all the actual uploading. However, we discovered that inputs like passwords with quotes, ampersands, etc. were handled badly and often resulted in incorrect commands being generated.We struggled for a while to try to find a way to work around these quirks, but in the end, the best way to do that was to avoid calling the
iTMSTransporter
shell script at all. We initially shipped support for a direct Java invocation of the iTMSTransporter as an opt-in ENV variable. Once we proved it to be stable, we reversed the defaults and left an ENV variable feature switch in place (FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT
) to revert to using the shell script directly, just in case.So, if this has started failing with Xcode 8, but using
FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT
makes it succeed, the likely explanation is that Apple changed the Java iTMSTransporter CLI command inputs, which we’ll need to match. We should also then re-evaluate whether the currentiTMSTransporter
shell script still has problems with complex passwords. The original report on this ticket makes me believe that it does, since applyingFASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT
results in a complaint about a bad password for @mcactive.I think I’m the right person to work on a fix here, but just to set expectations, I’m about to be traveling for a conference for the remainder of this week. If anyone is motivated to try to work on a fix, I’m happy to review it. Otherwise, I’ll do my best to investigate and fix ASAP 👍
@larsacus @kcharwood @Absoludacris06 did you each try the
FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT=1
? Seemingly Xcode 8 upgrade make this required for me.It seems to resolve my issue. Still odd to see the different behaviors with fundamentally identical executions.
The transporter command generated in all three use cases is identical:
fastlane
execution w/gym
&pilot
actions (iTMSTransporter exits immediately with no message)fastlane
execution with ONLYpilot
action (Upload works)pilot
command-line execution (Upload works)Manually running the generated ITMSTransporter command throws a NP Exception in all cases so it is hard to tell why there is a difference in the gym case:
java.lang.NullPointerException at java.util.Arrays$ArrayList.<init>(Arrays.java:2842) at java.util.Arrays.asList(Arrays.java:2828) at com.apple.transporter.Application.filesUnderRootPaths(Application.java:222) at com.apple.transporter.Application.urlsNeededByOSGiBootstrapper(Application.java:186) at com.apple.transporter.Application.start(Application.java:118) at com.apple.transporter.Application.main(Application.java:357)
OK, cool - thanks for the info, everyone 👍
I’m still on El Cap at the moment (work restriction), so I’m glad I can aim to reproduce on that.
@jaleksynas using that env var works for us. they are not technically identical executions, as the
FASTLANE_ITUNES_TRANSPORTER_USE_SHELL_SCRIPT=1
version executes:which calls the binary directly, whereas without it, the executed command is executes it through a java warpper of some kind: