Upload to iTunes with deliver fails

There seems to be a problem using deliver to upload an IPA to the app store.

+------------------------------------------------------------------------------+

| (7) deploy-to-itunesconnect-deliver@2.13.0                                   |
+------------------------------------------------------------------------------+
| id: deploy-to-itunesconnect-deliver                                          |
| version: 2.13.0                                                              |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2018-03-06T13:55:22-08:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[13:55:22]  * [OK] Step dependency (go) installed, available. 
Configs:
- IpaPath: /Users/vagrant/deploy/*****Release.ipa
- PkgPath: 
- ItunesconUser: *****
- Password: ***
- AppPassword: ***
- AppID: *****
- BundleID: *****
- SubmitForReview: no
- SkipMetadata: yes
- SkipScreenshots: yes
- TeamID: 
- TeamName: 
- Platform: ios
- Options: 
- GemfilePath: ./Gemfile
- FastlaneVersion: latest
Setup
fastlane version defined: latest, installing...
$ fastlane "-v"
fastlane installation at path:
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.84.0/bin/fastlane
-----------------------------
fastlane 2.84.0
Setup took 5.323911 seconds to complete
Deploy
**Note:** if your password
contains special characters
and you experience problems, please
consider changing your password
to something with only
alphanumeric characters.
**Be advised** log.Printf(that this
step uses a well maintained, open source tool which
uses *undocumented and unsupported APIs* (because the current
iTunes Connect platform does not have a documented and supported API)
to perform the deployment.
This means that when the API changes
**this step might fail until the tool is updated**.
AppID parameter specified, BundleID will be ignored
$ fastlane "deliver" "--username" "*****" "--app" "*****" "--ipa" "/Users/vagrant/deploy/*****_Release.ipa" "--skip_screenshots" "--skip_metadata" "--force" "--platform" "ios"
[13:55:31]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[13:55:32]: Successfully loaded '/Users/vagrant/git/fastlane/Deliverfile' šŸ“„
+-------------------+---------------------------+
| Detected Values from './fastlane/Deliverfile' |
+-------------------+---------------------------+
| app_identifier    | *****       |
| username          | ***** |
+-------------------+---------------------------+
[13:55:32]: Login to iTunes Connect (******)
[13:55:34]: Login successful
+--------------------------------------+------------------------------------------------+
|                                deliver 2.84.0 Summary                                 |
+--------------------------------------+------------------------------------------------+
| username                             | *****                      |
| ipa                                  | /Users/vagrant/deploy/*****_Release.ipa |
| skip_screenshots                     | true                                           |
| skip_metadata                        | true                                           |
| force                                | true                                           |
| platform                             | ios                                            |
| screenshots_path                     | ./fastlane/screenshots                         |
| metadata_path                        | ./fastlane/metadata                            |
| app_version                          | 7.0.4                                          |
| app_identifier                       | *****                            |
| edit_live                            | false                                          |
| skip_binary_upload                   | false                                          |
| use_live_version                     | false                                          |
| skip_app_version_update              | false                                          |
| submit_for_review                    | false                                          |
| automatic_release                    | false                                          |
| phased_release                       | false                                          |
| team_id                              | *****                                         |
| dev_portal_team_id                   | *****                                     |
| overwrite_screenshots                | false                                          |
| run_precheck_before_submit           | true                                           |
| precheck_default_rule_level          | warn                                           |
| ignore_language_directory_validation | false                                          |
| precheck_include_in_app_purchases    | true                                           |
+--------------------------------------+------------------------------------------------+
[13:55:35]: Making sure the latest version on iTunes Connect matches '7.0.4' from the ipa file...
[13:55:37]: Sending crash report...
[13:55:37]: The stack trace is sanitized so no personal information is sent.
[13:55:37]: To see what we are sending, look here: /Users/vagrant/.fastlane/latest_crash.json
[13:55:37]: Learn more at https://docs.fastlane.tools/actions/opt_out_crash_reporting/
[13:55:37]: You can disable crash reporting by adding `opt_out_crash_reporting` at the top of your Fastfile
Looking for related GitHub issues on fastlane/fastlane...

Looking for related GitHub issues on fastlane/fastlane...
āž”ļø  iTunes account blocked/corrupted by fastlane sigh download
    https://github.com/fastlane/fastlane/issues/10793 [open] 75 šŸ’¬
    5 weeks ago
āž”ļø  Snapshot support for macOS projects
    https://github.com/fastlane/fastlane/issues/11092 [open] 28 šŸ’¬
    5 weeks ago
āž”ļø  Fastlane Deliver Screenshot Error
    https://github.com/fastlane/fastlane/issues/9768 [closed] 19 šŸ’¬
    22 hours ago
and 11 more at: https://github.com/fastlane/fastlane/search?q=The%20request%20could%20not%20be%20completed%20because%3A%0A%09The%20version%20number%20has%20been%20previously%20used.&type=Issues&utf8=āœ“
šŸ”—  You can āŒ˜ + double-click on links to open them directly in your browser.
[!] The request could not be completed because:
	The version number has been previously used.
Deploy failed, error: exit status 1

Doh! The 2nd last line actually says what the issue is. Need to update the build number.

1 Like

Thanks for reporting @ronan.o.ciosoig, both the issue and the solution - Iā€™m sure this will help others in the future! :wink: