fastlane / fastlane

๐Ÿš€ The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.66k stars 5.72k forks source link

Could not find a matching provisioning profile (using match!) #12878

Closed greghopkins closed 6 years ago

greghopkins commented 6 years ago

New Issue Checklist

Issue Description

When running locally, the configuration below is successful. When running in CircleCI, however, it fails.

I have compared the output of fastlane env on both - and there are minimal differences. I can include the differences if it is useful but, as an example, CircleCI uses XCode 9.4, I am using 9.4.1 - none of the differences (of which there are only a few) occur on major versions of anything.

The output captured below is from the run on CircleCI.

Ultimately, the error is:

Code Signing Error: No profiles for 'com.foo.bar' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.foo.bar'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.

This is strange because the mapping is well established a bit further up in the log.

DEBUG [2018-07-10 01:31:56.19]: Resulting in the following mapping:
DEBUG [2018-07-10 01:31:56.19]: {:"com.foo.bar"=>"match Development com.foo.bar"}
output

The way I read the log, it looks like match successfully installed the correct certs & profiles.

Complete output when running fastlane, including the stack trace and command used
bundle exec fastlane ios beta --verbose
^D^D[โ ‹] ๐Ÿš€ [โ ™] ๐Ÿš€ [โ น] ๐Ÿš€ [โ ธ] ๐Ÿš€ [โ ผ] ๐Ÿš€ [โ ด] ๐Ÿš€ [โ ฆ] ๐Ÿš€ [โœ”] ๐Ÿš€ 
Successfully loaded Appfile at path '/Users/distiller/mobile-app/fastlane/Appfile'
- app_identifier: 'com.foo.bar'
- apple_id: 'developer@coolplace.com'
- team_id: 'TEAMID1234'
-------
DEBUG [2018-07-10 01:31:53.97]: Checking if there are any plugins that should be loaded...
INFO [2018-07-10 01:31:54.16]: Driving the lane 'ios beta' ๐Ÿš€
INFO [2018-07-10 01:31:54.19]: -----------------------------
INFO [2018-07-10 01:31:54.19]: --- Step: setup_circle_ci ---
INFO [2018-07-10 01:31:54.19]: -----------------------------
INFO [2018-07-10 01:31:54.19]: Creating temporary keychain: "fastlane_tmp_keychain".
INFO [2018-07-10 01:31:54.48]: Enabling match readonly mode.
INFO [2018-07-10 01:31:54.48]: Skipping Log Path setup as FL_OUTPUT_DIR is unset
INFO [2018-07-10 01:31:54.50]: -------------------
INFO [2018-07-10 01:31:54.50]: --- Step: match ---
INFO [2018-07-10 01:31:54.50]: -------------------
true
INFO [2018-07-10 01:31:54.60]: Successfully loaded '/Users/distiller/mobile-app/fastlane/Matchfile' ๐Ÿ“„

+-----------------------+-----------------------------------------+
|           Detected Values from './fastlane/Matchfile'           |
+-----------------------+-----------------------------------------+
| git_url               | git@github.com:MyOrg/certificates.git |
| force_for_new_devices | true                                    |
+-----------------------+-----------------------------------------+

+-----------------------+-----------------------------------------+
|                    Summary for match 2.99.0                     |
+-----------------------+-----------------------------------------+
| type                  | development                             |
| git_url               | git@github.com:MyOrg/certificates.git |
| git_branch            | master                                  |
| app_identifier        | ["com.foo.bar"]             |
| username              | developer@coolplace.com                 |
| keychain_name         | fastlane_tmp_keychain                   |
| readonly              | true                                    |
| team_id               | TEAMID1234                              |
| verbose               | false                                   |
| force                 | false                                   |
| skip_confirmation     | false                                   |
| shallow_clone         | false                                   |
| clone_branch_directly | false                                   |
| force_for_new_devices | true                                    |
| skip_docs             | false                                   |
| platform              | ios                                     |
+-----------------------+-----------------------------------------+

