fastlane: [match] failing on post_profiles / post_certificate with: undefined method `first' for "errors":String (NoMethodError)
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
Both fastlane match development and fastlane match appstore are failing with the same undefined method first' for "errors":String (NoMethodError) error. While development is failing on post_profiles appstore command is failing on post_certificate. Please note I am trying to avoid nuking the existing certificates and profiles for now, not sure if that’s the problem.
Command executed
fastlane match development
fastlane match appstore
Complete output when running fastlane, including the stack trace and command used
fastlane match development
[✔] 🚀 [13:20:41]: fastlane detected a Gemfile in the current directory [13:20:41]: However, it seems like you didn't use `bundle exec` [13:20:41]: To launch fastlane faster, please use [13:20:41]: [13:20:41]: $ bundle exec fastlane match development [13:20:41]: [13:20:41]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile [13:20:48]: Successfully loaded '/Users/********/Developer/*********/fastlane/Matchfile' 📄±---------------±--------------------------------------------------------------------+ | Detected Values from ‘./fastlane/Matchfile’ | ±---------------±--------------------------------------------------------------------+ | git_url | https://github.com/***************/*****-certificates-ios | | storage_mode | git | | app_identifier | [“com..”, “com..-Dev”, “com..-stage”] | | username | **********@*****.com | ±---------------±--------------------------------------------------------------------+
±-------------------------------±--------------------------------------------------------------------+ | Summary for match 2.178.0 | ±-------------------------------±--------------------------------------------------------------------+ | type | development | | readonly | false | | generate_apple_certs | true | | skip_provisioning_profiles | false | | app_identifier | [“com..”, “com..-Dev”, “com..-stage”] | | username | **********@*****.com | | storage_mode | git | | git_url | https://github.com/***************/*****-certificates-ios | | git_branch | master | | shallow_clone | false | | clone_branch_directly | false | | keychain_name | login.keychain | | force | false | | force_for_new_devices | false | | skip_confirmation | false | | skip_docs | false | | platform | ios | | derive_catalyst_app_identifier | false | | fail_on_name_taken | false | | skip_certificate_matching | false | | skip_set_partition_list | false | | verbose | false | ±-------------------------------±--------------------------------------------------------------------+
[13:20:48]: Cloning remote git repo… [13:20:48]: If cloning the repo takes too long, you can use the
clone_branch_directlyoption in match. [13:20:50]: Checking out branch master… [13:20:50]: 🔓 Successfully decrypted certificates repo [13:20:50]: Verifying that the certificate and profile are still valid on the Dev Portal… Available session is not valid any more. Continuing with normal login. [13:20:52]: Couldn’t find a valid code signing identity for development… creating one for you now±------------------------±----------------------------------------------------+ | Summary for cert 2.178.0 | ±------------------------±----------------------------------------------------+ | platform | ios | | development | true | | generate_apple_certs | true | | force | true | | username | **********@.com | | keychain_path | /Users/***/Library/Keychains/login.keychain-db | | skip_set_partition_list | false | ±------------------------±----------------------------------------------------+
[13:20:52]: Starting login with user '**********@.com’ Available session is not valid any more. Continuing with normal login. [13:20:53]: Successfully logged in [13:20:53]: Using keychain password from keychain item fastlane_keychain_login in /Users//Library/Keychains/login.keychain-db [✔] Setting key partition list… (this can take a minute if there are a lot of keys installed) [13:20:54]: Using keychain password from keychain item fastlane_keychain_login in /Users/*****/Library/Keychains/login.keychain-db [✔] Setting key partition list… (this can take a minute if there are a lot of keys installed) [13:20:54]: Successfully generated TD5689WK6S which was imported to the local machine. [13:20:54]: Verifying the certificate is properly installed locally… [13:20:54]: Successfully installed certificate TD5689WK6S
±------------------------------------±----------------------------------+ | Summary for sigh 2.178.0 | ±------------------------------------±----------------------------------+ | app_identifier | com.. | | username | *****@.com | | force | false | | cert_id | TD5689WK6S | | provisioning_name | match Development com.. | | ignore_profiles_with_different_name | true | | fail_on_name_taken | false | | platform | ios | | development | true | | adhoc | false | | developer_id | false | | skip_install | false | | skip_fetch_profiles | false | | skip_certificate_verification | false | | readonly | false | ±------------------------------------±----------------------------------+
[13:20:55]: Starting login with user ‘**********@.com’ Available session is not valid any more. Continuing with normal login. [13:20:56]: Successfully logged in [13:20:56]: Fetching profiles… [13:20:56]: Verifying certificates… [13:20:56]: No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you [13:20:57]: Creating new provisioning profile for 'com..’ with name 'match Development com..*****’ for ‘ios’ platform
Looking for related GitHub issues on fastlane/fastlane…
➡️ Failed to register new device (undefined method `first’ for “errors”:String) https://github.com/fastlane/fastlane/issues/18424 [open] 1 💬 5 hours ago
➡️ [Swift] undefined method `each’ for nil:NilClass - Cannot Create Group Within FastlaneSwiftRunner Project https://github.com/fastlane/fastlane/issues/15184 [open] 55 💬 3 weeks ago
➡️ “Could not store password in keychain” https://github.com/fastlane/fastlane/issues/18223 [open] 2 💬 4 weeks ago
and 37 more at: https://github.com/fastlane/fastlane/search?q=undefined method `first' for "errors"%3AString&type=Issues&utf8=✓
🔗 You can ⌘ + double-click on links to open them directly in your browser. Traceback (most recent call last): 31: from /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane:23:in
<main>' 30: from /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane:23:inload’ 29: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/bin/fastlane:23:in<top (required)>' 28: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:intake_off’ 27: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:25:instart' 26: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:187:inrun’ 25: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:inrun!' 24: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:inrun!’ 23: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:inrun_active_command' 22: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:inrun’ 21: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:incall' 20: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:68:inblock (3 levels) in run’ 19: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:109:inrun' 18: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:109:ineach’ 17: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:110:inblock in run' 16: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:110:inloop’ 15: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:111:inblock (2 levels) in run' 14: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:270:infetch_provisioning_profile’ 13: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/generator.rb:108:ingenerate_provisioning_profile' 12: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/sigh/lib/sigh/manager.rb:8:instart’ 11: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/sigh/lib/sigh/runner.rb:48:inrun' 10: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/sigh/lib/sigh/runner.rb:182:increate_profile!’ 9: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/models/profile.rb:76:increate' 8: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/forwardable.rb:235:inpost_profiles’ 7: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb:185:inpost_profiles' 6: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:37:inpost’ 5: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:67:inproxy_post' 4: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:726:inrequest’ 3: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:882:insend_request' 2: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:646:inwith_retry’ 1: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:886:inblock in send_request' /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/api_client.rb:214:inhandle_error’: undefined methodfirst' for "errors":String (NoMethodError) 31: from /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane:23:in<main>’ 30: from /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane:23:inload' 29: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/bin/fastlane:23:in<top (required)>’ 28: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:intake_off' 27: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:25:instart’ 26: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:187:inrun' 25: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:inrun!’ 24: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:inrun!' 23: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:inrun_active_command’ 22: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:inrun' 21: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:incall’ 20: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:68:inblock (3 levels) in run' 19: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:109:inrun’ 18: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:109:ineach' 17: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:110:inblock in run’ 16: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:110:inloop' 15: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:111:inblock (2 levels) in run’ 14: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:270:infetch_provisioning_profile' 13: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/generator.rb:108:ingenerate_provisioning_profile’ 12: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/sigh/lib/sigh/manager.rb:8:instart' 11: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/sigh/lib/sigh/runner.rb:48:inrun’ 10: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/sigh/lib/sigh/runner.rb:182:increate_profile!' 9: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/models/profile.rb:76:increate’ 8: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/forwardable.rb:235:inpost_profiles' 7: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb:185:inpost_profiles’ 6: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:37:inpost' 5: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:67:inproxy_post’ 4: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:726:inrequest' 3: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:882:insend_request’ 2: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:646:inwith_retry' 1: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:886:inblock in send_request’ /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/api_client.rb:214:inhandle_error': \e[31m[!] undefined methodfirst’ for “errors”:String\e[0m (NoMethodError)
fastlane match appstore
[✔] 🚀 [13:22:02]: fastlane detected a Gemfile in the current directory [13:22:02]: However, it seems like you didn't use `bundle exec` [13:22:02]: To launch fastlane faster, please use [13:22:02]: [13:22:02]: $ bundle exec fastlane match appstore [13:22:02]: [13:22:02]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile [13:22:08]: Successfully loaded '/Users/********/Developer/*****-ios/fastlane/Matchfile' 📄±---------------±--------------------------------------------------------------------+ | Detected Values from ‘./fastlane/Matchfile’ | ±---------------±--------------------------------------------------------------------+ | git_url | https://github.com/***************/*****-certificates-ios | | storage_mode | git | | app_identifier | [“com..”, “com..-Dev”, “com..-stage”] | | username | **********@*****.com | ±---------------±--------------------------------------------------------------------+
±-------------------------------±--------------------------------------------------------------------+ | Summary for match 2.178.0 | ±-------------------------------±--------------------------------------------------------------------+ | type | appstore | | readonly | false | | generate_apple_certs | true | | skip_provisioning_profiles | false | | app_identifier | [“com..”, “com..-Dev”, “com..-stage”] | | username | **********@*****.com | | storage_mode | git | | git_url | https://github.com/***************/*****-certificates-ios | | git_branch | master | | shallow_clone | false | | clone_branch_directly | false | | keychain_name | login.keychain | | force | false | | force_for_new_devices | false | | skip_confirmation | false | | skip_docs | false | | platform | ios | | derive_catalyst_app_identifier | false | | fail_on_name_taken | false | | skip_certificate_matching | false | | skip_set_partition_list | false | | verbose | false | ±-------------------------------±--------------------------------------------------------------------+
[13:22:08]: Cloning remote git repo… [13:22:08]: If cloning the repo takes too long, you can use the
clone_branch_directlyoption in match. [13:22:10]: Checking out branch master… [13:22:10]: 🔓 Successfully decrypted certificates repo [13:22:10]: Verifying that the certificate and profile are still valid on the Dev Portal… Available session is not valid any more. Continuing with normal login. [13:22:11]: Couldn’t find a valid code signing identity for distribution… creating one for you now±------------------------±----------------------------------------------------+ | Summary for cert 2.178.0 | ±------------------------±----------------------------------------------------+ | platform | ios | | development | false | | generate_apple_certs | true | | force | true | | username | **********@.com | | keychain_path | /Users/***/Library/Keychains/login.keychain-db | | skip_set_partition_list | false | ±------------------------±----------------------------------------------------+
[13:22:11]: Starting login with user ‘**********@*****.com’ Available session is not valid any more. Continuing with normal login. [13:22:13]: Successfully logged in
Looking for related GitHub issues on fastlane/fastlane…
➡️ Failed to register new device (undefined method `first’ for “errors”:String) https://github.com/fastlane/fastlane/issues/18424 [open] 1 💬 5 hours ago
➡️ [Swift] undefined method `each’ for nil:NilClass - Cannot Create Group Within FastlaneSwiftRunner Project https://github.com/fastlane/fastlane/issues/15184 [open] 55 💬 3 weeks ago
➡️ “Could not store password in keychain” https://github.com/fastlane/fastlane/issues/18223 [open] 2 💬 4 weeks ago
and 37 more at: https://github.com/fastlane/fastlane/search?q=undefined method `first' for "errors"%3AString&type=Issues&utf8=✓
🔗 You can ⌘ + double-click on links to open them directly in your browser. Traceback (most recent call last): 27: from /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane:23:in
<main>' 26: from /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane:23:inload’ 25: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/bin/fastlane:23:in<top (required)>' 24: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:intake_off’ 23: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:25:instart' 22: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:187:inrun’ 21: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:inrun!' 20: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:inrun!’ 19: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:inrun_active_command' 18: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:inrun’ 17: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:incall' 16: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:68:inblock (3 levels) in run’ 15: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:96:inrun' 14: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:169:infetch_certificate’ 13: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/generator.rb:42:ingenerate_certificate' 12: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/cert/lib/cert/runner.rb:13:inlaunch’ 11: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/cert/lib/cert/runner.rb:54:inrun' 10: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/cert/lib/cert/runner.rb:191:increate_certificate’ 9: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/models/certificate.rb:90:increate' 8: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/forwardable.rb:235:inpost_certificate’ 7: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb:105:inpost_certificate' 6: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:37:inpost’ 5: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:67:inproxy_post' 4: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:726:inrequest’ 3: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:882:insend_request' 2: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:646:inwith_retry’ 1: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:886:inblock in send_request' /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/api_client.rb:214:inhandle_error’: undefined methodfirst' for "errors":String (NoMethodError) 27: from /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane:23:in<main>’ 26: from /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane:23:inload' 25: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/bin/fastlane:23:in<top (required)>’ 24: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:intake_off' 23: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:25:instart’ 22: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:187:inrun' 21: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:inrun!’ 20: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:inrun!' 19: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:inrun_active_command’ 18: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:inrun' 17: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:incall’ 16: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/commands_generator.rb:68:inblock (3 levels) in run' 15: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:96:inrun’ 14: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/runner.rb:169:infetch_certificate' 13: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/match/lib/match/generator.rb:42:ingenerate_certificate’ 12: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/cert/lib/cert/runner.rb:13:inlaunch' 11: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/cert/lib/cert/runner.rb:54:inrun’ 10: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/cert/lib/cert/runner.rb:191:increate_certificate' 9: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/models/certificate.rb:90:increate’ 8: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/forwardable.rb:235:inpost_certificate' 7: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb:105:inpost_certificate’ 6: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:37:inpost' 5: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:67:inproxy_post’ 4: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:726:inrequest' 3: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:882:insend_request’ 2: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:646:inwith_retry' 1: from /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/client.rb:886:inblock in send_request’ /usr/local/Cellar/fastlane/2.178.0/libexec/gems/fastlane-2.178.0/spaceship/lib/spaceship/connect_api/api_client.rb:214:inhandle_error': \e[31m[!] undefined methodfirst’ for “errors”:String\e[0m (NoMethodError)
Environment
✅ fastlane environment ✅
Stack
Key Value OS 11.2.2 Ruby 2.7.2 Bundler? false Git git version 2.30.1 Installation Source /usr/local/Cellar/fastlane/2.178.0/libexec/bin/fastlane Host macOS 11.2.2 (20D80) Ruby Lib Dir /usr/local/Cellar/ruby@2.7/2.7.2/lib OpenSSL Version OpenSSL 1.1.1i 8 Dec 2020 Is contained false Is homebrew true Is installed via Fabric.app false Xcode Path /Applications/Xcode-12.4.app/Contents/Developer/ Xcode Version 12.4 System Locale
Variable Value LANG en_CA.UTF-8 ✅ LC_ALL LANGUAGE fastlane files:
`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration # You can find the documentation at https://docs.fastlane.tools # # For a list of all available actions, check out # # https://docs.fastlane.tools/actions # # For a list of all available plugins, check out # # https://docs.fastlane.tools/plugins/available-plugins # # Uncomment the line if you want fastlane to automatically update itself # update_fastlane default_platform(:ios) platform :ios do desc "Run SwiftLint" lane :lint do swiftLint( config_file: "BuildScripts/.swiftlint.yml", strict: true, raise_if_swiftlint_error: true ) end desc "Run pod install" lane :pods do cocoapods( clean_install: true ) end desc "Run tests and generate code coverage using *****-dev scheme" lane :testDevScheme do run_tests( workspace: "*****.xcworkspace", scheme: "*****-dev", devices: ["iPhone 8", "iPad Pro (9.7-inch)"], code_coverage: true, disable_xcpretty: true, max_concurrent_simulators: 2, xcargs: "CI=true -usePackageSupportBuiltinSCM" ) end end`./fastlane/Appfile`
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app # apple_id("[[APPLE_ID]]") # Your Apple email address # For more information about the Appfile, see: # https://docs.fastlane.tools/advanced/#appfilefastlane gems
Gem Version Update-Status fastlane 2.178.0 ✅ Up-To-Date Loaded fastlane plugins:
No plugins Loaded
Loaded gems
Gem Version did_you_mean 1.4.0 slack-notifier 2.3.2 atomos 0.1.3 CFPropertyList 3.0.3 claide 1.0.3 colored2 3.1.2 nanaimo 0.3.0 xcodeproj 1.19.0 rouge 2.0.7 xcpretty 0.3.0 terminal-notifier 2.0.0 unicode-display_width 1.7.0 terminal-table 1.8.0 plist 3.6.0 public_suffix 4.0.6 addressable 2.7.0 multipart-post 2.0.0 word_wrap 1.0.0 tty-screen 0.8.1 tty-cursor 0.7.1 tty-spinner 0.9.3 artifactory 3.0.15 babosa 1.0.4 colored 1.2 highline 1.7.10 commander-fastlane 4.4.6 excon 0.79.0 faraday-net_http 1.0.1 ruby2_keywords 0.0.4 faraday 1.3.0 unf_ext 0.0.7.7 unf 0.1.4 domain_name 0.5.20190701 http-cookie 1.0.3 faraday-cookie_jar 0.0.7 faraday_middleware 1.0.0 fastimage 2.2.3 gh_inspector 1.1.3 mini_magick 4.11.0 naturally 2.2.1 rubyzip 2.3.0 security 0.1.3 xcpretty-travis-formatter 1.0.1 dotenv 2.7.6 bundler 2.1.4 simctl 1.6.8 jwt 2.2.2 uber 0.1.0 declarative 0.0.20 declarative-option 0.1.0 representable 3.0.4 retriable 3.1.2 mini_mime 1.0.2 multi_json 1.15.0 signet 0.15.0 memoist 0.16.2 os 1.1.1 googleauth 0.16.0 httpclient 2.8.3 google-api-client 0.38.0 google-cloud-env 1.5.0 google-cloud-errors 1.1.0 google-cloud-core 1.6.0 google-apis-core 0.3.0 google-apis-iamcredentials_v1 0.2.0 google-apis-storage_v1 0.3.0 rake 13.0.3 digest-crc 0.6.3 google-cloud-storage 1.31.0 emoji_regex 3.2.2 jmespath 1.4.0 aws-eventstream 1.1.1 aws-sigv4 1.2.3 aws-sdk-core 3.113.0 aws-sdk-kms 1.43.0 aws-sdk-s3 1.91.0 uri 0.10.0 json 2.5.1 rexml 3.2.4 webrick 1.7.0 aws-partitions 1.433.0 forwardable 1.3.1 logger 1.4.2 cgi 0.1.0 date 3.0.0 timeout 0.1.0 stringio 0.1.0 zlib 1.1.0 ipaddr 1.2.2 openssl 2.1.2 ostruct 0.2.0 strscan 1.0.3 delegate 0.1.0 fileutils 1.4.1 io-console 0.5.6 open3 0.1.0 singleton 0.1.0 yaml 0.1.0 psych 3.1.0 mutex_m 0.1.0 generated on: 2021-03-19
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 28
- Comments: 64 (2 by maintainers)
Logging into https://developer.apple.com/account allowed me to review the updated Apple Developer Program License Agreement and then successfully run fastlane match. *
Admin&Account Holderroles.That’s not the case for everyone, there are plenty of cases through this thread where that checkbox was ticked and people are still getting errors.
The issue here is that fastlane is not correctly processing and showing the error messages returned by Apple, and is instead crashing when it receives any error.
This crash presents in the same way regardless of what the error from Apple is, and so lots of people (including me) are coming to this thread and conflating a whole bunch of errors together.
As @ened first described, if anyone sees this error, the best thing to do is to go to the ruby file reported in the top line of the crash stack, and print out response.body before the crash occurs.
This will allow you to see the true error from Apple and hopefully take corrective action, which so far has included:
Hope this summary helps new people arriving at this thread until the error is fixed.
Bottom line: the crash is not the core issue, it just makes it harder to see what the issue is.
@lkraider If you look closely at your detail response you’ll see:
This ended up being the solution to my exact issue.
@archcorsair This was also my issue.
If someone encounters this error without having changed anything in the signing code/logic, then it’s fair to assume it’s probably because of the Program License Agreement that needs to be signed at developer.apple.com (logged-in as Account Holder).
Managed to fix this by making the account of the user signing in with match an ‘App Manager’ on Apple Connect (https://appstoreconnect.apple.com/access/users).
You will see the developer privileges change from ‘Download provisioning profiles’ -> ‘Create and delete certificates and profiles’.
Found this out by downgrading fastlane to 2.175.0, then the error message changed from the one stated above ‘undefined method for first’ in the description to ‘Access Denied’. Once the permissions changed it worked. Hope it helps.
Any updates on the fix? Has anyone from the Fastlane team looked into this issue?
As @mstobin pointed out, ensuring you have accepted the newly updated agreement is one of the reasons. Maybe add that to your list @mstobin ?
I have same error when I need to renew my developer program membership (99$).
The issue seems to be a ruby issue. Could be a compatibility between third-party libs. But at least, it would have been nice for a team member to try to reproduce and confirm this issue.
On Thu, Apr 22, 2021 at 10:23 AM pennal @.***> wrote:
In my case it’s supposed to be using
app-store-connect-apisince i’m settingAPP_STORE_CONNECT_API_KEY_PATHenv var with the correct path to my JSON file.Inspecting the error returned from match returned:
If I have time this weekend or next week I can PR a fix to handle this type of error:
Specifically, I think the body may need to be parsed differently here (
spaceship/lib/spaceship/connect_api/api_client.rb#214)Even IF the recommended solution works, the problem here is fastlane is expecting the error message to be an array, rather than a string. THAT needs to be fixed, still, to handle either use case. I have a similar error:
undefined method `map’ for “errors”:String
Happened here with register_devices:
the response.body was:
Not sure why it is not being parsed correctly, but I believe the fix for this would be to somehow fix the parsing of the response.
Oh never mind this was fixed already in https://github.com/fastlane/fastlane/pull/18766.
@archcorsair thanks, also, reading previous comments I was also able to determine the true error by cmd+click on the top location and
print response.bodyin the error handling for the match lane:@pixelknitter If you want to force a re-authentication you can delete the local
cookie. Path:/Users/<your user>/.fastlane/spaceship/<your login email>/cookieAfter deleting this file you should be prompted to login/authenticate again.
Looks like a misconfiguration on our end!
Once changed
to
The error went away. Not sure why this worked in the first place.
Installed Proxyman, set the listening port to 8888 and
export SPACESHIP_DEBUG=1before running fast lane. The request looks like:IOS_APP_INHOUSEis suspicious. The invocation of match in my Fastfile specifies thetypeto beappstore. Used to be fine. Looked at https://developer.apple.com/documentation/appstoreconnectapi/list_and_download_profiles, found the enum forprofileTypeis now:OK, perhaps this request needs to use
IOS_APP_STOREinstead ofIOS_APP_INHOUSE. Modified the request in Proxyman to read:And witnessed a HTTP 201 response. Now forking/modifying fastlane in hope that this is the actual root cause.
Thanks. For us, we were using fastlane version 2.182.0 and our linked developer account was only set up with “Developer” privileges in iOS Appstoreconnect. We granted Admin permissions to the account, which grants the ability to:
And this resolved the problem for us.
I didn’t see that error message when I rolled back to 2.176.0 – I am pretty sure I saw the same error message with both versions.
Rolling back to 2.176.0 had no effect for me with
fastlane match developer_idI also swapped from using Fastlane via Homebrew to using it via Bundler at the same time, so I don’t think the original installation source will be related either.
Has anyone from the fastlane team had a chance to look into this? Is there anything else that can be provided (logs, configs, etc) that may help with understanding the issue?
I have been testing this and as above, ‘Developer’ permissions do not work but ‘App Manager’ does for me. This is slightly better than ‘Admin’ or ‘Owner’ accounts being used.
After trying the old way, as mentioned by @wurstnudl, I’m still unable to get this going. Will keep researching this, but I think I’ve tried everything at this point.
Update: I have a small update. sigh does successfully finish when using the old way of authenticating. I now used FASTLANE_USER and FASTLANE_PASSWORD along with SPACESHIP_SKIP_2FA_UPGRADE=1 and did an unset on APP_STORE_CONNECT_API_KEY_PATH. As this is the legacy way of doing things, I’m pretty sure this is NOT the way to go.
Pretty sure there is a problem in or with the api key authentication.
I have exactly the same issue. None of the proposed solutions work so far. Also downgrading fastlane (tried down to 2.177.0) didn’t change anything.
I switched to app store connect api authentication. The api key has admin rights. Tried the env variable and the lane configuration.
I was trying to avoid making the account an admin if I could… Any way to minimize privileges?
On Tue, Apr 6, 2021 at 6:23 AM Denis Kushpil @.***> wrote:
– With Optimism, Eddie Freeman
Principle Consultant Wandering Hearth Studio direct - +1-805-242-3291
check if your apple developer account is admin or owner, had the same issue for the account with developer type after when switching to admin it goes well.
@michalsurynt by initialling the connection before using the match command in my lane. Docs: https://docs.fastlane.tools/app-store-connect-api/