fastlane Running match development fails after match appstore - Ruby

New Issue Checklist

Issue Description

After running the command fastlane match appstore successfully (I can see the certificate and profile in my private git repo), I tried running fastlane match development but it fails.

Command executed

fastlane match development

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

 username@MacBook-Air-de-Erik ios % fastlane match development 
[βœ”] πŸš€ +--------------+--------------------------------------------------+ | Detected Values from './fastlane/Matchfile' | +--------------+--------------------------------------------------+ | giturl | https://github.com/path/repo.git | | storagemode | git | | type | development | +--------------+--------------------------------------------------+

+--------------------------------+--------------------------------------------------+ | Summary for match 2.180.1 | +--------------------------------+--------------------------------------------------+ | type | development | | readonly | false | | generateapplecerts | true | | skipprovisioningprofiles | false | | appidentifier | ["com.company.app"] | | username | email@domain.com | | teamid | 27FWS3RF6S | | storagemode | git | | giturl | https://github.com/path/repo.git | | gitbranch | master | | shallowclone | false | | clonebranchdirectly | false | | keychainname | login.keychain | | force | false | | forcefornewdevices | false | | skipconfirmation | false | | skipdocs | false | | platform | ios | | derivecatalystappidentifier | false | | failonnametaken | false | | skipcertificatematching | false | | skipsetpartition_list | false | | verbose | false | +--------------------------------+--------------------------------------------------+

+-------------------------+--------------------------------------------------------------+ | Summary for cert 2.180.1 | +-------------------------+--------------------------------------------------------------+ | platform | ios | | development | true | | generateapplecerts | true | | force | true | | username | email@company.com | | teamid | 27FWS3RF6S | | keychainpath | /Users/username/Library/Keychains/login.keychain-db | | skipsetpartition_list | false | +-------------------------+--------------------------------------------------------------+

[βœ”] Setting key partition list... (this can take a minute if there are a lot of keys installed) [βœ”] Setting key partition list... (this can take a minute if there are a lot of keys installed) +-------------------------------------+---------------------------------------+ | Summary for sigh 2.180.1 | +-------------------------------------+---------------------------------------+ | appidentifier | com.company.app | | username | email@domain.com | | force | false | | certid | AP4CA9Y8AM | | provisioningname | match Development com.company.app | | ignoreprofileswithdifferentname | true | | teamid | 27FWS3RF6S | | failonnametaken | false | | platform | ios | | development | true | | adhoc | false | | developerid | false | | skipinstall | false | | skipfetchprofiles | false | | skipcertificate_verification | false | | readonly | false | +-------------------------------------+---------------------------------------+

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

Traceback (most recent call last): 27: from /usr/local/bin/fastlane:23:in <main>' 26: from /usr/local/bin/fastlane:23:inload' 25: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/bin/fastlane:23:in <top (required)>' 24: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/fastlane/lib/fastlane/cli_tools_distributor.rb:114:intakeoff' 23: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/commandsgenerator.rb:25:in start' 22: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/commands_generator.rb:187:inrun' 21: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in run!' 20: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:inrun!' 19: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in run_active_command' 18: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:inrun' 17: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in call' 16: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/commands_generator.rb:68:inblock (3 levels) in run' 15: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/runner.rb:109:in run' 14: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/runner.rb:109:ineach' 13: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/runner.rb:110:in block in run' 12: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/runner.rb:110:inloop' 11: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/runner.rb:111:in block (2 levels) in run' 10: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/runner.rb:270:infetchprovisioningprofile' 9: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/match/lib/match/generator.rb:108:in generate_provisioning_profile' 8: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/sigh/lib/sigh/manager.rb:8:instart' 7: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/sigh/lib/sigh/runner.rb:52:in run' 6: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/sigh/lib/sigh/runner.rb:186:increateprofile!' 5: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/spaceship/lib/spaceship/connectapi/models/profile.rb:76:in create' 4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:inpostprofiles' 3: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/spaceship/lib/spaceship/connectapi/provisioning/provisioning.rb:185:in post_profiles' 2: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/spaceship/lib/spaceship/connect_api/provisioning/client.rb:37:inpost' 1: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/spaceship/lib/spaceship/connectapi/provisioning/client.rb:73:in proxy_post' /Library/Ruby/Gems/2.6.0/gems/fastlane-2.180.1/spaceship/lib/spaceship/connect_api/api_client.rb:194:inhandleresponse': [!] { (Spaceship::UnexpectedResponse) "errors" : [ { "id" : "98f5580d-9427-40c3-b8c7-69b1d02e3a58", "status" : "409", "code" : "ENTITY_ERROR", "title" : "There is a problem with the request entity", "detail" : "There are no current IOS devices on this team matching the provided device IDs." } ] }

