I have a macbook(2020) with m1 processor and I am using Fastlane to automate the AppStore process. I have a problem since this morning. Every time I execute bundle exec fastlane
I get this error:
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.0/fastlane/lib/fastlane/cli_tools_distributor.rb:145:in `map_aliased_tools': undefined method `to_sym' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.0/fastlane/lib/fastlane/cli_tools_distributor.rb:81:in `take_off'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.206.0/bin/fastlane:23:in `<top (required)>'
from /usr/local/bin/fastlane:23:in `load'
from /usr/local/bin/fastlane:23:in `<main>'
Here are the versions of the tools I am using:
- ruby version: 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin21]
- xcode version: 13.3 (13E113)
- macos version: 12.3.1
Even though I tried to set up fastlane again using fastlane init
command it still gives me this error.
What could be causing this issue?
Update: I installed my own ruby using rvm(https://stackify.com/install-ruby-on-your-mac-everything-you-need-to-get-going/) and then used the recommended way of installing fastlane(with bundler) and now I have a similar error.
bundler: failed to load command: fastlane (/Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/bin/fastlane)
cli_tools_distributor.rb:145:in `map_aliased_tools': undefined method `to_sym' for nil:NilClass (NoMethodError)
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/fastlane-2.206.0/fastlane/lib/fastlane/cli_tools_distributor.rb:81:in `take_off'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/fastlane-2.206.0/bin/fastlane:23:in `<top (required)>'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/bin/fastlane:23:in `load'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/bin/fastlane:23:in `<top (required)>'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:58:in `load'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:23:in `run'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/cli.rb:483:in `exec'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/cli.rb:31:in `dispatch'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/cli.rb:25:in `start'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/exe/bundle:48:in `block in <top (required)>'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/gems/bundler-2.3.14/exe/bundle:36:in `<top (required)>'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/bin/bundle:23:in `load'
from /Users/mehmetbaykar/.rvm/gems/ruby-3.0.0/bin/bundle:23:in `<main>'
CodePudding user response:
There is an open issue for this bug. The issue occurs when you run fastlane without any additional command-line arguments. There are two temporary workarounds:
- Enable verbose mode:
bundle exec fastlane --verbose
- Specify a lane name:
bundle exec fastlane my_lane_name
Alternatively, you can downgrade to an earlier version of fastlane.