INFO [2018-07-10 01:31:54.61]: Cloning remote git repo...
INFO [2018-07-10 01:31:54.61]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
INFO [2018-07-10 01:31:54.61]: $ GIT_TERMINAL_PROMPT=0 git clone 'git@github.com:MyOrg/certificates.git' '/var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180710-920-1l5gx0d'
INFO [2018-07-10 01:31:54.62]: โ–ธ Cloning into '/var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180710-920-1l5gx0d'...
INFO [2018-07-10 01:31:55.15]: โ–ธ remote: Counting objects: 109, done.
INFO [2018-07-10 01:31:55.16]: โ–ธ remote: Compressing objects: 100% (85/85), done.
INFO [2018-07-10 01:31:55.24]: โ–ธ remote: Total 109 (delta 14), reused 96 (delta 4), pack-reused 0
INFO [2018-07-10 01:31:55.24]: โ–ธ Receiving objects: 100% (109/109), 137.84 KiB | 2.60 MiB/s, done.
INFO [2018-07-10 01:31:55.24]: โ–ธ Resolving deltas: 100% (14/14), done.
INFO [2018-07-10 01:31:55.29]: ๐Ÿ”“  Decrypted '7LCPTDMY26.cer'
INFO [2018-07-10 01:31:55.29]: ๐Ÿ”“  Decrypted '7LCPTDMY26.p12'
INFO [2018-07-10 01:31:55.29]: ๐Ÿ”“  Decrypted 'Development_com.foo.bar.mobileprovision'
INFO [2018-07-10 01:31:55.29]: ๐Ÿ”“  Successfully decrypted certificates repo
INFO [2018-07-10 01:31:55.29]: Installing certificate...
INFO [2018-07-10 01:31:55.29]: $ security list-keychains -d user
INFO [2018-07-10 01:31:55.31]: โ–ธ     "/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db"
INFO [2018-07-10 01:31:55.31]: $ security find-certificate -c 'Apple Worldwide Developer Relations Certification Authority' /Users/distiller/Library/Keychains/fastlane_tmp_keychain-db
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
INFO [2018-07-10 01:31:55.34]: $ security list-keychains -d user
INFO [2018-07-10 01:31:55.36]: โ–ธ     "/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db"
DEBUG [2018-07-10 01:31:55.36]: Installing WWDR Cert: curl -f -o /var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/AppleWWDRCA20180710-920-2l4emt https://developer.apple.com/certificationauthority/AppleWWDRCA.cer && security import /var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/AppleWWDRCA20180710-920-2l4emt -k /Users/distiller/Library/Keychains/fastlane_tmp_keychain-db
INFO [2018-07-10 01:31:55.59]: โ–ธ 1 certificate imported.
INFO [2018-07-10 01:31:55.59]: โ–ธ 100  1062  100  1062    0     0   6910      0 --:--:-- --:--:-- --:--:--  6941
ERROR [2018-07-10 01:31:55.75]: There are no local code signing identities found.
You can run `security find-identity -v -p codesigning` 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.)
INFO [2018-07-10 01:31:55.75]: $ security import /var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180710-920-1l5gx0d/certs/development/7LCPTDMY26.cer -k '/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db' -P '' -T /usr/bin/codesign -T /usr/bin/security
INFO [2018-07-10 01:31:55.81]: โ–ธ 1 certificate imported.
INFO [2018-07-10 01:31:55.82]: $ security set-key-partition-list -S apple-tool:,apple: -k '' /Users/distiller/Library/Keychains/fastlane_tmp_keychain-db
security: SecItemCopyMatching: The specified item could not be found in the keychain.
INFO [2018-07-10 01:31:55.86]: $ security import /var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/d20180710-920-1l5gx0d/certs/development/7LCPTDMY26.p12 -k '/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db' -P '' -T /usr/bin/codesign -T /usr/bin/security
INFO [2018-07-10 01:31:55.93]: โ–ธ 1 key imported.
INFO [2018-07-10 01:31:55.95]: $ security set-key-partition-list -S apple-tool:,apple: -k '' /Users/distiller/Library/Keychains/fastlane_tmp_keychain-db
INFO [2018-07-10 01:31:55.99]: โ–ธ keychain: "/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db"
INFO [2018-07-10 01:31:55.99]: โ–ธ version: 512
INFO [2018-07-10 01:31:55.99]: โ–ธ class: 0x00000010 
INFO [2018-07-10 01:31:55.99]: โ–ธ attributes:
INFO [2018-07-10 01:31:55.99]: โ–ธ     <<<<>>>>

