fastlane: Could not install WWDR certificate

New Issue Checklist

Issue Description

After a while without using this, it starts throwing this error when I try my lane first_release, so I updated the gems fastlane and sigh but it still happens

+-------------------------------------+----------------------+
|                   Summary for sigh 1.8.0                   |
+-------------------------------------+----------------------+
| adhoc                               | false                |
| skip_install                        | false                |
| development                         | false                |
| force                               | false                |
| username                            | username@gmail.com |
| ignore_profiles_with_different_name | false                |
| skip_fetch_profiles                 | false                |
| skip_certificate_verification       | false                |
+-------------------------------------+----------------------+

[03:31:08]: Starting login with user 'username@gmail.com'
[03:31:10]: Successfully logged in
[03:31:10]: Fetching profiles...
[03:31:10]: To not be asked about this value, you can specify it using 'app_identifier'
The bundle identifier of your app: com.username.mock
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1062  100  1062    0     0   1518      0 --:--:-- --:--:-- --:--:--  1519
security: SecKeychainItemImport: UNIX[Invalid argument]

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

➡️  [Match] "Could not install WWDR certificate" in Travis-CI
   https://github.com/fastlane/fastlane/issues/4798 [closed] 18 💬
   5 weeks ago

➡️  Could not install WWDR certificate
   https://github.com/fastlane/fastlane/issues/2852 [closed] 6 💬
   5 weeks ago

➡️  WWDR certificate install keychain search
   https://github.com/fastlane/fastlane/pull/3621 [closed] 7 💬
   05 Apr 2016

and 20 more at: https://github.com/fastlane/fastlane/search?q=Could%20not%20install%20WWDR%20certificate&type=Issues&utf8=✓

[!] Could not install WWDR certificate

Configuration Files

Fastfile:

lane :first_release do

    config = SomeScript.new

    sigh(
      force: true,
      app_identifier: config.appId
      )
    ENV["PROFILE_UUID"] = lane_context[SharedValues::SIGH_UDID]
    gym

end

Environment

fastlane version (run fastlane -v): 1.96.0

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

Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)? No

About this issue

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

Most upvoted comments

I had this issue on a jenkins slave. What solved it was importing the WWDR certificate to “login” keychain in addition to the “System” keychain

Additional info, which might help to someone, as I spent a good deal of time chasing this issue. The problems described in this issue #5259 and in issue #6993 are not identical, although both can be solved by manually reordering the keychain search list from GUI, as described in #6993. However, if keychain is recreated before each CI build and deleted afterwards, manual reordering of the search list is not suitable approach.

This issue #5259 is indicated by following line in fastlane output:

security: SecKeychainItemImport: UNIX[Invalid argument]

while the issue #6993 is indicated by a different line in fastlane output:

security: SecKeychainItemImport: The specified keychain could not be found.

In my case, this issue #5259 was caused by setting keychain search list to an empty string via command:

security list-keychains -d user -s ""

It results in following keychain search list:

security list-keychains
    "/Users/administrator/Library/Keychains"
    "/Library/Keychains/System.keychain"

"/Users/administrator/Library/Keychains" is a directory, what match fails to handle. The directory remains on first position of the list even when an another new keychain is added. The issue can be solved from command line by setting the list to an explicit string, e.g.:

security list-keychains -s "/Users/admin/iphone-app/ci.keychain-db"

This issue happens only on Macos 10.12 Sierra, not on Macos 10.11 El Capitan.

I am having the " Could not install WWDR certificate" issue as we… I have read all of the comments I can possibly comprehend and haven’t gotten anywhere. I am not a professional developer so if somebody could explain this in a friendly way to me, it would be greatly appreciated.

Nope Xcode worked fine. But it seems to work now after finally fixing the keychain.

Todd Burner notifications@github.com schrieb am Di., 11. Okt. 2016 um 16:43 Uhr:

Reopened #5259 https://github.com/fastlane/fastlane/issues/5259.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fastlane/fastlane/issues/5259#event-819584480, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnc9Mu_Gt7V2h12YDq0A0AG_fZY2W_Kks5qy6BrgaJpZM4JA3bK .

@geoHeil Can you check you check your system and login keychains and let me know if this cert appears in both places? Thanks for working with me on this. Hope you have a great day! Also are you running into issues exporting from Xcode as well? Thanks!

[17:12:54]: Could not install WWDR certificate

Does it work when you manually code sign using Xcode? Have you followed our Code Signing Guide?