fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.29k stars 5.67k forks source link

Code signature it's taking ages #6906

Closed lucatorella closed 7 years ago

lucatorella commented 7 years ago

New Issue Checklist

Issue Description

Since a few days (maybe since I updated to macOS Sierra 10.12.1 or Xcode 8.1) fastlane is taking a lot time, in particular code signing is taking ages. I checked if there are multiple copies of my signing certificate as suggested somewhere else, but everything seems fine.

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

The following one in particular are the steps that took incredible long time:

[10:02:17]: â–¸ Running script '[CP] Embed Pods Frameworks'
[10:10:25]: â–¸ Running script '[CP] Copy Pods Resources'
[10:19:03]: $ /usr/bin/xcrun /usr/local/lib/ruby/gems/2.3.0/gems/gym-1.11.3/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/1f/z5p2sv815757zxp5b7pjn3h40000gn/T/gym_config20161108-79461-f3p6cg.plist' -archivePath /Users/administrator/Library/Developer/Xcode/Archives/2016-11-08/MyApp\ 2016-11-08\ 09.56.19.xcarchive -exportPath '/var/folders/1f/z5p2sv815757zxp5b7pjn3h40000gn/T/gym_output20161108-79461-1t2zd3n' 
[10:54:39]: Compressing 10 dSYM(s)

Environment