+-------------------+----------------------------------------------+
|                      Installed Certificate                       |
+-------------------+----------------------------------------------+
| User ID           | USERID1234                                   |
| Common Name       | iPhone Developer: iOS Developer (USERID5678) |
| Organisation Unit | TEAMID1234                                   |
| Organisation      | MyOrg, LLC                                 |
| Country           | US                                           |
| Start Datetime    | 2018-06-22 17:48:29 UTC                      |
| End Datetime      | 2019-06-22 17:48:29 UTC                      |
+-------------------+----------------------------------------------+

INFO [2018-07-10 01:31:56.00]: Installing provisioning profile...
WARN [2018-07-10 01:31:56.14]: Setting environment variable 'sigh_com.foo.bar_development' to ''
WARN [2018-07-10 01:31:56.14]: Setting environment variable 'sigh_com.foo.bar_development_team-id' to 'TEAMID1234'
WARN [2018-07-10 01:31:56.14]: Setting environment variable 'sigh_com.foo.bar_development_profile-name' to 'match Development com.foo.bar'
WARN [2018-07-10 01:31:56.14]: Setting environment variable 'sigh_com.foo.bar_development_profile-path' to '/Users/distiller/Library/MobileDevice/Provisioning Profiles/.mobileprovision'

+---------------------+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+
|                                                                                 Installed Provisioning Profile                                                                                 |
+---------------------+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+
| Parameter           | Environment Variable                                  | Value                                                                                                            |
+---------------------+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+
| App Identifier      |                                                       | com.foo.bar                                                                                          |
| Type                |                                                       | development                                                                                                      |
| Platform            |                                                       | ios                                                                                                              |
| Profile UUID        | sigh_com.foo.bar_development              |                                                                              |
| Profile Name        | sigh_com.foo.bar_development_profile-name | match Development com.foo.bar                                                                        |
| Profile Path        | sigh_com.foo.bar_development_profile-path | /Users/distiller/Library/MobileDevice/Provisioning Profiles/.mobileprovision |
| Development Team ID | sigh_com.foo.bar_development_team-id      | TEAMID1234                                                                                                       |
+---------------------+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+

INFO [2018-07-10 01:31:56.15]: All required keys, certificates and provisioning profiles are installed ๐Ÿ™Œ
INFO [2018-07-10 01:31:56.16]: Setting Provisioning Profile type to 'development'
INFO [2018-07-10 01:31:56.17]: -----------------
INFO [2018-07-10 01:31:56.17]: --- Step: gym ---
INFO [2018-07-10 01:31:56.17]: -----------------
DEBUG [2018-07-10 01:31:56.19]: Merging provisioning profile mappings
DEBUG [2018-07-10 01:31:56.19]: -------------------------------------
DEBUG [2018-07-10 01:31:56.19]: Primary provisioning profile mapping:
DEBUG [2018-07-10 01:31:56.19]: {}
DEBUG [2018-07-10 01:31:56.19]: Secondary provisioning profile mapping:
DEBUG [2018-07-10 01:31:56.19]: {:"com.foo.bar"=>"match Development com.foo.bar"}
DEBUG [2018-07-10 01:31:56.19]: Resulting in the following mapping:
DEBUG [2018-07-10 01:31:56.19]: {:"com.foo.bar"=>"match Development com.foo.bar"}
output
INFO [2018-07-10 01:31:56.19]: Successfully loaded '/Users/distiller/mobile-app/fastlane/Gymfile' ๐Ÿ“„

+------------------+--------------------------------------+
|        Detected Values from './fastlane/Gymfile'        |
+------------------+--------------------------------------+
| project          | platforms/ios/mobileapp.xcodeproj |
| output_directory | output                               |
+------------------+--------------------------------------+

