fastlane: match "undefined method get_profiles" error with fastlane 2.218.0

New Regression Checklist

Regression Information

  • Breaking version: 2.218.0
  • Last working version: 2.217.0

Regression Description

Complete output when running fastlane, including the stack trace and command used
[14:59:51]: Cloning remote git repo...
[14:59:51]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
[14:59:53]: Checking out branch main...
[14:59:53]: šŸ”“  Successfully decrypted certificates repo
[14:59:53]: Installing certificate...
[14:59:54]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning fastlane_tmp_keychain` to get this output.
This Stack Overflow thread has more information: https://stackoverflow.com/q/35390072/774.
(Check in Keychain Access for an expired WWDR certificate: https://stackoverflow.com/a/35409835/774 has more info.)
[14:59:54]: Setting key partition list... (this can take a minute if there are a lot of keys installed)
[14:59:54]: security: SecItemCopyMatching: The specified item could not be found in the keychain.
[14:59:54]: Setting key partition list... (this can take a minute if there are a lot of keys installed)

...

/Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/spaceship/lib/spaceship/connect_api/models/profile.rb:76: warning: #<Class:Spaceship::ConnectAPI>#get_profiles at /Users/distiller/.rbenv/versions/3.2.2/lib/ruby/3.2.0/forwardable.rb:159 forwarding to private method NilClass#get_profiles
+------------------------------------------------------------------------------------+
|                                    Lane Context                                    |
+---------------------------+--------------------------------------------------------+
| DEFAULT_PLATFORM          | ios                                                    |
| PLATFORM_NAME             | ios                                                    |
| LANE_NAME                 | ios betaStaging                                        |
| KEYCHAIN_PATH             | ~/Library/Keychains/fastlane_tmp_keychain              |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/distiller/Library/Keychains/login.keychain-db" |
+---------------------------+--------------------------------------------------------+

+---------------------------------------------------------+
|                    fastlane summary                     |
+------+------------------------------------+-------------+
| Step | Action                             | Time (in s) |
+------+------------------------------------+-------------+
| 1    | default_platform                   | 0           |
| 2    | setup_circle_ci                    | 0           |
| 3    | Switch to ios beta lane            | 0           |
| 4    | Switch to ios build lane           | 0           |
| 5    | Switch to ios syncCodeSigning lane | 0           |
| 6    | is_ci                              | 0           |
| šŸ’„   | match                              | 2           |
+------+------------------------------------+-------------+

[14:59:54]: fastlane finished with errors

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

āž”ļø  [deliver] increase chances of success when creating a new app version even when Apple servers are degraded
    https://github.com/fastlane/fastlane/pull/21742 [open] 21 šŸ’¬
    a week ago

šŸ”—  You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/bin/fastlane)
/Users/distiller/.rbenv/versions/3.2.2/lib/ruby/3.2.0/forwardable.rb:238:in `get_profiles': [!] undefined method `get_profiles' for nil:NilClass (NoMethodError)
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/spaceship/lib/spaceship/connect_api/models/profile.rb:76:in `all'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/portal_fetcher.rb:19:in `profiles'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/portal_cache.rb:87:in `profiles'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/portal_cache.rb:53:in `portal_profile'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/runner.rb:250:in `fetch_provisioning_profile'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/runner.rb:106:in `block (2 levels) in run'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/runner.rb:105:in `loop'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/runner.rb:105:in `block in run'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/runner.rb:104:in `each'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/match/lib/match/runner.rb:104:in `run'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/fastlane/lib/fastlane/actions/sync_code_signing.rb:19:in `run'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
        from /Users/distiller/repo/ios/vendor/bundle/ruby/3.2.0/gems/fastlane-2.218.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'

...

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 53
  • Comments: 30 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Hi guys, thanks for reporting, and sorry for the breaking. I’m looking into this issue right now.

UPD: Looks like the problem with readonly: true mode.

Not a solution, but a workaround for now:

In your Gemfile, add the following line: gem "fastlane", '~> 2.217.0'

(Make sure to remove it when this issue is fixed - not great to be locked to a specific version here.)

You’re right - there is. TIL!

gem "fastlane", '!= 2.218.0'

Source

EDIT: As pointed out below, there’s no guarantee that the next version will fix the issue. It’s probably safer to stick with the first workaround above.

I installed fastlane with homebrew. Is there any way to downgrade with brew? I can’t find v2.217.0 in homebrew.

Don’t bother, a new version (2.219.0) containing the fix was just released.

Any idea how to force to install specific version of fastlane on Bitrise.io? This solution won’t work https://support.bitrise.io/hc/en-us/articles/360017278218-Installing-a-specific-fastlane-version it gave me an error:

ERROR:  While executing gem ... (Gem::DependencyRemovalException)
    Uninstallation aborted due to dependent gem(s)
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:155:in `uninstall_gem'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `block in remove_all'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `each'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `remove_all'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:126:in `uninstall'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:198:in `uninstall'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:184:in `uninstall_gem'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:178:in `block in uninstall_specific'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:170:in `each'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:170:in `uninstall_specific'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:132:in `execute'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command.rb:327:in `invoke_with_build_args'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:252:in `invoke_command'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:192:in `process_args'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:150:in `run'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/gem_runner.rb:51:in `run'
	/Users/vagrant/.asdf/installs/ruby/3.2/bin/gem:10:in `<main>'
