fastlane: [Match] "Could not install WWDR certificate" in Travis-CI

New Issue Checklist

Issue Description

After upgrading to latest fastlane having a regression with match 0.6.0 when it tries to setup a new WWDR certificate (see output below). This is a very destructive way of doing keychain things, you know. I’d like to have an option to fix this automatically rather than fail right before installing my own certificates, guys. Travis installed the new WWDR itself, and I don’t have this issue since fastlane 1.66.0 (see #1989, related issue is still opened btw). Having a broken CI right now, what should I do to fix this?

Complete output when running fastlane, including the stack trace and command used
+-----------------------+--------------------------------------------------------------------------+
|                                     Summary for match 0.6.0                                      |
+-----------------------+--------------------------------------------------------------------------+
| verbose               | true                                                                     |
| force_for_new_devices | true                                                                     |
| app_identifier        | com.project.id.sample-branch                                      |
| username              | user@domain.com                                                          |
| type                  | development                                                              |
| git_url               | https://user:password@github.com/company/certifica...              |
| git_branch            | master                                                                   |
| keychain_name         | login.keychain                                                           |
| readonly              | false                                                                    |
| force                 | false                                                                    |
| shallow_clone         | false                                                                    |
| skip_docs             | false                                                                    |
+-----------------------+--------------------------------------------------------------------------+
INFO [2016-05-23 20:00:20.36]: Cloning remote git repo...
INFO [2016-05-23 20:00:20.36]: $ git clone 'https://user:password@github.com/company/certificates.git' '/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/d20160523-5148-1179pc1'
INFO [2016-05-23 20:00:20.38]: ▸ Cloning into '/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/d20160523-5148-1179pc1'...
INFO [2016-05-23 20:00:21.33]: ▸ remote: Counting objects: 2394, done.
INFO [2016-05-23 20:00:21.57]: ▸ remote: Compressing objects: 100% (133/133), done.
INFO [2016-05-23 20:00:35.31]: ▸ remote: Total 2394 (delta 6), reused 0 (delta 0), pack-reused 2261
INFO [2016-05-23 20:00:35.31]: ▸ Receiving objects: 100% (2394/2394), 12.39 MiB | 869.00 KiB/s, done.
INFO [2016-05-23 20:00:35.31]: ▸ Resolving deltas: 100% (185/185), done.
INFO [2016-05-23 20:00:35.43]: ▸ Checking connectivity... done.
INFO [2016-05-23 20:00:35.47]:   Decrypted ‘ABCDEFGHIJ.cer'
INFO [2016-05-23 20:00:35.48]:   Decrypted ‘KLMNOPQRST.cer'
INFO [2016-05-23 20:00:35.49]:   Decrypted ‘UVWXYZ0123.p12'
INFO [2016-05-23 20:00:35.50]:   Decrypted ‘456789ABCD.p12'
INFO [2016-05-23 20:00:35.50]:   Decrypted 'AppStore_com.project.id.mobileprovision'
INFO [2016-05-23 20:00:35.51]:   Decrypted 'Development_com.project.id.develop.mobileprovision'
INFO [2016-05-23 20:00:35.72]:   Decrypted 'Development_com.project.id.feature-sample-branch.mobileprovision'
INFO [2016-05-23 20:00:35.77]:   Decrypted 'Development_com.project.id.mobileprovision'
INFO [2016-05-23 20:00:35.77]:   Successfully decrypted certificates repo
INFO [2016-05-23 20:00:35.77]: Verifying that the certificate and profile are still valid on the Dev Portal...
INFO [2016-05-23 20:00:39.64]: Installing certificate...
INFO [2016-05-23 20:00:39.64]: $ security list-keychains -d user
INFO [2016-05-23 20:00:39.65]: ▸     "/Users/travis/Library/Keychains/login.keychain"
INFO [2016-05-23 20:00:39.65]: $ security find-certificate -c 'Apple Worldwide Developer Relations Certification Authority' /Users/travis/Library/Keychains/login.keychain
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
INFO [2016-05-23 20:00:39.72]: $ security list-keychains -d user
INFO [2016-05-23 20:00:39.73]: ▸     "/Users/travis/Library/Keychains/login.keychain"
INFO [2016-05-23 20:00:39.73]: $ curl -O https://developer.apple.com/certificationauthority/AppleWWDRCA.cer && security import AppleWWDRCA.cer -k\ /Users/travis/Library/Keychains/login.keychain
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1062  100  1062    0     0   1812      0 --:--:-- --:--:-- --:--:--  1812
security: SecKeychainItemImport: The specified keychain could not be found.
INFO [2016-05-23 20:00:40.39]:   Successfully encrypted certificates repo
/Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/fastlane_core-0.44.0/lib/fastlane_core/ui/interface.rb:139:in `user_error!': [!] Could not install WWDR certificate (FastlaneCore::Interface::FastlaneError)
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/fastlane_core-0.44.0/lib/fastlane_core/ui/ui.rb:14:in `method_missing'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/fastlane_core-0.44.0/lib/fastlane_core/cert_checker.rb:63:in `block in install_wwdr_certificate'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/fastlane_core-0.44.0/lib/fastlane_core/cert_checker.rb:57:in `chdir'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/fastlane_core-0.44.0/lib/fastlane_core/cert_checker.rb:57:in `install_wwdr_certificate'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/fastlane_core-0.44.0/lib/fastlane_core/cert_checker.rb:19:in `installed_identies'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/fastlane_core-0.44.0/lib/fastlane_core/cert_checker.rb:7:in `installed?'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/match-0.6.0/lib/match/runner.rb:55:in `certificate'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/match-0.6.0/lib/match/runner.rb:17:in `run'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/match-0.6.0/lib/match/commands_generator.rb:55:in `block (3 levels) in run'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/fastlane_core-0.44.0/lib/fastlane_core/ui/fastlane_runner.rb:26:in `run!'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/match-0.6.0/lib/match/commands_generator.rb:121:in `run'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/match-0.6.0/lib/match/commands_generator.rb:12:in `start'
    from /Users/travis/build/company/iOS/vendor/bundle/ruby/2.0.0/gems/match-0.6.0/bin/match:6:in `<top (required)>'
    from /Users/travis/.rvm/gems/ruby-2.0.0-p643/bin/match:23:in `load'
    from /Users/travis/.rvm/gems/ruby-2.0.0-p643/bin/match:23:in `<main>'
    from /Users/travis/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `eval'
    from /Users/travis/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `<main>'

Configuration Files

Please copy the complete content of your Fastfile and any other configuration files you use below:

Fastfile:

...
match_type = options[:beta] ? "development" : "appstore"
match(type: match_type, app_identifier: proj_id, force_for_new_devices: true)
...

Environment

fastlane version (run fastlane -v): 1.90.0

Do you use bundler to execute fastlane (i.e. bundle exec fastlane)? bundle

Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)? rvm, ruby-2.0.0-p643

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Oh yeah 🚀