INFO [2018-07-10 01:31:56.25]: $ xcodebuild -showBuildSettings -scheme mobileapp -project platforms/ios/mobileapp.xcodeproj
DEBUG [2018-07-10 01:31:58.81]: Parsing project file '/Users/distiller/mobile-app/platforms/ios/mobileapp.xcodeproj' to find selected provisioning profiles
DEBUG [2018-07-10 01:31:58.81]: Finding provision profiles for 'Release'
DEBUG [2018-07-10 01:31:58.84]: Merging provisioning profile mappings
DEBUG [2018-07-10 01:31:58.84]: -------------------------------------
DEBUG [2018-07-10 01:31:58.84]: Primary provisioning profile mapping:
DEBUG [2018-07-10 01:31:58.85]: {:"com.foo.bar"=>"match Development com.foo.bar"}
DEBUG [2018-07-10 01:31:58.85]: Secondary provisioning profile mapping:
DEBUG [2018-07-10 01:31:58.85]: {}
DEBUG [2018-07-10 01:31:58.85]: Resulting in the following mapping:
DEBUG [2018-07-10 01:31:58.85]: {:"com.foo.bar"=>"match Development com.foo.bar"}
INFO [2018-07-10 01:31:58.85]: Detected provisioning profile mapping: {:"com.foo.bar"=>"match Development com.foo.bar"}

+-------------------------------------------------------------+--------------------------------------------------------------+
|                                                   Summary for gym 2.99.0                                                   |
+-------------------------------------------------------------+--------------------------------------------------------------+
| export_method                                               | development                                                  |
| export_options.provisioningProfiles.com.foo.bar | match Development com.foo.bar                    |
| scheme                                                      | mobileapp                                                 |
| destination                                                 | generic/platform=iOS                                         |
| output_name                                                 | mobileapp                                                 |
| build_path                                                  | /Users/distiller/Library/Developer/Xcode/Archives/2018-07-10 |
| project                                                     | platforms/ios/mobileapp.xcodeproj                         |
| clean                                                       | false                                                        |
| output_directory                                            | output                                                       |
| silent                                                      | false                                                        |
| skip_package_ipa                                            | false                                                        |
| result_bundle                                               | false                                                        |
| buildlog_path                                               | ~/Library/Logs/gym                                           |
| skip_profile_detection                                      | false                                                        |
| xcode_path                                                  | /Applications/Xcode-9.4.app                                  |
+-------------------------------------------------------------+--------------------------------------------------------------+

+------------------------------------------------------------------------------------------------------------------------+----------------------+
|                                                            Generated Build Command                                                            |
+------------------------------------------------------------------------------------------------------------------------+----------------------+
| Option                                                                                                                 | Value                |
+------------------------------------------------------------------------------------------------------------------------+----------------------+
| set -o pipefail &&                                                                                                     |                      |
| xcodebuild                                                                                                             |                      |
| -scheme mobileapp                                                                                                   |                      |
| -project platforms/ios/mobileapp.xcodeproj                                                                          |                      |
| -destination                                                                                                           | generic/platform=iOS |
| -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2018-07-10/mobileapp\ 2018-07-10\ 01.31.58.xcarchive |                      |
| archive                                                                                                                |                      |
| | tee /Users/distiller/Library/Logs/gym/mobileapp-mobileapp.log                                                  |                      |
| | xcpretty                                                                                                             |                      |
+------------------------------------------------------------------------------------------------------------------------+----------------------+
INFO [2018-07-10 01:31:58.88]: $ set -o pipefail && xcodebuild -scheme mobileapp -project platforms/ios/mobileapp.xcodeproj -destination 'generic/platform=iOS' -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2018-07-10/mobileapp\ 2018-07-10\ 01.31.58.xcarchive archive | tee /Users/distiller/Library/Logs/gym/mobileapp-mobileapp.log | xcpretty
INFO [2018-07-10 01:32:00.07]: โ–ธ Building mobileapp/mobileapp [Release]
INFO [2018-07-10 01:32:00.14]: โ–ธ Check Dependencies
INFO [2018-07-10 01:32:00.36]: โ–ธ ** ARCHIVE FAILED **
INFO [2018-07-10 01:32:00.36]: โ–ธ The following build commands failed:
INFO [2018-07-10 01:32:00.36]: โ–ธ Check dependencies
INFO [2018-07-10 01:32:00.36]: โ–ธ (1 failure)
โ–ธ Building mobileapp/mobileapp [Release]
โ–ธ Check Dependencies
** ARCHIVE FAILED **