ERROR:  While executing gem ... (NoMethodError)
    undefined method `request' for nil:NilClass
    [@failed_dep.dependency, @activated.request.dependency]
                                       ^^^^^^^^

I can’t run my workflows because we are using fastlane match šŸ˜•

I think something like this would work if you need to exclude multiple versions: gem "fastlane", '!= 2.218.0', '!= 2.219.0' or gem "fastlane", ['!= 2.218.0', '!= 2.219.0']

Any idea how to force to install specific version of fastlane on Bitrise.io? This solution won’t work https://support.bitrise.io/hc/en-us/articles/360017278218-Installing-a-specific-fastlane-version it gave me an error:

ERROR:  While executing gem ... (Gem::DependencyRemovalException)
    Uninstallation aborted due to dependent gem(s)
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:155:in `uninstall_gem'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `block in remove_all'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `each'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `remove_all'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:126:in `uninstall'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:198:in `uninstall'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:184:in `uninstall_gem'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:178:in `block in uninstall_specific'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:170:in `each'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:170:in `uninstall_specific'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:132:in `execute'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command.rb:327:in `invoke_with_build_args'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:252:in `invoke_command'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:192:in `process_args'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:150:in `run'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/gem_runner.rb:51:in `run'
	/Users/vagrant/.asdf/installs/ruby/3.2/bin/gem:10:in `<main>'
ERROR:  While executing gem ... (NoMethodError)
    undefined method `request' for nil:NilClass
    [@failed_dep.dependency, @activated.request.dependency]
                                       ^^^^^^^^

I can’t run my workflows because we are using fastlane match šŸ˜•

Try modifying fastlane-match stage like this:

  • fastlane-match@0: inputs: - fastlane_version: 2.217.0 …

I installed fastlane with homebrew. Is there any way to downgrade with brew? I can’t find v2.217.0 in homebrew.

I could be completely wrong here but it looks like there is only one version available via brew:

brew search fastlane
==> Formulae fastlane

I use gem to quickly install/test various versions of fastlane

brew uninstall fastlane gem install fastlane --version 2.217.0

@mlazari No, I just tested that branch and it did not fix the error when creating a cert. [19:27:13]: Error setting value ā€˜[]’ for option ā€˜cached_devices’[!] cached_devices parameter must be a non-empty array of Spaceship::ConnectAPI::Device

Your issue seems to be fixed in another PR #21766, can you try on that branch?

The branch was merged to master. So I just tested master and the issue I was seeing seems to be fixed there.

@mlazari No, I just tested that branch and it did not fix the error when creating a cert.

[19:27:13]: Error setting value ā€˜[]’ for option ā€˜cached_devices’[!] cached_devices parameter must be a non-empty array of Spaceship::ConnectAPI::Device

Your issue seems to be fixed in another PR https://github.com/fastlane/fastlane/pull/21766, can you try on that branch?

Bitrise Users:

If you don’t use fastlane-match. I did this to get mine to work.

Added a script step with :

#!/usr/bin/env bashset -ex

gem uninstall fastlane --all --executables
gem install fastlane --version 2.217.0 --no-document

Then in my Fastlane module: Disable the upgrade option before run. image

Hopefully this helps someone that is dealing with this issue that uses Bitrise.

@nekrich I tested it with your change (by using gem 'fastlane', git: 'https://github.com/nekrich/fastlane.git', branch: 'fix/match-readonly-mode' in Gemfile) and it worked.

Hi guys, thanks for reporting, and sorry for the breaking. I’m looking into this issue right now.

UPD: Looks like the problem with readonly: true mode.

changed it to false and works for me

The issue with match/sync_code_signing should be fixed in [match] fix cache issues in read-only mode. Would appreciate it if someone could confirm it works for them.

Any idea how to force to install specific version of fastlane on Bitrise.io? This solution won’t work https://support.bitrise.io/hc/en-us/articles/360017278218-Installing-a-specific-fastlane-version it gave me an error:

ERROR:  While executing gem ... (Gem::DependencyRemovalException)
    Uninstallation aborted due to dependent gem(s)
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:155:in `uninstall_gem'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `block in remove_all'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `each'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:235:in `remove_all'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/uninstaller.rb:126:in `uninstall'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:198:in `uninstall'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:184:in `uninstall_gem'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:178:in `block in uninstall_specific'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:170:in `each'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:170:in `uninstall_specific'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/commands/uninstall_command.rb:132:in `execute'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command.rb:327:in `invoke_with_build_args'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:252:in `invoke_command'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:192:in `process_args'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/command_manager.rb:150:in `run'
	/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/gem_runner.rb:51:in `run'
	/Users/vagrant/.asdf/installs/ruby/3.2/bin/gem:10:in `<main>'
ERROR:  While executing gem ... (NoMethodError)
    undefined method `request' for nil:NilClass
    [@failed_dep.dependency, @activated.request.dependency]
                                       ^^^^^^^^

I can’t run my workflows because we are using fastlane match šŸ˜•

If you use Bundler to instal your gems, you can add something like this to your gemfile

gem "fastlane", '<= 2.217.0'

Note that this is a temporary measure until the issue has been fixed

Yep, good point. I’ll leave both options up above - do what you feel is best for your situation.

@stherold Except that there is no guarantee that it will be fixed in the next version, so that’s also not ideal.