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

Fastlane deliver ignoring increment_version_number for Xcode 13.4.1 #20465

Open
michaelmoneypenny opened this issue Jul 13, 2022 Discussed in #20464 · 10 comments
Open

Fastlane deliver ignoring increment_version_number for Xcode 13.4.1 #20465

michaelmoneypenny opened this issue Jul 13, 2022 Discussed in #20464 · 10 comments

Comments

@michaelmoneypenny
Copy link

michaelmoneypenny commented Jul 13, 2022

Discussed in #20464

Originally posted by michaelmoneypenny July 13, 2022
For some reason fastlane has started ignoring the dynamic version number we pass in to the pipeline and using the marketing version defined in xcodeproj (9.9.9 in my case)

We haven't changed anything in fastlane around versioning (we have updated Xcode to 13.4.1 and upped the minor version of the app)

What's strange is we can see the correct version at various stages in the pipeline logs but when it gets to deliver it chooses 9.9.9.

Update - reverting to Xcode 13.1 and the correct version is set again - is this a bug or something I need to configure on the build machine for 13.4.1?

[16:34:28]: $ cd /Users/****/appname && agvtool new-marketing-version 2.11.1
[16:34:28]: ▸ Setting CFBundleShortVersionString of project appname to:
[16:34:28]: ▸ 2.11.1.
[16:34:28]: ▸ Updating CFBundleShortVersionString in Info.plist(s)...
[16:34:28]: ▸ Updated CFBundleShortVersionString in "appname.xcodeproj/../Info.plist" to 2.11.1
+--------------------------------------+-----------------------------------+
|                         deliver 2.207.0 Summary                          |
+--------------------------------------+-----------------------------------+
| ipa                                  | ./build/appname.ipa         |
| precheck_include_in_app_purchases    | false                             |
| submit_for_review                    | false                             |
| force                                | true                              |
| metadata_path                        | .fastlane/metadata                |
| api_key                              | ********                          |
| screenshots_path                     | ./.fastlane/screenshots           |
| app_version                          | 9.9.9                    
| LATEST_TESTFLIGHT_VERSION          | 2.11.1                                                                                                                                                                                                                                       |
| BUILD_NUMBER                       | 1                                                                                                                                                                                                                                            |
| VERSION_NUMBER                     | 2.11.1                                                                                                                                                                                                                                       |
| IPA_OUTPUT_PATH                    | /Users/****/build/appname.ipa                                                                                                                                                                                      |
| XCODEBUILD_ARCHIVE                 | ./archive/appname2022-07-12 16.35.38.xcarchive                                                                                                                                                                                        |
                                                                                                                                                                        |
+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[16:42:44]: Error uploading ipa file: 
 [Transporter Error Output]: ERROR ITMS-90189: Redundant Binary Upload. You've already uploaded a build with build number '1' for version number '9.9.9'.