The following build commands failed:
Check dependencies
(1 failure)
ERROR [2018-07-10 01:32:00.41]: Exit status: 65
INFO [2018-07-10 01:32:00.43]: 
WARN [2018-07-10 01:32:00.43]: Maybe the error shown is caused by using the wrong version of Xcode
WARN [2018-07-10 01:32:00.43]: Found multiple versions of Xcode in '/Applications/'
WARN [2018-07-10 01:32:00.43]: Make sure you selected the right version for your project
WARN [2018-07-10 01:32:00.43]: This build process was executed using '/Applications/Xcode-9.4.app'
WARN [2018-07-10 01:32:00.43]: If you want to update your Xcode path, either
INFO [2018-07-10 01:32:00.43]: 
INFO [2018-07-10 01:32:00.43]: - Specify the Xcode version in your Fastfile
INFO [2018-07-10 01:32:00.43]: โ–ธ xcversion(version: "8.1") # Selects Xcode 8.1.0
INFO [2018-07-10 01:32:00.43]: 
INFO [2018-07-10 01:32:00.43]: - Specify an absolute path to your Xcode installation in your Fastfile
INFO [2018-07-10 01:32:00.43]: โ–ธ xcode_select "/Applications/Xcode8.app"
INFO [2018-07-10 01:32:00.43]: 
INFO [2018-07-10 01:32:00.43]: - Manually update the path using
INFO [2018-07-10 01:32:00.43]: โ–ธ sudo xcode-select -s /Applications/Xcode.app
INFO [2018-07-10 01:32:00.43]: 

+---------------+-----------------------------+
|              Build environment              |
+---------------+-----------------------------+
| xcode_path    | /Applications/Xcode-9.4.app |
| gym_version   | 2.99.0                      |
| export_method | development                 |
| sdk           | iPhoneOS11.4.sdk            |
+---------------+-----------------------------+

INFO [2018-07-10 01:32:00.46]: โ–ธ Check dependencies
INFO [2018-07-10 01:32:00.46]: โ–ธ Code Signing Error: No profiles for 'com.foo.bar' were found:  Xcode couldn't find any iOS App Development provisioning profiles matching 'com.foo.bar'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
INFO [2018-07-10 01:32:00.46]: โ–ธ Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.4'
INFO [2018-07-10 01:32:00.46]: โ–ธ Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.4'
INFO [2018-07-10 01:32:00.46]: 
ERROR [2018-07-10 01:32:00.46]: โฌ†๏ธ  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
WARN [2018-07-10 01:32:00.46]: ๐Ÿ“‹  For the complete and more detailed error log, check the full log at:
WARN [2018-07-10 01:32:00.46]: ๐Ÿ“‹  /Users/distiller/Library/Logs/gym/mobileapp-mobileapp.log
INFO [2018-07-10 01:32:00.48]: 
ERROR [2018-07-10 01:32:00.48]: Your `export_method` in gym is defined as `development`
ERROR [2018-07-10 01:32:00.48]: which might cause problems when signing your application
ERROR [2018-07-10 01:32:00.48]: Are you sure want to build and export for development?
ERROR [2018-07-10 01:32:00.48]: Please make sure to define the correct export methods when calling
ERROR [2018-07-10 01:32:00.48]: gym in your Fastfile or from the command line
INFO [2018-07-10 01:32:00.48]: 
INFO [2018-07-10 01:32:00.48]: 
ERROR [2018-07-10 01:32:00.48]: Looks like fastlane ran into a build/archive error with your project
ERROR [2018-07-10 01:32:00.48]: It's hard to tell what's causing the error, so we wrote some guides on how
ERROR [2018-07-10 01:32:00.48]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
ERROR [2018-07-10 01:32:00.48]: Before submitting an issue on GitHub, please follow the guide above and make
ERROR [2018-07-10 01:32:00.48]: sure your project is set up correctly.
ERROR [2018-07-10 01:32:00.48]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
ERROR [2018-07-10 01:32:00.48]: the full commands printed out in yellow in the above log.
ERROR [2018-07-10 01:32:00.48]: Make sure to inspect the output above, as usually you'll find more error information there
INFO [2018-07-10 01:32:00.48]: 
WARN [2018-07-10 01:32:00.48]: Lane Context:
INFO [2018-07-10 01:32:00.48]: {:PLATFORM_NAME=>:ios, :LANE_NAME=>"ios beta", :ORIGINAL_DEFAULT_KEYCHAIN=>"\"/Users/distiller/Library/Keychains/login.keychain-db\"", :SIGH_PROFILE_TYPE=>"development", :MATCH_PROVISIONING_PROFILE_MAPPING=>{"com.foo.bar"=>"match Development com.foo.bar"}}
ERROR [2018-07-10 01:32:00.48]: Error building the application - see the log above
INFO [2018-07-10 01:32:00.49]: Successfully generated documentation at path '/Users/distiller/mobile-app/fastlane/README.md'

