Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Other iOS builds signing issues

Discussion in 'Unity Build Automation' started by MarceloL-Unity, Apr 12, 2022.

  1. MarceloL-Unity

    MarceloL-Unity

    Unity Technologies

    Joined:
    Jan 5, 2021
    Posts:
    12
    Hi everyone.

    There's likely an instability on the external tooling to sign iOS apps that started on April 12th, 2022 described here: https://github.com/fastlane/fastlane/issues/20164.

    This instability is causing iOS builds to fail in Unity Cloud Build. If you encounter an error message similar to the below, until this instability is resolved, the workaround is to regenerate a new provisioning profile in the Apple Developer Portal and update your credentials with the newly generated provisioning profile on the Unity Cloud Build credentials page.


    fastlane finished with errors
    /Users/buildbot/.rvm/gems/ruby-2.4.2/gems/fastlane-2.182.0/fastlane/lib/fastlane/actions/update_project_provisioning.rb:73:in `block (2 levels) in run': [!] undefined method `[]' for nil:NilClass (NoMethodError)


    Thank you.
     
    Last edited: Apr 12, 2022
  2. lagruise

    lagruise

    Joined:
    Feb 23, 2017
    Posts:
    22
    Will you let us know in any way when this issue is resolved? As a message / broadcast on the Build History page?
     
  3. gnp89

    gnp89

    Joined:
    Jun 25, 2012
    Posts:
    36
    oh thanks for the heads up. I was going crazy trying to figure out what changed in our project.
     
  4. timsibiski

    timsibiski

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    38
    The resolution of this issue needs to be done by a 3rd party. The issue was, more specifically, seemingly due to a root Apple signing certificate expiring. Apple seemingly created a new one, which is why newly-generated provisioning profiles work. This should theoretically only happen again when that root certificate expires. The issue may be fixed by then, but we have no control over that outcome. Apple seems to be aware of the issue, or perhaps the updated certs were created automatically.

    Ultimately, all users must regenerate their provisioning profile to get around this issue, though. Sorry for the inconvenience!
     
    Last edited: Apr 13, 2022
    AdamBebko and MarceloL-Unity like this.
  5. brockemon

    brockemon

    Joined:
    Dec 21, 2012
    Posts:
    46
    Tried adding new provisioning profile a few times on one of our projects and having no luck getting around this error. For our other project it did work however.

    Is there some step to "regenerating" the provisioning profile that is above just downloading a new profile and exporting from Key Chain access?
     
  6. timsibiski

    timsibiski

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    38
    Would you do me a favor and create a support ticket with that information so we can do a deeper investigation?
     
  7. brockemon

    brockemon

    Joined:
    Dec 21, 2012
    Posts:
    46
    Just tried again and it worked. Not sure why but happy its working
     
    timsibiski likes this.
  8. timsibiski

    timsibiski

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    38
    That's great! Sounds like the resolution for about 10% of all bugs in life. As the saying goes, I never look a gift horse in the mouth.
     
  9. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
  10. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    161
    Our team has also regenerated the files, and still getting the same error. We will try one more time and see if it works. Where would we do the support ticket, via UCB?
     
  11. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    regenerating p12 files helped me. working now
     
  12. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    680
    Hi @timsibiski

    I've re-downloaded (does this regenerate?) the mobileprovision file and removed\added new Credentials in UCB, but am still seeing the error.

    Could it be the developer\publisher certificate (p12) you're talking about regenerating?
     
  13. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,058
    created new cert/keys today, still getting that error on build:

    /BUILD_PATH/.rvm/gems/ruby-2.4.2/gems/fastlane-2.182.0/fastlane/lib/fastlane/actions/update_project_provisioning.rb:73:in `block (2 levels) in run': [!] undefined method `[]' for nil:NilClass (NoMethodError)
     
  14. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    161
    Regenerating both Provisioning profiles and the p12 files works for us. Thanks @astanid
     
  15. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,058
    nevermind, it works now.

    i think when adding new signing certs, it doesn't automatically save it as selected cert? (so it was using old cert).
     
  16. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    680
    My Apple Distribution Cert was due for renewal soon, so created a new P12 (using OpenSSL) updated provisioning and UCB is building again now.
     
    Last edited: Apr 28, 2022
  17. MigrantP

    MigrantP

    Joined:
    Jun 24, 2013
    Posts:
    116
    I got past the error by creating a new provisioning profile for the same app, and uploading it to UCB. I did not have to make a new certificate, I just uploaded the same one again with the new provisioning profile. Thanks to Danny from Unity for the help!
     
  18. GrizzlyFalcon

    GrizzlyFalcon

    Joined:
    Feb 14, 2015
    Posts:
    10
    Can someone run through exactly the step they took to get this working. I am confused about what it is I need to do in order to get this to work. Quite a huge blocker in our Cloud build > testflight > app store process right about now.
     
  19. tchapman_lumineye

    tchapman_lumineye

    Joined:
    Sep 1, 2021
    Posts:
    10
    @GrizzlyFalcon and anybody else still having issues, here's the detailed steps that worked for me. It sounds like some folks had to take the extra step of regenerating a p12, but that step wasn't necessary for me and *shouldn't be for you unless you're using a different certificate for the new prov profile:
    1. At https://developer.apple.com/account/resources/profiles/list , generate a new provisioning profile. Make sure the app ID you select matches the app ID used by your cloud build (or you're using a wildcard (*) ). Also make sure the certificate matches, otherwise this is where you'll likely need to generate a new p12 file. Lastly make sure you select the devices you intend to test with and download this file for step 4.
    2. In the cloud build config page, go to "signing credentials" > "edit signing credentials" of the build you'd like to fix.
    3. under "choose iOS credentials", select "add new provisioning credentials"
    4. Make a name and upload the prov file you generated in step 1. For the p12 file, you should have this saved somewhere secure from when you originally made your certificate. If you don't have both this and the password, you'll need to generate a whole new certificate from the apple developer portal (they have a in depth guide so I won't go over that here).
    5. Save your changes and run a clean build. Cloud build should be working now assuming fastlane was your only error.
     
  20. AlejandroSDev

    AlejandroSDev

    Joined:
    Jul 7, 2022
    Posts:
    8