iOS builds signing issues

Hi everyone.

There’s likely an instability on the external tooling to sign iOS apps that started on April 12th, 2022 described here: Upload Error - ERROR ITMS-90165: "Invalid Provisioning Profile Signature." · Issue #20164 · fastlane/fastlane · GitHub.

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.

6 Likes

Will you let us know in any way when this issue is resolved? As a message / broadcast on the Build History page?

oh thanks for the heads up. I was going crazy trying to figure out what changed in our project.

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!

2 Likes

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?

Would you do me a favor and create a support ticket with that information so we can do a deeper investigation?

Just tried again and it worked. Not sure why but happy its working

1 Like

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.

Is there any good instruction how to regenerate files needed? i’m stuck at generating p12 file
https://stackoverflow.com/questions/9418661/how-to-create-p12-certificate-for-ios-distribution

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?

regenerating p12 files helped me. working now

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?

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)

Regenerating both Provisioning profiles and the p12 files works for us. Thanks @astanid

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).

My Apple Distribution Cert was due for renewal soon, so created a new P12 (using OpenSSL) updated provisioning and UCB is building again now.

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!

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.

@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:

  • At Sign In - Apple , 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.

  • In the cloud build config page, go to “signing credentials” > “edit signing credentials” of the build you’d like to fix.

  • under “choose iOS credentials”, select “add new provisioning credentials”

  • 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).

  • Save your changes and run a clean build. Cloud build should be working now assuming fastlane was your only error.

4 Likes

I came here with the same error in Unity Cloud Build Service and my iOS build, and I can confirm that the problem was the credentials.
In my case I had to generate a new certificate from scratch to get the p12 file since I didn’t have the previous one (here is a link where you can find step by step how to generate it: https://support.magplus.com/hc/en-us/articles/203808748-iOS-Creating-a-Distribution-Certificate-and-p12-File)