+------+-----------------+-------------+
|           fastlane summary           |
+------+-----------------+-------------+
| Step | Action          | Time (in s) |
+------+-----------------+-------------+
| 1    | setup_circle_ci | 0           |
| 2    | match           | 1           |
| ๐Ÿ’ฅ   | gym             | 4           |
+------+-----------------+-------------+

ERROR [2018-07-10 01:32:00.49]: fastlane finished with errors
bundler: failed to load command: fastlane (/Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/bin/fastlane)
FastlaneCore::Interface::FastlaneBuildFailure: [!] Error building the application - see the log above
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane_core/lib/fastlane_core/ui/interface.rb:163:in `build_failure!'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/gym/lib/gym/error_handler.rb:73:in `handle_build_error'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/gym/lib/gym/runner.rb:97:in `block in build_app'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane_core/lib/fastlane_core/command_executor.rb:93:in `execute'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/gym/lib/gym/runner.rb:93:in `build_app'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/gym/lib/gym/runner.rb:18:in `run'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/gym/lib/gym/manager.rb:19:in `work'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/actions/build_ios_app.rb:64:in `run'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/runner.rb:253:in `block (2 levels) in execute_action'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/runner.rb:232:in `block in execute_action'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/fast_file.rb:149:in `method_missing'
  Fastfile:8:in `block (2 levels) in parsing_binding'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/lane.rb:33:in `call'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:74:in `run!'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/commands_generator.rb:333:in `run'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/fastlane/lib/fastlane/cli_tools_distributor.rb:108:in `take_off'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/gems/fastlane-2.99.0/bin/fastlane:20:in `'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/bin/fastlane:23:in `load'
  /Users/distiller/mobile-app/vendor/bundle/ruby/2.4.0/bin/fastlane:23:in `'
Exited with code 1

Environment

