We successfully connected Apple Developer Connection with the trusted phone number verification. As this
2FA fails while connecting to Apple Developer portal suggested .
Now when we creating a build on bitrise , it sucessfully exported session as following logs
e[34;1mConnected Apple Developer Portal Account found, exposing FASTLANE_SESSION env vare[0m
e[32;1mSession exportede[0m]
========================
But still bitrise is asking
Two-factor Authentication (6 digits code) is enabled for account '[REDACTED]'
More information about Two-factor Authentication: https://support.apple.com/en-us/HT204915
If you're running this in a non-interactive session (e.g. server or CI)
check out https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification
(Input `sms` to escape this prompt and select a trusted phone number to send the code as a text message)
(You can also set the environment variable `SPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER` to automate this)
(Read more at: https://github.com/fastlane/fastlane/blob/master/spaceship/docs/Authentication.md#auto-select-sms-via-spaceship-2fa-sms-default-phone-number)
==========================
Current Fastlane version: 2.140.0.
Please help and guide us since our CI is blocked with this
======================
Optional Logs
bundler: failed to load command: fastlane (/Users/vagrant/.rbenv/versions/2.6.5/bin/fastlane)
NoMethodError: e[31m[!] undefined method `strip' for nil:NilClass
Did you mean? Stringe[0m
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/highline-1.7.10/lib/highline/question.rb:413:in `remove_whitespace'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/highline-1.7.10/lib/highline.rb:873:in `get_line'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/highline-1.7.10/lib/highline.rb:891:in `get_response'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/highline-1.7.10/lib/highline.rb:264:in `ask'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/2.6.0/forwardable.rb:230:in `ask'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/two_step_or_factor_client.rb:196:in `ask_for_2fa_code'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/two_step_or_factor_client.rb:145:in `handle_two_factor'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/two_step_or_factor_client.rb:20:in `handle_two_step_or_factor'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/client.rb:494:in `send_shared_login_request'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/tunes/tunes_client.rb:127:in `send_login_request'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/client.rb:775:in `do_login'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/client.rb:384:in `login'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/client.rb:346:in `login'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/spaceship/lib/spaceship/tunes/spaceship.rb:24:in `login'
Versionfile:13:in `set_version_number'
Versionfile:5:in `set_version'
Fastfile:50:in `block (2 levels) in parsing_binding'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/lane.rb:33:in `call'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/runner.rb:204:in `try_switch_to_lane'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/runner.rb:146:in `trigger_action_by_name'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
Fastfile:38:in `block (2 levels) in parsing_binding'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/lane.rb:33:in `call'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
/Users/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.140.0/bin/fastlane:23:in `<top (required)>'
/Users/vagrant/.rbenv/versions/2.6.5/bin/fastlane:23:in `load'
/Users/vagrant/.rbenv/versions/2.6.5/bin/fastlane:23:in `<top (required)>'
e[31;1mFastlane command: (bundle "_2.1.4_" "exec" "fastlane" "ios" "beta") failede[0m
e[31;1mIf you want to send an issue report to fastlane (https://github.com/fastlane/fastlane/issues/new), you can find the output of fastlane env in the following log file:e[0m
e[34;1m/Users/vagrant/deploy/fastlane_env.loge[0m
e[35;1m$ bundle "_2.1.4_" "exec" "fastlane" "env"e[0m
e[31;1mCommand failed, error: exit status 1e[0m
===============================
If I run command on my local machine it doesnât ask for 2 factor authentication since it is authenticated device . Question is why I canât make bitrise machine as a trusted it also verified by two factor authentication.