fastlane: `upload': \e[31m[!] undefined method `first' for nil:NilClass\e[0m (NoMethodError) on fastlane version 2.212.2

Issue Description

I’m using circleci to build my ios app. This issue started after upating to fastlane’s latest version.

Command executed

fastlane run deliver dev_portal_team_name:*** team_name:*** itc_provider:*** app_identifier:*** app_version:*** ipa:**** app_icon:**** screenshots_path:**** metadata_path:**** price_tier:*** app_rating_config_path:*** automatic_release:**** submit_for_review:true overwrite_screenshots:true precheck_include_in_app_purchases:false run_precheck_before_submit:false force:true

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

`[12:30:22]: Successfully uploaded screenshots to App Store Connect

Looking for related GitHub issues on fastlane/fastlane…

➡️ Fix accessing first element of nil array in upload_price_tier https://github.com/fastlane/fastlane/pull/21213 [open] 1 💬 a day ago

➡️ [spaceship][deliver] add app clips support for specifying default experience metadata https://github.com/fastlane/fastlane/pull/20300 [open] 26 💬 2 weeks ago

➡️ [supply] added support for refresh tokens as an authentication method https://github.com/fastlane/fastlane/pull/16414 [open] 10 💬 23 May 2020

and 221 more at: https://github.com/fastlane/fastlane/search?q=undefined method `first' for nil&type=Issues&utf8=✓

🔗 You can ⌘ + double-click on links to open them directly in your browser. /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/deliver/lib/deliver/upload_price_tier.rb:24:in upload': \e[31m[!] undefined method first’ for nil:NilClass\e[0m (NoMethodError) from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/deliver/lib/deliver/runner.rb:161:in `upload_metadata’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/deliver/lib/deliver/runner.rb:61:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/actions/upload_to_app_store.rb:22:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/runner.rb:229:in `chdir’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/runner.rb:229:in `execute_action’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/one_off.rb:42:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/one_off.rb:22:in `execute’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/commands_generator.rb:226:in `block (2 levels) in run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/commands_generator.rb:354:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/commands_generator.rb:43:in `start’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/bin/fastlane:23:in `<top (required)>’ from /Users/distiller/.rbenv/versions/3.0.5/bin/fastlane:25:in `load’ from /Users/distiller/.rbenv/versions/3.0.5/bin/fastlane:25:in `<main>’ /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/deliver/lib/deliver/upload_price_tier.rb:24:in `upload’: undefined method `first’ for nil:NilClass (NoMethodError) from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/deliver/lib/deliver/runner.rb:161:in `upload_metadata’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/deliver/lib/deliver/runner.rb:61:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/actions/upload_to_app_store.rb:22:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/runner.rb:229:in `chdir’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/runner.rb:229:in `execute_action’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/one_off.rb:42:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/one_off.rb:22:in `execute’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/commands_generator.rb:226:in `block (2 levels) in run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/commands_generator.rb:354:in `run’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/commands_generator.rb:43:in `start’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off’ from /Users/distiller/.rbenv/versions/3.0.5/lib/ruby/gems/3.0.0/gems/fastlane-2.212.2/bin/fastlane:23:in `<top (required)>’ from /Users/distiller/.rbenv/versions/3.0.5/bin/fastlane:25:in `load’ from /Users/distiller/.rbenv/versions/3.0.5/bin/fastlane:25:in `<main>'`

Environment

xcode: 14.2.0 falstlane 2.212.2

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 1
  • Comments: 20

Most upvoted comments

I’ve been hitting this over the last few days. Downgrading Fastlane to 2.212.1 fixed it, so it’s an issue in the latest version 2.212.2.

Are people still getting this in 2.216.0?

Any updates

Could somebody provide that review to https://github.com/fastlane/fastlane/pull/21282, please?

#21282 fixes this issue

if you are onboarding a new app:

  • “produce” your stub for your app first.
  • go in and change your pricing manually there (if it is free, just set it 0, confirm for all countries, review).
  • in your DeliverFile ensure that you have comments out price_tier: 0 as this will trigger app pricing code that doesn’t appear to be working after Apple’s Pricing API revamp.
  • ensure you have latest XCode and your libraries can handle latest iOS version.
  • ensure you have latest fastlane
  • ensure your env ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD = false (we’ve had it as true the last 6 months as a patch, and actually needs to be disabled now)

you should be able to build from that, i had help from this thread on pricing and the workaround is good for now: https://github.com/fastlane/fastlane/issues/21199