fastlane: latest_testflight_buildnumber " You have to specify a new version number error"

New Issue Checklist

I am getting an error while trying to fetch the latest TestFlight build number, its always asking for you have to specify new version number

Complete output when running fastlane, including the stack trace and command used

You can use: --capture_output as the last commandline argument to get that collected for you

[Login to iTunes Connect (****@.com) [15:45:59]: Login successful [15:45:59]: You have to specify a new version number]

if I specify the version number as 5.5.0 ,it is returning the incremented build number as 2 but the latest build number for version 5.5.0 is ‘54’

Environment

Stack

Key Value
OS 10.12.4
Ruby 2.4.1
Bundler? false
Git git version 2.10.1 (Apple Git-78)
Installation Source /usr/local/bin/fastlane
Host Mac OS X 10.12.4 (16E195)
Ruby Lib Dir /usr/local/Cellar/ruby/2.4.1_1/lib
OpenSSL Version OpenSSL 1.0.2k 26 Jan 2017
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.2.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane gems

Gem Version Update-Status
fastlane 2.38.0 🚫 Update available
Gem Version
did_you_mean 1.1.0
slack-notifier 1.5.1
rouge 2.0.7
xcpretty 0.2.8
terminal-notifier 1.8.0
unicode-display_width 1.2.1
terminal-table 1.8.0
plist 3.3.0
CFPropertyList 2.3.5
public_suffix 2.0.5
addressable 2.5.1
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.5.0
babosa 1.0.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.4
faraday 0.12.1
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.0
gh_inspector 1.0.3
uber 0.0.15
declarative 0.0.9
declarative-option 0.1.0
representable 3.0.4
retriable 2.1.0
mime-types-data 3.2016.0521
mime-types 3.1
little-plugger 1.1.4
multi_json 1.12.1
logging 2.2.2
jwt 1.5.6
memoist 0.15.0
os 0.9.6
signet 0.7.3
googleauth 0.5.1
httpclient 2.8.3
google-api-client 0.12.0
mini_magick 4.5.1
multi_xml 0.6.0
rubyzip 1.2.1
security 0.1.3
xcpretty-travis-formatter 0.0.4
dotenv 2.2.1
bundler 1.15.1
faraday_middleware 0.11.0.1
json 2.1.0
io-console 0.4.6
excon 0.57.0
openssl 2.0.3
claide 1.0.2
colored2 3.1.2
nanaimo 0.2.3
xcodeproj 1.5.0

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 25 (11 by maintainers)

Most upvoted comments

Okay I answered my own question, this fixed it for me, and it’s objectively better:

  project = 'ios/project.xcodeproj'

  build_number = latest_testflight_build_number(
      app_identifier: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier),
      version: get_version_number(xcodeproj: project)
  ) + 1

  increment_build_number({
    xcodeproj: project,
    build_number: build_number
  })

Hi @ohayon, the problem is be cause I need fetch the build from my app in development. When I put live: true works like a charm, but when put live: false (that is my case) don’t works.

I’m still seeing this issue, using fastlane 2.56.0. It looks like everything returns 1, even for versions that don’t exist. Maybe 1 is the exit code from iTC?

This should return 11:

[15:35:23]: Login successful
[15:35:24]: Fetching the latest build number for version 6.34
[15:35:30]: Latest upload is build number: 1

This should return an error possibly?

[15:35:46]: Login successful
[15:35:47]: Fetching the latest build number for version asdasidki
[15:35:52]: Latest upload is build number: 1

Using the command like so:

current = latest_testflight_build_number(username: "...", app_identifier: "...", version: "6.34")

Actually never mind, that finds the build to be 1? (This has been working perfectly for months until today)

[15:27:08]: --------------------------------
[15:27:08]: --- Step: get_version_number ---
[15:27:08]: --------------------------------
[15:27:08]: $ cd ~/dev/xxx/ios && agvtool what-marketing-version -terse
......
[15:27:09]: --------------------------------------------
[15:27:09]: --- Step: latest_testflight_build_number ---
[15:27:09]: --------------------------------------------
[15:27:09]: Login to iTunes Connect (email@xxxx.com)
[15:27:12]: Login successful
[15:27:12]: Fetching the latest build number for version 1.0 (<-- This is the correct version)
[15:27:26]: Latest upload is build number: 1 (<-- This is wrong!)
[15:27:26]: ------------------------------------
[15:27:26]: --- Step: increment_build_number ---
[15:27:26]: ------------------------------------
Current version of project XXX is:
    1