iOS Cloud Build is failing in 2018.1.0f1 – DeveloperCertificates

After migrating from 2017.2.0f3 to 2018.1.0f1 I’ve run into a strange Cloud Build error. I can successfully build to device through unity with no errors, but Cloud Builds fail. I have also tried other targets on Cloud Build and Mac Universal/Windows 64 bit work just fine.

The error that I’m seeing is:

1619: [Unity] EXCEPTION: ArgumentException: parsing "<key>DeveloperCertificates<\/key>[
1620: [Unity] UnityEditor.CloudBuild.BuildLogger:HighlightUnityErrors(String, String, LogType)
1621: [Unity] ArgumentException: parsing "<key>DeveloperCertificates<\/key>[

Following that error I also see this exception:

EXCEPTION: DirectoryNotFoundException: Could not find a part of the path "/BUILD_PATH/company.game-d60447c0-d22b-43ef-8bb3-3745cb0fa3c6.default-ios/temp.XXXXXX20180501-10199-1ur9ped/Unity-iPhone.xcodeproj/project.pbxproj".

I have done a considerable amount of searching, but can’t seem to find a solution.

I’ve created new iOS targets from scratch, generated new iOS provisioning profiles/certificates, run the build as a clean process, etc. with no difference to the end result.

Any help with deciphering what these errors might be or what’s causing them would be extremely helpful!

Edit
This has officially been fixed in version 2018.1.2f1


After digging into this more I figured out that it’s an issue on the Unity side of things. The logic for parsing iOS provisioning profiles is failing on their side. Specifically, the regex formula that’s being used is incorrect. That logic was recently changed during the 2018.1 updates and appears to have been most recently updated on Mar 7. Here is the git hash corresponding to the changes I’m referring to: a62850c6c0ca6dfb6e047aa460d3b981ba76fe56.


The new ProvisioningProfile.cs, moved from UnityCsReference/Editor/Mono to UnityCsReference/Editor/Mono/PlatformSupport, contains a new regex string to set the profile type. This regex is failing around newline/tab checks ([
] vs [
\r]+). This regex can be resolved by replacing the current one: <key>DeveloperCertificates</key>[ ]<array>[ ]<data>([\w/+=]+)</data> with (?<=<key>DeveloperCertificates</key>[ \r]+<array>[ \r]+<data>)([\w/+=]+)(?=</data>) This check adds start/end conditions to exclude the tags being wrapped (doesn’t really matter, but just in case), as well as cleans up the whitespace checks.


I opened a support ticket for this issue and the Unity team got back with me saying that it will be fixed asap. In the meantime I’m having to set my Cloud Build target to Unity 2018.1.0b9. The reason being is that beta 9 is the last release that came out prior to that Mar 7 date, which is when this new file was introduced.

Beta 9 has severe UI placement issues and is completely unusable. This bug has been known for 2 months now and is still not fixed. A major fuckup from the Unity team, what on earth is taking so long?

Any luck?

I’m able to reproduce the same errors with 2018.1.0f1 installed locally.

Reverting to 2018.1 beta for the time being.

Unfortunately still not fixed in 2018.1.1

Seems to be working in 2018.1.2f1:

https://beta.unity3d.com/download/a46d718d282d/UnityDownloadAssistant-2018.1.2f1.exe

https://beta.unity3d.com/download/a46d718d282d/UnityDownloadAssistant-2018.1.2f1.dmg