โœ… fastlane environment โœ… ### Stack | Key | Value | | --------------------------- | -------------------------------------------------- | | OS | 10.13.3 | | Ruby | 2.4.4 | | Bundler? | true | | Git | git version 2.17.1 | | Installation Source | ~/mobile-app/vendor/bundle/ruby/2.4.0/bin/fastlane | | Host | Mac OS X 10.13.3 (17D102) | | Ruby Lib Dir | ~/.rubies/ruby-2.4.4/lib | | OpenSSL Version | OpenSSL 1.0.2o 27 Mar 2018 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Applications/Xcode-9.4.app/Contents/Developer/ | | Xcode Version | 9.4 | ### System Locale | Variable | Value | | | -------- | ----- |- | | LANG | en_US.UTF-8 | โœ… | | LC_ALL | en_US.UTF-8 | โœ… | | LANGUAGE | | | ### fastlane files:
`./fastlane/Fastfile` ```ruby platform :ios do before_all do setup_circle_ci end lane :beta do match type: 'development' gym export_method: 'development' end end ```
`./fastlane/Appfile` ```ruby app_identifier 'com.foo.bar' apple_id 'developer@coolplace.com' team_id 'TEAMID1234' ```
`./fastlane/Gymfile` ```ruby project 'platforms/ios/mobileapp.xcodeproj' output_directory 'output' ```
`./fastlane/Matchfile` ```ruby git_url 'git@github.com:MyOrg/certificates.git' force_for_new_devices true ```
### fastlane gems | Gem | Version | Update-Status | | -------- | ------- | ------------- | | fastlane | 2.99.0 | โœ… Up-To-Date | ### Loaded fastlane plugins: **No plugins Loaded**
Loaded gems | Gem | Version | | ------------------------- | ------------ | | did_you_mean | 1.1.0 | | bundler | 1.16.2 | | io-console | 0.4.6 | | CFPropertyList | 3.0.0 | | concurrent-ruby | 1.0.5 | | i18n | 0.9.5 | | minitest | 5.11.3 | | thread_safe | 0.3.6 | | tzinfo | 1.2.5 | | activesupport | 4.2.10 | | public_suffix | 2.0.5 | | addressable | 2.5.2 | | atomos | 0.1.2 | | babosa | 1.0.2 | | claide | 1.0.2 | | fuzzy_match | 2.0.4 | | nap | 1.1.0 | | cocoapods-core | 1.5.3 | | cocoapods-deintegrate | 1.0.2 | | cocoapods-downloader | 1.2.1 | | cocoapods-plugins | 1.0.0 | | cocoapods-search | 1.0.0 | | cocoapods-stats | 1.0.0 | | netrc | 0.11.0 | | cocoapods-trunk | 1.3.0 | | cocoapods-try | 1.1.0 | | colored2 | 3.1.2 | | escape | 0.0.4 | | fourflusher | 2.0.1 | | gh_inspector | 1.1.3 | | molinillo | 0.6.5 | | ruby-macho | 1.2.0 | | nanaimo | 0.2.6 | | xcodeproj | 1.5.9 | | cocoapods | 1.5.3 | | colored | 1.2 | | highline | 1.7.10 | | commander-fastlane | 4.4.6 | | declarative | 0.0.10 | | declarative-option | 0.1.0 | | unf_ext | 0.0.7.5 | | unf | 0.1.4 | | domain_name | 0.5.20180417 | | dotenv | 2.5.0 | | emoji_regex | 0.1.1 | | excon | 0.62.0 | | multipart-post | 2.0.0 | | faraday | 0.15.2 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | faraday_middleware | 0.12.2 | | fastimage | 2.1.3 | | jwt | 2.1.0 | | little-plugger | 1.1.4 | | multi_json | 1.13.1 | | logging | 2.2.2 | | memoist | 0.16.0 | | os | 0.9.6 | | signet | 0.8.1 | | googleauth | 0.6.2 | | httpclient | 2.8.3 | | mime-types-data | 3.2016.0521 | | mime-types | 3.1 | | uber | 0.1.0 | | representable | 3.0.4 | | retriable | 3.1.2 | | google-api-client | 0.21.2 | | json | 2.1.0 | | mini_magick | 4.5.1 | | multi_xml | 0.6.0 | | plist | 3.4.0 | | rubyzip | 1.2.1 | | security | 0.1.3 | | naturally | 2.2.0 | | simctl | 1.6.5 | | slack-notifier | 2.3.2 | | terminal-notifier | 1.8.0 | | unicode-display_width | 1.4.0 | | terminal-table | 1.8.0 | | tty-screen | 0.6.4 | | tty-cursor | 0.5.0 | | tty-spinner | 0.8.0 | | word_wrap | 1.0.0 | | rouge | 2.0.7 | | xcpretty | 0.2.8 | | xcpretty-travis-formatter | 1.0.0 |
*generated on:* **2018-07-10**
johnknapprs commented 6 years ago

The failure is in your project configuration. Match is pulling the cert/profile, but it's not set in your xcodeproj file. Check out the docs codesigning guide on ways to solve that.

greghopkins commented 6 years ago

@johnknapprs While I provided the info for the failing run on CircleCI, the local execution, with the exact same XCode project, works just fine. I've been through the codesigning docs - which was how I got the thing running locally.

Thiryn commented 6 years ago

Got this problem (a few times) as well, I usually do two things :

nullify005 commented 6 years ago

Hey @greghopkins,

I've been encountering the same thing recently on Travis & have found that you need all the provisioning profiles / certs which you are referencing in the Xcode project in order to use a provisioning profile not specified in the xcode project.

Locally fastlane works fine because you have all the profiles present, but this isn't the case in the CI (potentially)

What I do now is use match to pull in all the profiles then run fastlane.

This then allows me to use the Release configuration to export with say a Development or Adhoc profile even though Xcode says the Release configuration should use Appstore.

What I think happens is that gym builds the whole app, exports it & then resigns it. Because it does the export it needs the Xcode specified profile, then applies the profile you specified.

Regards, Lee

fastlane-bot commented 6 years ago

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:

fastlane-bot commented 6 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1: