Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

iOS Cloud Build fails in 2018.2

Discussion in 'Unity Cloud Build' started by HaakonL, Jul 11, 2018.

  1. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    116
    Without doing anything except from changing our cloud build settings to use 2018.2 instead of 2018.1 build are now failing due to missing entitlements. Where do Unity list breaking changes for cloud build versions, does anyone know? We are so friggin tired of fixing cloud build errors, or waiting for Unity to come around fixing them. Needless to say, being without device builds for weeks or months every time Unity comes out with a new version is causing a bunch of issues for us...

    Code Signing Error: The file "/BUILD_PATH/monkey.board.ios/temp.XXXXXX20180711-3875-bmn8xu/monst.entitlements Unity-iPhone/monst.entitlements" could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "Unity-iPhone" and build configuration "Release" is correct and that the file exists on disk.
     
    hayashiyui likes this.
  2. rajantande

    rajantande

    Joined:
    Mar 24, 2015
    Posts:
    22
    This has also started happening for us but without upgrading to 2018.2. It's happening intermittently on a number of our projects. Some projects are mostly working (1 build out of 4 fails) while other projects always fail. We have builds where the build fails once and then the next build succeeds without any changes being submitted to our SCM.

    We didn't make any changes to our UCB configurations either. This started to happen on the 6th of July.
     
    Last edited: Jul 12, 2018
  3. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    222
    Hi @rajantande, The OPs issue was found to be an issue with Unity 2018.2 which also occurs on local builds and not specific to the Cloud Build service.

    The issue you are reporting sounds slightly different and I would very much like to investigate it for you. Please log a support ticket to cloudbuildsupport@unity3d.com, providing a link to an affected build and we will be happy to look into it!
     
  4. Woody4618

    Woody4618

    Joined:
    Jul 1, 2015
    Posts:
    16
    I am having the same problem in my jenkins. Do you know if there is a patch release coming for that anytime soon?
    "entitlements" could not be opened"
     
  5. rajantande

    rajantande

    Joined:
    Mar 24, 2015
    Posts:
    22
    Thanks for replying @ollieblanks. I've sent an email with the details of our problem to the support email. Hopefully you'll be able to solve the problem quickly.
     
    ollieblanks likes this.
  6. AndrewJones_

    AndrewJones_

    Joined:
    Nov 28, 2017
    Posts:
    3
    Possibly just adding noise to the discussion but...
    Any more info on the known issue with 2018.2? I've hit and worked around this problem on our Jenkins iOS builds on upgrading to 2018.2 (from 2017.2!). I've poked into it a little way and have I can see that since our working build we aqcuired a second dev.entitlements in the xcode project (both a new actual file and the refs to it from the .pbxproj).

    CODE_SIGN_ENTITLEMENTS = "Unity-iPhone/dev.entitlements";
    ... from the .pbxproj, which worked, has become...

    CODE_SIGN_ENTITLEMENTS = (
    dev.entitlements,
    "Unity-iPhone/dev.entitlements",
    );

    Some part of fastlane or xcodebuild seems to barf on constructing a single valid path from this. Looks like the iOS post build process of UTNotifications was the culprit, and (temporarily) removing UTNotifications fixes it. Our UTNotifications may have been old. Last note - the build I've just seen go green doesn't have any dev.entitlements at all! So from one path in CODE_SIGN_ENTITLEMENTS in the previous working build, to two paths in the broken build, and back to an apparently working build with no CODE_SIGN_ENTITLEMENTS or dev.entitlements anywhere in sight. Anyone with any relevant info? Unless I'm able to make a fully working build just by updating UTNotifications, I'll log this all in a bug.
     
  7. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    222
  8. rajantande

    rajantande

    Joined:
    Mar 24, 2015
    Posts:
    22
    Thanks to @ollieblanks for spotting our problem. The issue was actually ours. We upgraded to a new UTNotifications package (v1.7.2) that included a post build step which added the CODE_SIGN_ENTITLEMENTS entitlements. Unfortunately we already had our own post build step which was doing the same thing and having both steps added two files that were interpreted as a single file with a path that didn't exist.

    Removing our post build step so that we can update to newer versions of UTNotifications in the future was our fix. One point to note was that not all UCB builds failed before we made our fix even though all of them flagged the error with the entitlements file being incorrect.
     
    Deleted User and ollieblanks like this.
  9. Woody4618

    Woody4618

    Joined:
    Jul 1, 2015
    Posts:
    16
    For me it was the same problem with the UTNotifications post build process.
     
    ollieblanks likes this.
  10. Litovets

    Litovets

    Joined:
    Sep 3, 2012
    Posts:
    20
    Hey guys, I can't disable Push Notification capability. It is enabled in 2018.2.0+ Unity version.
    You can see how it looks like in xcode project on screenshot.
    Can anyone help me figure out how to disable it?
     

    Attached Files:

  11. Litovets

    Litovets

    Joined:
    Sep 3, 2012
    Posts:
    20
    Can anyone help me? Is there a way to disable Push Notification capability?
     
  12. sam-eller

    sam-eller

    Joined:
    Apr 26, 2017
    Posts:
    4
    So we didn't fix the push notification capability bug in 2018.2, but we did figure out why our entitlements file wasn't being opened on postprocessbuild.

    We did the entitlements file in the Editor folder on postprocessbuild solution, and we were getting the couldn't open the entitlements file error in Unity 2018.2.0. The solution was to add

    Code (CSharp):
    1. proj.AddCapability(target, PBXCapabilityType.iCloud, "Unity-iPhone/entitlements.entitlements");
    2.             File.WriteAllText(projPath, proj.WriteToString());

    "entitlements" was the name of our entitlements file, so just replace with whatever yours is named. For some reason the Code Signing Entitlements section in Xcode Build Settings was not pointing to our entitlements file anymore after the upgrade to 2018.2.0.

    If you aren't using iCloud, in the PBXCapabilityType section just replace with whatever your capability needs to be. As long as your entitlements file is in the Unity-iPhone directory of the Xcode project at the end of the postprocessbuild, this should work, otherwise you'll need to change the path to wherever your entitlements file is placed.
     
    Last edited: Dec 11, 2018
unityunity