Search Unity

Error: Failed to update credentials. The .p12 file failed validation against Apple CA chain

Discussion in 'Unity Build Automation' started by lifetree, Mar 30, 2019.

  1. lifetree

    lifetree

    Joined:
    Mar 28, 2014
    Posts:
    49
    I am trying to setup cloud build for iOS, and I can't for the life of me figure out what is wrong. I created a cert signing request from keychain access, uploaded to Apple Developer to create mobile provision, created certificate, downloaded, installed on keychain access, export .p12 file, and added .mobileprovision and .p12 files to Cloud Build Credentials in Unity to start build. And I get the error in the title.

    Am I missing something? I am not finding much useful information while searching Google. I noticed that when adding the cert to keychain access, it immediately has a red "X" like it has an error. But I literally just generated and downloaded it. What am I doing wrong?

    Thanks
     
  2. pfleetwood22

    pfleetwood22

    Joined:
    Jun 6, 2016
    Posts:
    28
    I am seeing this error too when I try to update expired credentials. I think it might be a UCB issue.
     
  3. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
    Hey, yeah this is a UCB issue - we updated a piece of our infrastructure and it caused apple certificate validation to break unexpectedly when uploading new certificates. This should not have affected existing iOS credentials and we're just about to release the fix right now.

    EDIT: The fix has been deployed now, if you see this again please submit a support ticket so I can investigate further.
     
    Last edited: Apr 4, 2019
  4. pfleetwood22

    pfleetwood22

    Joined:
    Jun 6, 2016
    Posts:
    28
    It is working for me now.
     
  5. eodeveloper

    eodeveloper

    Joined:
    Feb 23, 2018
    Posts:
    5
    Not working for me. Could this be some other kind of reason why this is failing?
     
  6. Tomoyuki_Naito

    Tomoyuki_Naito

    Joined:
    Jun 11, 2019
    Posts:
    1
    Not working for me, either. Could this be some other kind of reason why this is failing?
     
    DurbsDev likes this.
  7. tcs_coe

    tcs_coe

    Joined:
    Jan 2, 2017
    Posts:
    1
    Its also not working for me
     
    DurbsDev likes this.
  8. DurbsDev

    DurbsDev

    Joined:
    Sep 16, 2012
    Posts:
    16
    Also not working for me. Tried the steps mentioned by lifetree at the beginning of this post, and tried generating the new distribution cert in xcode. Both give this same error in Unity Cloud build.

    Interesting that I managed fine with a new App store distribution cert last month.
    This cert is a new Enterprise (in house or ad-hoc) distribution cert. Could it be that the issue is specific to Enterprise distribution certs?
     
  9. DurbsDev

    DurbsDev

    Joined:
    Sep 16, 2012
    Posts:
    16
    Wonder if the issue could be related to this:
    from https://developer.apple.com/support/code-signing/

    Worldwide Developer Relations Certification Intermediate Certificate update
    New Enterprise iOS Distribution Certificates will be issued using a new version of the Apple Worldwide Developer Relations Certification Intermediate Certificate. Apple development certificates will continue to be issued by the version of the Apple Worldwide Developer Relations Certification Intermediate Certificate that expires on February 7, 2023, so you should keep both versions installed on your development systems and servers.

    Xcode 11.4.1 or later is required to sign apps using certificates issued with the new intermediate certificate. If you are unable to upgrade to a compatible version of Xcode, you can continue to sign your apps using the command line. Download and install the new intermediate certificate to ensure that you can successfully sign apps with a newly created Enterprise iOS Distribution Certificate.

    WWDR Certification Intermediate Certificate (Expires February 7, 2023)
    WWDR Certification Intermediate Certificate (Expires February 20, 2030)
     
  10. DurbsDev

    DurbsDev

    Joined:
    Sep 16, 2012
    Posts:
    16
    @victorw
    The 2030 WWDR Cert is now used with all Enterprise Distribution Certs created after 2 September 2020. Is Unity cloud build checking for this cert as well now during validation against apple CA chain?
     
  11. DurbsDev

    DurbsDev

    Joined:
    Sep 16, 2012
    Posts:
    16
    @Tomoyuki_Naito
    @tcs_coe

    Are you attempting with an Enterprise (in house) distribution cert or App store distribution cert? This will help identify if the problem is specific to Enterprise distribution certs
     
  12. tomdelle

    tomdelle

    Joined:
    Feb 6, 2017
    Posts:
    1
    is there some news to this problem ? got this error with an enterprise in house distribution cert created today
     
  13. Wim-Wouters

    Wim-Wouters

    Joined:
    Sep 26, 2012
    Posts:
    36
    got this error with an enterprise in house distribution cert created today too...
     
  14. Ralph1989

    Ralph1989

    Joined:
    Sep 1, 2013
    Posts:
    13
    @victorw Could you please check the above post
    I am having the same issues when we are trying to release with enterprise
     
  15. louis030195

    louis030195

    Joined:
    Feb 3, 2018
    Posts:
    14
    migwellian and Qhuhuit like this.
  16. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    Same as @louis030195 on Windows, I'm pretty sure I have used this method before without issues.
     
  17. kolmichcreations

    kolmichcreations

    Joined:
    Sep 12, 2014
    Posts:
    10
    I'm getting this error too.

    What i have done:
    1) requested a certificate from a certificate authority using keychain access.
    2) Created the certificate on developer.apple.com using this request file.
    3) Downloaded the certificate
    4) Installed it to the keychain by double clicking it.
    5) Exported a .p12 file.

    Important: I do have both apple intermediate certificates installed (Apple Worldwide Developer Relations Certificate Authority valid till 2023 AND 2030)

    Next to my created certificate is the message: This certificate is valid.

    I submitted a support ticket right now. Please respond fast, cause my project is depending on unity cloud build.

    Thank you!
     
  18. rajivrao

    rajivrao

    Unity Technologies

    Joined:
    Feb 19, 2019
    Posts:
    111
  19. unity_bF5kM769k-DwoQ

    unity_bF5kM769k-DwoQ

    Joined:
    May 20, 2021
    Posts:
    2
    I made cert request with windows, downloaded the cert from developer.apple.com and exported the cert with private key as p12 format. I am trying to add them as credentials for ad-hoc but I am getting error.
    Failed to update credentials! The .p12 file failed validation against Apple CA chain.
     
    Last edited: Apr 13, 2022
    Vulcore likes this.
  20. SimonVigMillard

    SimonVigMillard

    Joined:
    Jul 25, 2018
    Posts:
    13
    For me it worked to set a password for the .p12 file. Without a password it would fail with the "failed validation against Apple CA chain." error.
     
  21. amarjeet_y

    amarjeet_y

    Joined:
    May 28, 2021
    Posts:
    4
    I am trying to update The .p12 file for existing IOS credentials but it is showing me the error: The .p12 file failed validation against Apple CA chain. Did found anything on internet related to this. kindly unity team please help.