Environment

 
βœ… fastlane environment βœ…

Stack

Key Value
OS 11.2.3
Ruby 2.6.3
Bundler? false
Git git version 2.24.3 (Apple Git-128)
Installation Source /usr/local/bin/fastlane
Host macOS 11.2.3 (20D91)
Ruby Lib Dir /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
OpenSSL Version LibreSSL 2.8.3
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 12.4

System Locale

Variable Value
LANG en_US.UTF-8 βœ…
LC_ALL en_US.UTF-8 βœ…
LANGUAGE en_US.UTF-8 βœ…

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 "Update build number"
  lane :version do
    increment_build_number(xcodeproj: "Versus.xcodeproj")
  end

  desc "Push a new beta build to TestFlight"
  lane :beta do
    increment_build_number(xcodeproj: "Versus.xcodeproj")
    get_certificates( # Create or get certificate, and install it
      output_path: "./builds" # Download certificate in the build folder (you don't need to create the folder)
    )
    get_provisioning_profile( # Create or get provisioning profile
      output_path: "./builds",  # Download provisioning profile in the build folder
      filename: "versusProfile.mobileprovision" # Rename the local provisioning profile
    )
    update_project_provisioning( # Set the project provisioning profile (related in Xcode to the General > Signing Release section)
      xcodeproj: "Versus.xcodeproj",
      target_filter: "Versus", # Name of your project
      profile: "./builds/versusProfile.mobileprovision",
      build_configuration: "Release"
    )
    update_project_team( # Set the right team on your project
      teamid: CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
    )
    build_app(
        workspace: "Versus.xcworkspace",
        scheme: "Versus",
        clean: true,
        export_method: "app-store",
        export_options: {
          provisioningProfiles: {
              CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) => CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) + " AppStore" # Value of this parameter is the name of the Provisioning Profile. By default, it will be "{bundleId} AppStore"
          }
        },
        build_path: "./builds",
        output_directory: "./builds"
    )
    upload_to_testflight
  end

  desc "Build for ios on CI system"
  lane :build do |options|
      # Creates .env file with staging configuration
      sh %Q{cd ../../ && cp envs/.env.staging ./.env && cd -}
      # Create a custom keychain for code signing
      create_keychain(
        name: 'keychain',
        password: 'password',
        default_keychain: true,
        unlock: true,
        timeout: 3600,
        add_to_search_list: true
      )

      match(
        storage_mode: 'git',
        type: "appstore",
        keychain_name: 'keychain',
        keychain_password: 'password',
        readonly: true,
        git_url: '*******' ## where secrets is hosted.
      )

      # Building the iOS app
      gym(
        workspace: "./Versus.xcworkspace",
        scheme: "Versus",
        clean: true,
        export_method: "app-store",
        include_bitcode: true,
        include_symbols: true,
        silent: true
      )
  end

  desc "Upload to testflight on CI system"
  lane :testflight_release_to_app_store do |options|
    build
    upload_to_testflight(
      skip_submission: true,
      skip_waiting_for_build_processing: true
    )
  end

  desc "Upload to production on CI system"
  lane :production_release_to_app_store do |options|
    build
    upload_to_app_store(
      skip_screenshots: true,
      skip_metadata: true
    )
  end

end

./fastlane/Appfile

app_identifier("*******") # The bundle identifier of your app
apple_id("*********") # Your Apple email address

itc_team_id("*********") # App Store Connect Team ID
team_id("***********") # Developer Portal Team ID

# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

Gem Version Update-Status
fastlane 2.180.1 βœ… Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems

Gem Version
didyoumean 1.3.0
slack-notifier 2.3.2
atomos 0.1.3
CFPropertyList 2.3.6
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
json 2.1.0
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.4.0
google-cloud-errors 1.0.1
google-cloud-core 1.5.0
rexml 3.1.9
webrick 1.4.2
google-apis-core 0.2.1
google-apis-iamcredentials_v1 0.1.0
google-apis-storage_v1 0.2.0
rake 12.3.2
digest-crc 0.6.3
google-cloud-storage 1.30.0
emoji_regex 3.2.2
jmespath 1.4.0
aws-partitions 1.431.0
aws-eventstream 1.1.1
aws-sigv4 1.2.3
aws-sdk-core 3.112.1
aws-sdk-kms 1.42.0
aws-sdk-s3 1.89.0
forwardable 1.2.0
logger 1.3.0
date 2.0.0
stringio 0.0.2
zlib 1.0.0
ipaddr 1.2.2
openssl 2.1.2
ostruct 0.1.0
strscan 1.0.0
fileutils 1.1.0
etc 1.0.1
io-console 0.4.7
libxml-ruby 3.1.0
psych 3.1.0
mutex_m 0.1.0

generated on: 2021-04-12

Asked Jun 14 '22 15:06
avatar Ovsdrak
Ovsdrak

10 Answer:

Thanks @lucgrabowski , I'll do a test today and check if that solves my problem, if so, I'll close this issue.

1
Answered Jun 17 '21 at 18:27
avatar  of Ovsdrak
Ovsdrak

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

This issue will be auto-closed if there is no reply within 1 month.

1
Answered May 22 '21 at 17:32
avatar  of fastlane-bot
fastlane-bot

It causes the match operation to fail when building the app.

skylightpaycard

1
Answered Jun 16 '21 at 12:14
avatar  of Morenom0
Morenom0

Hi @Ovsdrak, could you login to developer.apple.com, go to Certificates, Identifiers & Profiles - Devices and check if you have this device registered there? Isn't it blocked with

Before adding new devices, make sure your device list is updated for the new membership year. You have the option to remove devices from your list.

1
Answered Jun 17 '21 at 16:36
avatar  of lucgrabowski
lucgrabowski

Hi @lucgrabowski, both certificates are there, distribution and development.

1
Answered Jun 17 '21 at 17:00
avatar  of Ovsdrak
Ovsdrak

I meant devices tab in developer.apple.com, as there is a list of registered devices that later can be supported by development provisioning profile that you try to create. Is this list blocked? Do you have device from error registered on the list? ``` "errors" : [ {

"id" : "98f5580d-9427-40c3-b8c7-69b1d02e3a58",

"status" : "409",

"code" : "ENTITY_ERROR",

"title" : "There is a problem with the request entity",

"detail" : "There are no current IOS devices on this team matching the provided device IDs."

} ]

}

1
Answered Jun 17 '21 at 17:05
avatar  of lucgrabowski
lucgrabowski

There are no devices in the devices tab. Mmm... I don't know which device should I register in this section, I did not connect any iPhone to my computer at the time I ran the command. Should it works with any device?

1
Answered Jun 17 '21 at 17:51
avatar  of Ovsdrak
Ovsdrak

Development profiles are used to run apps from Xcode on test devices (only on those specified in the profile). To be able to generate development provisioning profile you need to have development certificate and at least one device registered in developer portal. It's not possible to generate a development profile without any devices available. You could register any iPhone that you have available for development.

1
Answered Jun 17 '21 at 18:24
avatar  of lucgrabowski
lucgrabowski

Exactly what I needed! You just saved me several hours. Thanks!


SkylightPaycard

1
Answered Jun 13 '22 at 08:06
avatar  of skylightpaycard blog
skylightpaycard blog

good and interesting article content, besides that you can access related articles at the following url: https://news.unair.ac.id/2021/08/16/angkat-ide-penggunaan-gen-crispr-cas9-delegasi-fk-unair-sabet-juara-3-medjonson-fk-umy/?lang=id

1
Answered Jun 14 '22 at 03:06
avatar  of yusuf taufik
yusuf taufik