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