fastlane: [Deliver] - Not able to reject the app version which is in Pending Developer Release

New Issue Checklist

Issue Description

When one version is in Pending Developer release and If set the flag reject_if_possible with true, the existing version is not rejected. There was error occurred before the reject method is called. It failed in the verify version method.

Command executed

fastlane upload_to_appstore keychain_pass:****** build_provided:true --verbose

Complete output when running fastlane, including the stack trace and command used
 
+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
|                                                                                            deliver 2.160.0 Summary                                                                                            |
+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| username                                                                   | ********                                                                                                        |
| app_identifier                                                             | ********                                                                                                |
| app_version                                                                | 3.12.0                                                                                                                           |
| build_number                                                               | 12                                                                                                                               |
| platform                                                                   | ios                                                                                                                              |
| edit_live                                                                  | false                                                                                                                            |
| use_live_version                                                           | false                                                                                                                            |
| metadata_path                                                              | /fastlane/metadata/appstore |
| screenshots_path                                                           | ./screenshots                                                                                                                    |
| skip_binary_upload                                                         | true                                                                                                                             |
| skip_screenshots                                                           | true                                                                                                                             |
| skip_metadata                                                              | false                                                                                                                            |
| skip_app_version_update                                                    | false                                                                                                                            |
| force                                                                      | true                                                                                                                             |
| overwrite_screenshots                                                      | false                                                                                                                            |
| submit_for_review                                                          | true                                                                                                                             |
| reject_if_possible                                                         | false                                                                                                                            |
| automatic_release                                                          | false                                                                                                                            |
| auto_release_date                                                          | 1609322400000                                                                                                                    |
| phased_release                                                             | false                                                                                                                            |
| reset_ratings                                                              | false                                                                                                                            |
| submission_information.add_id_info_limits_tracking                         | false                                                                                                                            |
| submission_information.add_id_info_serves_ads                              | false                                                                                                                            |
| submission_information.add_id_info_tracks_action                           | false                                                                                                                            |
| submission_information.add_id_info_tracks_install                          | false                                                                                                                            |
| submission_information.add_id_info_uses_idfa                               | false                                                                                                                            |
| submission_information.content_rights_has_rights                           | false                                                                                                                            |
| submission_information.content_rights_contains_third_party_content         | false                                                                                                                            |
| submission_information.export_compliance_platform                          | false                                                                                                                            |
| submission_information.export_compliance_compliance_required               | false                                                                                                                            |
| submission_information.export_compliance_encryption_updated                | false                                                                                                                            |
| submission_information.export_compliance_app_type                          | false                                                                                                                            |
| submission_information.export_compliance_uses_encryption                   | false                                                                                                                            |
| submission_information.export_compliance_is_exempt                         | false                                                                                                                            |
| submission_information.export_compliance_contains_third_party_cryptography | false                                                                                                                            |
| submission_information.export_compliance_contains_proprietary_cryptography | false                                                                                                                            |
| submission_information.export_compliance_available_on_french_store         | false                                                                                                                            |
| run_precheck_before_submit                                                 | true                                                                                                                             |
| precheck_default_rule_level                                                | warn                                                                                                                             |
| ignore_language_directory_validation                                       | false                                                                                                                            |
| precheck_include_in_app_purchases                                          | true                                                                                                                             |
+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+

INFO [2020-10-31 18:04:16.76]: Making sure the latest version on App Store Connect matches ‘3.12.0’… Exception is… The provided entity includes a relationship with an invalid value - You cannot create a new version of the App in the current state.

Environment

[15:39:59]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[15:40:02]: Generating fastlane environment output, this might take a few seconds...
🚫 fastlane environment 🚫

Stack

Key Value
OS 10.15.6
Ruby 2.7.0
Bundler? false
Git git version 2.24.3 (Apple Git-128)
Installation Source ~/.rvm/rubies/ruby-2.7.0/bin/fastlane
Host Mac OS X 10.15.6 (19G2021)
Ruby Lib Dir ~/.rvm/rubies/ruby-2.7.0/lib
OpenSSL Version OpenSSL 1.1.1g 21 Apr 2020
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode12.app/Contents/Developer/
Xcode Version 12.0

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.160.0 🚫 Update available

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.4.0
executable-hooks 1.6.0
bundler-unload 1.0.2
rubygems-bundler 1.4.5
slack-notifier 2.3.2
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
plist 3.5.0
CFPropertyList 3.0.2
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
faraday_middleware 1.0.0
fastimage 2.2.0
gh_inspector 1.1.3
mini_magick 4.10.1
rubyzip 2.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.0
dotenv 2.7.6
bundler 2.1.2
naturally 2.2.0
simctl 1.6.8
uber 0.1.0
declarative 0.0.20
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
mini_mime 1.0.2
multi_json 1.15.0
signet 0.14.0
httpclient 2.8.3
google-api-client 0.38.0
uri 0.10.0
nanaimo 0.3.0
colored2 3.1.2
claide 1.0.3
atomos 0.1.3
xcodeproj 1.19.0
public_suffix 4.0.6
babosa 1.0.4
excon 0.78.0
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
ruby2_keywords 0.0.2
faraday 1.1.0
faraday-cookie_jar 0.0.7
json 2.3.1
jwt 2.2.2
os 1.1.1
memoist 0.16.2
googleauth 0.14.0
rake 13.0.1
digest-crc 0.6.1
google-cloud-errors 1.0.1
google-cloud-env 1.4.0
google-cloud-core 1.5.0
google-cloud-storage 1.29.1
emoji_regex 3.2.0
aws-eventstream 1.1.0
aws-sigv4 1.2.2
aws-partitions 1.388.0
jmespath 1.4.0
aws-sdk-core 3.109.1
aws-sdk-kms 1.39.0
aws-sdk-s3 1.83.1
forwardable 1.3.1
logger 1.4.2
cgi 0.1.0
timeout 0.1.0
stringio 0.1.0
ipaddr 1.2.2
openssl 2.1.2
ostruct 0.2.0
strscan 1.0.3
date 3.0.0
delegate 0.1.0
fileutils 1.4.1
io-console 0.5.3
zlib 1.1.0
singleton 0.1.0
rexml 3.2.3
open3 0.1.0
yaml 0.1.0
psych 3.1.0
mutex_m 0.1.0
webrick 1.6.0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 41 (10 by maintainers)

Most upvoted comments

FYI this is how I reject apps that are pending release:

    Spaceship::ConnectAPI.login(
      use_portal: false,
      tunes_team_id: teamID,
    )

    app = Spaceship::ConnectAPI::App.find(bundleID)
    if app.nil?
      UI.important "not found in team #{teamID} on ASC!"
      next
    end

    if !app.reject_version_if_possible!(platform: Spaceship::ConnectAPI::Platform::IOS)
      UI.important "couldn't reject!"
      next
    end
    UI.success "rejected"

So have you tested if this is the solution? “reject_if_possible before verify_version”

I had a pending release and it failed me even with reject_if_possible, I now connect through App Store Connect Api

@joshdholtz Can you please check this issue?

I also got the error:

The provided entity includes a relationship with an invalid value - You cannot create a new version of the App in the current state.

and the only way was to manually cancel the pending reviewed release from the Apple UI. A bit annoying but that’s fine 👍 hope a fix will be done so the reject_if_possible can work.

Thanks!

@stherold see my solution above.

If you want to do it with a single command, I guess you’d have to make a PR for that.

@Thangaraj-M Please don’t @ contributors, this is just rude. Could you please update to the latest fastlane version first?