Section of fast file (we haven't changed anything here)

  increment_build_number_from_appstore(
      app_version: options[:app_version],
      asc_key_id: options[:asc_key_id],
      asc_issuer_id: options[:asc_issuer_id],
      asc_key: options[:asc_key])
  increment_version_number(
      version_number: options[:app_version],
      xcodeproj: @xcode_project)
  build_app(
      scheme: @scheme,
      export_method: "app-store",
      export_options: {
         provisioningProfiles: {
           "com.xxxxx" => "match AppStore com.xxxxx
         }
      },
      configuration: "Release",
      include_symbols: true,
      project: @xcode_project,
      build_path: @archive_directory,
      output_directory: @output_directory,
      cloned_source_packages_path: options[:cloned_source_packages_path],
      output_name: "appname")
  deliver(
      ipa: @ipa,
      precheck_include_in_app_purchases: false,
      submit_for_review: false,
      force: true,
      metadata_path: ".fastlane/metadata")

Versioning section in Xcode:
image

Fastlane env:

✅ fastlane environment ✅

Stack

Key Value
OS 12.4
Ruby 2.6.8
Bundler? false
Git git version 2.32.1 (Apple Git-133)
Installation Source /usr/local/bin/fastlane
Host macOS 12.4 (21F79)
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 /Applications/Xcode.app/Contents/Developer/
Xcode Version 13.4.1
Swift Version 5.6.1

System Locale

Variable Value
LANG en_GB.UTF-8
LC_ALL
LANGUAGE

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.207.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.3.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.8.0
terminal-table 1.8.0
plist 3.6.0
addressable 2.8.0
multipart-post 2.0.0
word_wrap 1.0.0
optparse 0.1.1
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
artifactory 3.0.15
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
faraday-cookie_jar 0.0.7
gh_inspector 1.1.3
mini_magick 4.11.0
naturally 2.2.1
rubyzip 2.3.2
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
simctl 1.6.8
rexml 3.2.5
nanaimo 0.3.0
colored2 3.1.2
claide 1.1.0
CFPropertyList 3.0.5
atomos 0.1.3
xcodeproj 1.22.0
public_suffix 4.0.7
excon 0.92.3
ruby2_keywords 0.0.5
faraday-retry 1.0.3
faraday-rack 1.0.0
faraday-patron 1.0.0
faraday-net_http_persistent 1.2.0
faraday-net_http 1.0.1
faraday-multipart 1.0.4
faraday-httpclient 1.0.1
faraday-excon 1.1.0
faraday-em_synchrony 1.0.0
faraday-em_http 1.0.0
faraday 1.10.0
unf_ext 0.0.8.2
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.5
faraday_middleware 1.2.0
fastimage 2.2.6
json 2.6.2
bundler 2.2.32
jwt 2.4.1
webrick 1.7.0
httpclient 2.8.3
multi_json 1.15.0
signet 0.17.0
os 1.1.4
memoist 0.16.2
googleauth 1.2.0
mini_mime 1.1.2
retriable 3.1.2
trailblazer-option 0.1.2
declarative 0.0.20
uber 0.1.0
representable 3.2.0
google-apis-core 0.7.0
google-apis-playcustomapp_v1 0.10.0
google-apis-androidpublisher_v3 0.24.0
rake 13.0.6
digest-crc 0.6.4
google-apis-storage_v1 0.17.0
google-apis-iamcredentials_v1 0.13.0
google-cloud-errors 1.2.0
google-cloud-env 1.6.0
google-cloud-core 1.6.0
google-cloud-storage 1.37.0
emoji_regex 3.2.3
aws-eventstream 1.2.0
aws-sigv4 1.5.0
aws-partitions 1.603.0
jmespath 1.6.1
aws-sdk-core 3.131.2
aws-sdk-kms 1.57.0
aws-sdk-s3 1.114.0
forwardable 1.2.0
logger 1.3.0
date 2.0.0
stringio 0.0.2
ipaddr 1.2.2
openssl 2.1.2
zlib 1.0.0
mutex_m 0.1.0
ostruct 0.1.0
strscan 1.0.0
io-console 0.4.7
fileutils 1.1.0
etc 1.0.1
libxml-ruby 3.2.1
psych 3.1.0

generated on: 2022-07-13

@fastlane-bot
Copy link

It seems like you have not included the output of fastlane env
To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍

@max-ott
Copy link
Contributor

max-ott commented Jul 26, 2022

I think there's a new option in Xcode that is called "automatic version numbering" or similar. Here Xcode will "hijack" and automatically increase the build/version number by itself. Probably we need to switch to some kind of manual numbering here, which has not been implemented.

@WilliamAlexander
Copy link

Same-ish problem on Xcode 13.4.1
Seems to be related to no info.plist file now as this is generated (although you can still go back to having a real plist file)
The MARKETING_VERSION is used for the version and this is no longer incremented

@michaelmoneypenny
Copy link
Author

Should manually setting the version in xcode work for now then? So I can still build with 13.4.1

@fastlane-bot
Copy link

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 👍

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 💪

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

@michaelmoneypenny
Copy link
Author

Just adding that problem persists on latest fastlane + Xcode 14.0.1

@darrylyoung
Copy link

I'm currently setting up fastlane, and I came across this issue as well. The only solution I've found is to use the fastlane-plugin-versioning plugin. In the docs, they mention supporting $(MARKETING_VERSION).

@michaelmoneypenny
Copy link
Author

Thanks for this, it would be good to get some clarification on whether this is going to be handled in a future version of fastlane or is something we'll need to accommodate ourselves - I currently manually set the marketing (and any extension) version in Xcode but it feels rubbish :)

@fastlane-bot
Copy link

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 👍

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 💪

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

@Ayonge
Copy link

Ayonge commented Jan 24, 2023

We started encountering this but with the build number, it always gets set to (1) for some reason. Is there a fix for this? I tried setting Xcode to 13.1 but no success.

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

No branches or pull requests

6 participants