fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
38.85k stars 5.64k forks source link

new app version on ASC isn't created before updating languages when skip_app_version_update is false #18571

Open kambala-decapitator opened 3 years ago

kambala-decapitator commented 3 years ago

New Issue Checklist

Issue Description

New app version isn't created on ASC before trying to "update languages" which results in fastlane error.

I've tried with ASC API Key and username, result was the same.

Expected behavior: when skip_app_version_update == false, the version should be created if it doesn't exist, and languages should be updated afterwards.

After checking https://github.com/fastlane/fastlane/blob/3870627a2e674c8efd9532e5acc0d1d307c6cf8e/deliver/lib/deliver/runner.rb#L52 I discovered that passing app_version fixes/workarounds the issue. Still, I expected that the version will be picked from the latest uploaded build since I pass nil.

Note: I'm on 2.180, didn't update to 2.180.1 because it doesn't add any value to me (not using Ruby 3.2).

Command executed

bundle exec fastlane asc

Complete output when running fastlane, including the stack trace and command used
[11:03:52]: ------------------------------
[11:03:52]: --- Step: default_platform ---
[11:03:52]: ------------------------------
[11:03:52]: Driving the lane 'asc' 🚀
[11:03:52]: --------------------------------
[11:03:52]: --- Step: ensure_bundle_exec ---
[11:03:52]: --------------------------------
[11:03:52]: Using bundled fastlane ✅
[11:03:52]: -----------------------
[11:03:52]: --- Step: xcversion ---
[11:03:52]: -----------------------
[11:03:53]: Setting Xcode version to /Applications/Xcode.app for all build steps
[11:03:53]: ---------------------------------------
[11:03:53]: --- Step: app_store_connect_api_key ---
[11:03:53]: ---------------------------------------
[11:03:53]: ----------------------
[11:03:53]: --- Step: appstore ---
[11:03:53]: ----------------------
[11:03:53]: Creating authorization token for App Store Connect API

+----------------------------------------------+--------------------------+
|                         deliver 2.180.0 Summary                         |
+----------------------------------------------+--------------------------+
| skip_binary_upload                           | true                     |
| skip_screenshots                             | true                     |
| force                                        | true                     |
| submit_for_review                            | true                     |
| reject_if_possible                           | true                     |
| automatic_release                            | false                    |
| submission_information.add_id_info_uses_idfa | false                    |
| precheck_include_in_app_purchases            | false                    |
| api_key                                      | ********                 |
| screenshots_path                             | ./fastlane/screenshots   |
| metadata_path                                | ./fastlane/metadata      |
| app_identifier                               | it.joethefox.XBMC-Remote |
| platform                                     | ios                      |
| edit_live                                    | false                    |
| use_live_version                             | false                    |
| skip_metadata                                | false                    |
| skip_app_version_update                      | false                    |
| overwrite_screenshots                        | false                    |
| phased_release                               | false                    |
| reset_ratings                                | false                    |
| team_id                                      | 118954744                |
| dev_portal_team_id                           | QR7RHK8K4X               |
| run_precheck_before_submit                   | true                     |
| precheck_default_rule_level                  | warn                     |
| ignore_language_directory_validation         | false                    |
+----------------------------------------------+--------------------------+

[11:03:58]: Loading './fastlane/metadata/en-US/description.txt'...
[11:03:58]: Loading './fastlane/metadata/en-US/keywords.txt'...
[11:03:58]: Loading './fastlane/metadata/en-US/release_notes.txt'...
[11:03:58]: Loading './fastlane/metadata/en-US/support_url.txt'...
[11:03:58]: Loading './fastlane/metadata/en-US/marketing_url.txt'...
[11:03:58]: Loading './fastlane/metadata/en-US/promotional_text.txt'...
[11:03:58]: Loading './fastlane/metadata/en-US/name.txt'...
[11:03:58]: Loading './fastlane/metadata/en-US/subtitle.txt'...
[11:03:58]: Loading './fastlane/metadata/en-US/privacy_url.txt'...
[11:03:59]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 4)
[11:04:10]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 3)
[11:04:20]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 2)
[11:04:31]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 1)
[11:04:42]: Cannot find edit app store version... Retrying after 10 seconds (remaining: 0)
[11:04:52]: -----------------------------------
[11:04:52]: --- Step: clean_build_artifacts ---
[11:04:52]: -----------------------------------
[11:04:52]: Cleaned up build artifacts 🐙
+---------------------------+-----+
|          Lane Context           |
+---------------------------+-----+
| DEFAULT_PLATFORM          | ios |
| PLATFORM_NAME             |     |
| LANE_NAME                 | asc |
| SIGH_PROFILE_PATHS        |     |
| DSYM_PATHS                |     |
| DSYM_LATEST_UPLOADED_DATE |     |
+---------------------------+-----+
[11:04:52]: Cannot update languages - could not find an editable version for 'IOS'

+------+---------------------------+-------------+
|                fastlane summary                |
+------+---------------------------+-------------+
| Step | Action                    | Time (in s) |
+------+---------------------------+-------------+
| 1    | default_platform          | 0           |
| 2    | ensure_bundle_exec        | 0           |
| 3    | xcversion                 | 0           |
| 4    | app_store_connect_api_key | 0           |
| 💥   | appstore                  | 58          |
| 6    | clean_build_artifacts     | 0           |
+------+---------------------------+-------------+

[11:04:52]: fastlane finished with errors

[!] Cannot update languages - could not find an editable version for 'IOS' 

Environment

 
🚫 fastlane environment 🚫 ### Stack | Key | Value | | --------------------------- | -------------------------------------------------------------- | | OS | 10.15.7 | | Ruby | 2.6.3 | | Bundler? | true | | Git | git version 2.24.3 (Apple Git-128) | | Installation Source | ~/.bundler_gems/ruby/2.6.0/bin/fastlane | | Host | Mac OS X 10.15.7 (19H524) | | Ruby Lib Dir | /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib | | OpenSSL Version | LibreSSL 2.8.3 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Library/Developer/CommandLineTools/ | | Xcode Version | | ### System Locale | Variable | Value | | | -------- | ----------- | - | | LANG | en_US.UTF-8 | ✅ | | LC_ALL | en_US.UTF-8 | ✅ | | LANGUAGE | | | ### fastlane files: You can also find them here: https://github.com/xbmc/Official-Kodi-Remote-iOS/tree/0c9cfb6fa9d1b2844af9b7cf8aeb489fcddf8be6/fastlane
`./fastlane/Fastfile` ```ruby default_platform(:ios) before_all do ensure_bundle_exec # ensure_git_status_clean skip_docs xcversion(version: "~> 12.4") app_store_connect_api_key( key_id: "AX6GU8LT6K", issuer_id: "69a6de97-a91c-47e3-e053-5b8c7c11a4d1", key_filepath: "AuthKey_AX6GU8LT6K.p8", in_house: false, ) end after_all do clean_build_artifacts end error do clean_build_artifacts end desc 'Build & upload to Testflight' lane :tf do gym( scheme: 'Kodi Remote', clean: true, output_directory: 'build', include_symbols: true, include_bitcode: true, export_method: 'app-store', xcargs: "CURRENT_PROJECT_VERSION=#{number_of_commits}", ) # ignore commit messages that contain '[not app]' changelogLines = [] lastTag = last_git_tag changelog_from_git_commits( between: [lastTag, 'HEAD'], pretty: '- %b (%s)', merge_commit_filtering: 'only_include_merges', ).each_line(chomp: true) { |l| changelogLines << l unless l.include?('[not app]') } Actions.lane_context[SharedValues::FL_CHANGELOG] = changelogLines.join("\n") testflight( distribute_external: true, groups: ['external testers'], ) # create prerelease on Github next unless ENV['GITHUB_API_TOKEN'] appProperties = get_info_plist_value( key: 'ApplicationProperties', path: "#{lane_context[SharedValues::XCODEBUILD_ARCHIVE]}/Info.plist", ) betaSuffix = '-b' if (betaIndex = lastTag.rindex(betaSuffix)) afterBetaIndex = betaIndex + betaSuffix.length lastBetaNumber = lastTag[afterBetaIndex, 3] # max number = 999 newTag = lastTag[0, afterBetaIndex] + "#{lastBetaNumber.to_i + 1}" else newTag = appPropertiesHash['CFBundleShortVersionString'] + betaSuffix + '1' end ghRelease = set_github_release( repository_name: 'xbmc/Official-Kodi-Remote-iOS', tag_name: newTag, name: "Testflight #{appProperties['CFBundleVersion']}", is_prerelease: true, ) UI.message JSON.pretty_generate(ghRelease) system 'git fetch --tags' end desc 'Submit to AppStore review' lane :asc do |options| appstore( app_version: options[:app_version], build_number: options[:build_number], skip_binary_upload: true, skip_screenshots: true, force: true, submit_for_review: true, reject_if_possible: true, automatic_release: false, submission_information: { add_id_info_uses_idfa: false, }, precheck_include_in_app_purchases: false, ) end ```
`./fastlane/Appfile` ```ruby app_identifier("it.joethefox.XBMC-Remote") # The bundle identifier of your app itc_team_id("118954744") # App Store Connect Team ID team_id("QR7RHK8K4X") # Developer Portal Team ID ```
### fastlane gems | Gem | Version | Update-Status | | -------- | ------- | ------------------ | | fastlane | 2.180.0 | 🚫 Update available | ### Loaded fastlane plugins: **No plugins Loaded**
Loaded gems | Gem | Version | | ----------------------------- | ------------ | | did_you_mean | 1.3.0 | | bundler | 2.1.4 | | rake | 13.0.3 | | CFPropertyList | 3.0.3 | | public_suffix | 4.0.6 | | addressable | 2.7.0 | | artifactory | 3.0.15 | | atomos | 0.1.3 | | aws-eventstream | 1.1.1 | | aws-partitions | 1.442.0 | | aws-sigv4 | 1.2.3 | | jmespath | 1.4.0 | | aws-sdk-core | 3.113.1 | | aws-sdk-kms | 1.43.0 | | aws-sdk-s3 | 1.93.0 | | babosa | 1.0.4 | | claide | 1.0.3 | | colored | 1.2 | | colored2 | 3.1.2 | | highline | 1.7.10 | | commander-fastlane | 4.4.6 | | declarative | 0.0.20 | | declarative-option | 0.1.0 | | digest-crc | 0.6.3 | | unf_ext | 0.0.7.7 | | unf | 0.1.4 | | domain_name | 0.5.20190701 | | dotenv | 2.7.6 | | emoji_regex | 3.2.2 | | excon | 0.79.0 | | faraday-net_http | 1.0.1 | | multipart-post | 2.0.0 | | ruby2_keywords | 0.0.4 | | faraday | 1.3.0 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.7 | | faraday_middleware | 1.0.0 | | fastimage | 2.2.3 | | gh_inspector | 1.1.3 | | jwt | 2.2.2 | | memoist | 0.16.2 | | multi_json | 1.15.0 | | os | 1.1.1 | | signet | 0.15.0 | | googleauth | 0.16.1 | | httpclient | 2.8.3 | | mini_mime | 1.1.0 | | uber | 0.1.0 | | representable | 3.0.4 | | retriable | 3.1.2 | | google-api-client | 0.38.0 | | rexml | 3.2.5 | | webrick | 1.7.0 | | google-apis-core | 0.3.0 | | google-apis-iamcredentials_v1 | 0.3.0 | | google-apis-storage_v1 | 0.3.0 | | google-cloud-env | 1.5.0 | | google-cloud-errors | 1.1.0 | | google-cloud-core | 1.6.0 | | google-cloud-storage | 1.31.0 | | json | 2.5.1 | | mini_magick | 4.11.0 | | naturally | 2.2.1 | | plist | 3.6.0 | | rubyzip | 2.3.0 | | security | 0.1.3 | | simctl | 1.6.8 | | slack-notifier | 2.3.2 | | terminal-notifier | 2.0.0 | | unicode-display_width | 1.7.0 | | terminal-table | 1.8.0 | | tty-screen | 0.8.1 | | tty-cursor | 0.7.1 | | tty-spinner | 0.9.3 | | word_wrap | 1.0.0 | | nanaimo | 0.3.0 | | xcodeproj | 1.19.0 | | rouge | 2.0.7 | | xcpretty | 0.3.0 | | xcpretty-travis-formatter | 1.0.1 | | xcode-install | 2.6.8 |
*generated on:* **2021-04-18**
rogerluan commented 3 years ago

I hear your pain point and I would argue that once I also thought that I shouldn't need to pass the version explicitly as well, but

I expected that the version will be picked from the latest uploaded build

this might not be the case for everyone (or in all scenarios), and it's a very obscure and implicit way to make project assumptions. I'll give an example:

The company's release train releases a weekly build to TestFlight automatically, and every 2 weeks they release a new build to the public. If the user omits the app version, the latest (most recently uploaded) binary will be used o assume the app version but that might not be always the case.

IMO it's safer to continue to require the user to tell which app version fastlane should create on behalf of the user, OR have the user offer an editable version of the app on App Store Connect first (which's the error message you're getting).

So, my conclusion is: given how the code is structured, it looks like this was a conscious architecture & product decision rather than an oversight/bug. But I could be wrong, maybe @joshdholtz could shed some light here 🙏

kambala-decapitator commented 3 years ago

@rogerluan yes, it's definitely not for everyone, but for simple cases when you upload only a single version it'd really help IMO.

fastlane-bot commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 3 years ago

Bump

whalemare commented 3 years ago

Bump

fastlane-bot commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 2 years ago

bump

fastlane-bot commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 2 years ago

bump

fastlane-bot commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 2 years ago

bump

fastlane-bot commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 2 years ago

Bump

fastlane-bot commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 2 years ago

Bump

whalemare commented 2 years ago

lmao it just fully ignored

fastlane-bot commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 1 year ago

bump

fastlane-bot commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 1 year ago

bump

fastlane-bot commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

kambala-decapitator commented 1 year ago

bump