fastlane: latest_testflight_build_number return incorrect build number & crash when live_version parameter is true

New Issue Checklist

Issue Description

The action latest_testflight_build_number is returning the incorrect build number in TestFlight as you can see in the output is returning 1 always for the build number and the current build number is 3 actually. I was checking out the closed issue #9528 and tried to include the live_version parameter to true to try to get it correctly and fastlane is reporting an exception.

Lane created to test the issue

lane :testflight_build do
    build = latest_testflight_build_number(version: "1.0", live: false)
end
Complete output when running fastlane, including the stack trace and command used
fastlane testflight_build
[12:14:32]: -------------------------------------------------
[12:14:32]: --- Step: Verifying required fastlane version ---
[12:14:32]: -------------------------------------------------
[12:14:32]: Your fastlane version 2.64.1 matches the minimum requirement of 1.111.0  βœ…
[12:14:32]: ------------------------------
[12:14:32]: --- Step: default_platform ---
[12:14:32]: ------------------------------
[12:14:32]: Driving the lane 'ios testflight_build' πŸš€
[12:14:32]: --------------------------------------------
[12:14:32]: --- Step: latest_testflight_build_number ---
[12:14:32]: --------------------------------------------
[12:14:32]: Login to iTunes Connect (xxxx@yyyy.com)
[12:14:38]: Login successful
[12:14:39]: Fetching the latest build number for version 1.0
[12:14:40]: Latest upload is build number: 1

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| 3    | latest_testflight_build_number      | 7           |
+------+-------------------------------------+-------------+

[12:14:40]: fastlane.tools finished successfully πŸŽ‰

Output for the same lane with the live_version: true

[12:26:34]: -------------------------------------------------
[12:26:34]: --- Step: Verifying required fastlane version ---
[12:26:34]: -------------------------------------------------
[12:26:34]: Your fastlane version 2.64.1 matches the minimum requirement of 1.111.0  βœ…
[12:26:34]: ------------------------------
[12:26:34]: --- Step: default_platform ---
[12:26:34]: ------------------------------
[12:26:34]: Driving the lane 'ios testflight_build' πŸš€
[12:26:34]: --------------------------------------------
[12:26:34]: --- Step: latest_testflight_build_number ---
[12:26:34]: --------------------------------------------
[12:26:34]: Login to iTunes Connect (xxxx@yyyy.com)
[12:26:37]: Login successful
[12:26:37]: Fetching the latest build number for live-version
+------------------+----------------------+
|              Lane Context               |
+------------------+----------------------+
| DEFAULT_PLATFORM | ios                  |
| PLATFORM_NAME    | ios                  |
| LANE_NAME        | ios testflight_build |
+------------------+----------------------+
[12:26:39]: undefined method `current_build_number' for nil:NilClass

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| πŸ’₯   | latest_testflight_build_number      | 4           |
+------+-------------------------------------+-------------+

[12:26:39]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

➑️  `app_store_build_number` fails with `undefined method `current_build_number' for nil:NilClass (NoMethodError)`
    https://github.com/fastlane/fastlane/issues/10447 [open] 2 πŸ’¬
    4 days ago

πŸ”—  You can ⌘ + double-click on links to open them directly in your browser.
/Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/actions/app_store_build_number.rb:19:in `run': [!] undefined method `current_build_number' for nil:NilClass (NoMethodError)
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb:11:in `run'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/runner.rb:253:in `block (2 levels) in execute_action'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/runner.rb:231:in `block in execute_action'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/runner.rb:227:in `chdir'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
	from Fastfile:379:in `block (2 levels) in parsing_binding'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/lane_manager.rb:54:in `cruise_lane'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/commander-fastlane-4.4.5/lib/commander/command.rb:178:in `call'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/commander-fastlane-4.4.5/lib/commander/command.rb:153:in `run'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/commander-fastlane-4.4.5/lib/commander/runner.rb:476:in `run_active_command'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:66:in `run!'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/commander-fastlane-4.4.5/lib/commander/delegates.rb:15:in `run!'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/fastlane/lib/fastlane/cli_tools_distributor.rb:66:in `take_off'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/gems/fastlane-2.64.1/bin/fastlane:20:in `<top (required)>'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/bin/fastlane:23:in `load'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/bin/fastlane:23:in `<main>'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
	from /Users/vsiglerlopez/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'

Environment

βœ… fastlane environment βœ…

Stack

Key Value
OS 10.13
Ruby 2.4.2
Bundler? true
Git git version 2.13.6 (Apple Git-96)
Installation Source ~/.rvm/gems/ruby-2.4.2/bin/fastlane
Host Mac OS X 10.13 (17A405)
Ruby Lib Dir ~/.rvm/rubies/ruby-2.4.2/lib
OpenSSL Version OpenSSL 1.1.0f 25 May 2017
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.1

System Locale

Variable Value
LANG en_US.UTF-8 βœ…
LC_ALL
LANGUAGE

fastlane gems

Gem Version Update-Status
fastlane 2.64.1 βœ… Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.1.0
executable-hooks 1.3.2
bundler-unload 1.0.2
rubygems-bundler 1.4.4
bundler 1.16.0
io-console 0.4.6
rake 12.3.0
CFPropertyList 2.3.5
public_suffix 2.0.5
addressable 2.5.2
babosa 1.0.2
claide 1.0.2
colored2 3.1.2
cork 0.3.0
nap 1.1.0
open4 1.3.4
claide-plugins 0.9.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.5
multipart-post 2.0.0
faraday 0.13.1
faraday-http-cache 1.3.1
git 1.3.0
kramdown 1.15.0
no_proxy_fix 0.1.2
sawyer 0.8.1
octokit 4.7.0
unicode-display_width 1.3.0
terminal-table 1.8.0
danger 5.5.5
ox 2.8.2
danger-junit 0.7.4
thor 0.20.0
danger-swiftlint 0.11.0
dotenv 2.2.1
excon 0.59.0
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
faraday_middleware 0.12.2
fastimage 2.1.0
gh_inspector 1.0.3
jwt 2.1.0
little-plugger 1.1.4
multi_json 1.12.2
logging 2.2.2
memoist 0.16.0
os 0.9.6
signet 0.8.1
googleauth 0.6.2
httpclient 2.8.3
mime-types-data 3.2016.0521
mime-types 3.1
declarative 0.0.10
declarative-option 0.1.0
uber 0.1.0
representable 3.0.4
retriable 3.1.1
google-api-client 0.13.6
json 2.1.0
mini_magick 4.5.1
multi_xml 0.6.0
plist 3.3.0
rubyzip 1.2.1
security 0.1.3
slack-notifier 1.5.1
terminal-notifier 1.8.0
tty-screen 0.5.1
word_wrap 1.0.0
nanaimo 0.2.3
xcodeproj 1.5.3
rouge 2.0.7
xcpretty 0.2.8
xcpretty-travis-formatter 1.0.0
xcov 1.3.0
danger-xcov 0.3.3

generated on: 2017-11-16

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 21 (4 by maintainers)

Most upvoted comments

@michaelm-spindance Then I think this PR in progress Update fastlane to use new TestFlight endpoints should solve this issue, let’s wait for it πŸ˜„

Please update Fastlane to version 2.66.0

#10921 Gets the base in place, but I believe that #10947 resolves this issue.

Either do this or create a new one and mention that you are referring to 2.66.2. Thanks.