🚫 fastlane environment 🚫 ### Stack | Key | Value | | ------------------- | ------------------------------------------- | | OS | 10.12.1 | | Ruby | 2.3.0 | | Bundler? | true | | Xcode Path | /Applications/Xcode.app/Contents/Developer/ | | Xcode Version | 8.1 | | Git | git version 2.9.3 (Apple Git-75) | | Installation Source | /usr/local/bin/fastlane | | Host | Mac OS X 10.12.1 (16B2555) | | Ruby Lib Dir | /usr/local/Cellar/ruby/2.3.0/lib | | OpenSSL Version | OpenSSL 1.0.2e 3 Dec 2015 | ### fastlane files:
`./fastlane/Fastfile` ```ruby # Customise this file, documentation can be found here: # https://github.com/fastlane/fastlane/tree/master/docs # All available actions: https://github.com/fastlane/fastlane/blob/master/docs/Actions.md # can also be listed using the `fastlane actions` command # Change the syntax highlighting to Ruby # All lines starting with a # are ignored when running `fastlane` # By default, fastlane will send which actions are used # No personal data is shared, more information on https://github.com/fastlane/enhancer # Uncomment the following line to opt out # opt_out_usage # If you want to automatically update fastlane if a new version is available: # update_fastlane # This is the minimum version number required. # Update this, if you use features of a newer version fastlane_version "1.100.0" default_platform :ios platform :ios do before_all do bundle_install # cocoapods end desc "Runs all the tests" lane :test do ENV["FASTLANE_XCODE_LIST_TIMEOUT"] = "60" scan( workspace: "MyApp.xcworkspace", scheme: "MyApp", output_directory: "fastlane/test_output/", output_types: "", clean: true, code_coverage: true, device: "iPhone 6s Plus", fail_build: false, # set to false if using trainer xcargs: "CODE_SIGNING_REQUIRED='NO'" ) trainer( extension: ".junit", output_directory: "fastlane/test_output/" ) slather( workspace: "MyApp.xcworkspace", proj: "MyApp.xcodeproj", scheme: "MyApp", cobertura_xml: true, ignore: ["../../*", "MyApp/Plugins/*"], output_directory: "test_output/code_coverage/" ) end desc "Submit a new snapshot of the develop branch to crashlytics" lane :beta do version = get_version_number increment_build_number(build_number: version) increment_version_number(version_number: ENV['BUILD_NUMBER']) badge_text = version + "-" + ENV['BUILD_NUMBER'] + "-blue" badge( no_badge: true, dark: true, shield_no_resize: false, shield: badge_text, ) copy_provisioning_profile(mobileprovision: "Jenkins/Cloudbuild_Test.mobileprovision") unlock_keychain( path: "/Users/administrator/Library/Keychains/cloudbuild.keychain", password: "enHTAj3B7P" ) gym( scheme: "MyApp", workspace: "MyApp.xcworkspace", export_method: "enterprise", include_bitcode: false, include_symbols: true, configuration: 'Release', output_directory: "build/", xcargs: "DEVELOPMENT_TEAM='yyyy'\ PROVISIONING_PROFILE_SPECIFIER='Cloud Develop-Build Enterprise'\ APP_BUNDLE_IDENTIFIER='com.xxx.cloudbuild' \ DISPLAY_NAME='MyApp RC' \ CONFIG_PLIST='Staging-Config' \ DEVELOPER_MODE='YES'", ) end lane :testflightUpload do gym( scheme: "MyApp", workspace: "MyApp.xcworkspace", export_method: "app-store", include_bitcode: true, include_symbols: true, configuration: 'Store', clean: true, xcargs: "DEVELOPMENT_TEAM='yyyy'\ PROVISIONING_PROFILE_SPECIFIER='MyAppAppStoreDistribution'\ CONFIG_PLIST='Production-Config'", ) pilot end desc "Create a new develop app" lane :develop do version = get_version_number increment_build_number(build_number: version) increment_version_number(version_number: ENV['BUILD_NUMBER']) badge_text = version + "-" + ENV['BUILD_NUMBER'] + "-orange" badge( alpha: true, dark: true, shield_no_resize: false, shield: badge_text, ) copy_provisioning_profile(mobileprovision: "Jenkins/MyApp_Dev.mobileprovision") unlock_keychain( path: "/Users/administrator/Library/Keychains/cloudbuild.keychain", password: "enHTAj3B7P" ) gym( scheme: "MyApp", workspace: "MyApp.xcworkspace", export_method: "development", include_bitcode: false, include_symbols: true, output_directory: "build/", configuration: 'Debug', clean: true, xcargs: "-arch='armv7' \ DEVELOPMENT_TEAM='yyyy'\ PROVISIONING_PROFILE_SPECIFIER='MyApp Dev'\ APP_BUNDLE_IDENTIFIER='com.xxx.MyApp-dev' \ DISPLAY_NAME='MyApp Web Dev' \ CONFIG_PLIST='Staging-Config' \ DEVELOPER_MODE='YES'", ) end desc "Create a new calabash app with web inspector" lane :calabash do version = get_version_number increment_build_number(build_number: version) increment_version_number(version_number: ENV['BUILD_NUMBER']) badge_text = version + "-" + ENV['BUILD_NUMBER'] + "-green" badge( alpha: true, dark: true, shield_no_resize: false, shield: badge_text, ) copy_provisioning_profile(mobileprovision: "Jenkins/Calabash_Dev.mobileprovision") unlock_keychain( path: "/Users/administrator/Library/Keychains/cloudbuild.keychain", password: "enHTAj3B7P" ) gym( scheme: "MyApp-cal", workspace: "MyApp.xcworkspace", export_method: "development", include_bitcode: false, include_symbols: true, output_directory: "build/", configuration: 'Debug', clean: true, xcargs: "-arch='armv7' \ DEVELOPMENT_TEAM='yyyy'\ PROVISIONING_PROFILE_SPECIFIER='MyApp Calabash Dev'\ APP_BUNDLE_IDENTIFIER='com.xxx.MyApp-cal' \ DISPLAY_NAME='MyApp Calabash' \ CONFIG_PLIST='Staging-Config' \ DEVELOPER_MODE='YES'", ) end after_all do |lane| # This block is called, only if the executed lane was successful # slack( # message: "Successfully deployed new App Update." # ) end error do |lane, exception| # slack( # message: exception.message, # success: false # ) end end # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/docs/Platforms.md # All available actions: https://github.com/fastlane/fastlane/blob/master/docs/Actions.md ```
### fastlane gems | Gem | Version | Update-Status | | ------------------- | ------- | ------------- | | credentials_manager | 0.16.2 | ✅ Up-To-Date | | fastlane_core | 0.53.0 | ✅ Up-To-Date | | spaceship | 0.37.0 | ✅ Up-To-Date | | cert | 1.4.3 | ✅ Up-To-Date | | deliver | 1.15.0 | ✅ Up-To-Date | | frameit | 3.0.0 | ✅ Up-To-Date | | gym | 1.12.0 | ✅ Up-To-Date | | sigh | 1.11.2 | ✅ Up-To-Date | | match | 0.10.0 | ✅ Up-To-Date | | pem | 1.4.0 | ✅ Up-To-Date | | pilot | 1.12.0 | ✅ Up-To-Date | | produce | 1.3.0 | ✅ Up-To-Date | | scan | 0.14.1 | ✅ Up-To-Date | | screengrab | 0.5.5 | ✅ Up-To-Date | | snapshot | 1.16.3 | ✅ Up-To-Date | | supply | 0.7.1 | ✅ Up-To-Date | | fastlane | 1.107.0 | ✅ Up-To-Date | ### Loaded fastlane plugins: | Plugin | Version | Update-Status | | ----------------------- | ------- | ------------- | | fastlane-plugin-trainer | 0.2.0 | ✅ Up-To-Date |
Loaded gems | Gem | Version | | ------------------------- | ------------ | | did_you_mean | 1.0.0 | | bundler | 1.12.5 | | io-console | 0.4.5 | | CFPropertyList | 2.3.3 | | i18n | 0.7.0 | | json | 1.8.3 | | minitest | 5.9.1 | | thread_safe | 0.3.5 | | tzinfo | 1.2.2 | | activesupport | 4.2.7.1 | | public_suffix | 2.0.4 | | addressable | 2.5.0 | | awesome_print | 1.7.0 | | babosa | 1.0.2 | | fastimage | 1.6.8 | | colored | 1.2 | | highline | 1.7.8 | | commander | 4.4.0 | | security | 0.1.3 | | credentials_manager | 0.16.2 | | excon | 0.54.0 | | gh_inspector | 1.0.2 | | multi_json | 1.12.1 | | plist | 3.1.0 | | rubyzip | 1.1.7 | | terminal-table | 1.4.5 | | fastlane_core | 0.53.0 | | mini_magick | 4.5.1 | | badge | 0.4.2 | | builder | 3.2.2 | | gherkin | 4.0.0 | | cucumber-core | 1.5.0 | | cucumber-wire | 0.0.1 | | diff-lcs | 1.2.5 | | multi_test | 0.1.2 | | cucumber | 2.4.0 | | edn | 1.1.1 | | geocoder | 1.4.0 | | httpclient | 2.8.2.4 | | command_runner_ng | 0.1.0 | | thor | 0.19.1 | | run_loop | 2.1.9 | | rack | 1.6.4 | | rack-protection | 1.5.3 | | tilt | 2.0.5 | | sinatra | 1.4.7 | | sim_launcher | 0.4.13 | | slowhandcuke | 0.0.3 | | calabash-cucumber | 0.18.2 | | multipart-post | 2.0.0 | | faraday | 0.9.2 | | unf_ext | 0.0.7.2 | | unf | 0.1.4 | | domain_name | 0.5.20161021 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | faraday_middleware | 0.10.0 | | multi_xml | 0.5.5 | | claide | 1.0.1 | | clamp | 0.6.5 | | fuzzy_match | 2.0.4 | | nap | 1.1.0 | | cocoapods-core | 1.1.1 | | cocoapods-deintegrate | 1.0.1 | | cocoapods-downloader | 1.1.2 | | cocoapods-plugins | 1.0.0 | | cocoapods-search | 1.0.0 | | cocoapods-stats | 1.0.0 | | netrc | 0.7.8 | | cocoapods-trunk | 1.1.1 | | cocoapods-try | 1.1.0 | | escape | 0.0.4 | | fourflusher | 2.0.1 | | molinillo | 0.5.3 | | nanaimo | 0.2.2 | | xcodeproj | 1.4.1 | | cocoapods | 1.1.1 | | coderay | 1.1.1 | | dotenv | 2.1.1 | | rouge | 1.11.1 | | xcpretty | 0.2.4 | | net-ssh | 3.2.0 | | net-sftp | 2.1.2 | | krausefx-shenzhen | 0.14.10 | | slack-notifier | 1.5.1 | | xcpretty-travis-formatter | 0.0.4 | | jwt | 1.5.6 | | little-plugger | 1.1.4 | | logging | 2.1.0 | | memoist | 0.15.0 | | os | 0.9.6 | | signet | 0.7.3 | | googleauth | 0.5.1 | | hurley | 0.2 | | mime-types-data | 3.2016.0521 | | mime-types | 3.1 | | uber | 0.0.15 | | representable | 2.3.0 | | retriable | 2.1.0 | | google-api-client | 0.9.19 | | terminal-notifier | 1.7.1 | | word_wrap | 1.0.0 | | xcode-install | 2.0.8 | | trainer | 0.3.0 | | fastlane-plugin-trainer | 0.2.0 | | method_source | 0.8.2 | | mini_portile2 | 2.1.0 | | pkg-config | 1.1.7 | | nokogiri | 1.6.8 | | slop | 3.6.0 | | pry | 0.10.4 | | slather | 2.3.0 |
fastlane-bot commented 7 years ago

It seems like this issue might be related to code signing :no_entry_sign:

Have you seen our new Code Signing Troubleshooting Guide? It will help you resolve the most common code signing issues :+1:

hjanuschka commented 7 years ago

hello @lucatorella this is probably the same as here:

wich points to following stackoverflow solution:

after the upgrade the keychains get messed up (sometimes) so either create a new one using create_keychain - or clean them up.

lucatorella commented 7 years ago

So I already checked all the existing keychains and they contain just few certificates. I'll anyway try to create a new keychain.

lucatorella commented 7 years ago

So I created a new keychain and deleted the old one and still no improvement. Then I went to ~/Library/Keychains/ and I saw a lot of keychains with unspeakable names. I removed them and now signing is taking a reasonable amount of time.