Search Unity

Cloud build fails archiving, works locally on Mac

Discussion in 'Unity Build Automation' started by jorrit-de-vries, May 20, 2017.

  1. jorrit-de-vries

    jorrit-de-vries

    Joined:
    Aug 7, 2009
    Posts:
    71
    I get the following in my cloud build for iOS
    31638: [xcode] /bin/sh -c /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-aootexuzfncnfjdcngcopjtygwtx/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Script-B4DA4BBC8D2ABC28EFCD5347.sh
    31639: [xcode] Command /bin/sh failed with exit code 2
    31640: [xcode] ** ARCHIVE FAILED **
    31641: [xcode] The following build commands failed:
    31642: [xcode] PhaseScriptExecution Process\ symbols /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-aootexuzfncnfjdcngcopjtygwtx/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Script-B4DA4BBC8D2ABC28EFCD5347.sh
    31643: [xcode] (1 failure)

    Unity version: latest 5.6
    Xcode: latest
    Source control: svn
    Build target: iOS
    Project name: Cuby Road

    Note I also saw
    Command /bin/sh failed with exit code 4
    instead of code 2 in different builds

    There is not much else signalling an error, besides an UnityEngine.Cloudbuild package related error which I also get in my Android build. The same project configuration used to build fine two weeks ago. And it goes fine on my mac, using the same certificate and provisioning profile.

    What can go wrong here? Any advice is appreciated.
     
    Last edited: May 21, 2017
  2. RevoX_

    RevoX_

    Joined:
    Sep 10, 2014
    Posts:
    4
    Is bitcode enabled?
     
  3. jorrit-de-vries

    jorrit-de-vries

    Joined:
    Aug 7, 2009
    Posts:
    71
    No, it is turned off in the Post-Export Method, as all the extra bits are not really necessary for adhoc distribution. Both locally and in UCB it doesn't make a difference; archiving locally succeeds, on UCB fails.
     
    Last edited: May 20, 2017
  4. RevoX_

    RevoX_

    Joined:
    Sep 10, 2014
    Posts:
    4
    I've had my fair share of problems with cloudbuild, it just doesn't seem a stable platform, if builds work locally, cloud build so far for me either doesn't work or will build a really buggy build. I'd advice setting up your own automated system. Have a look at https://jenkins.io/ someone at work shown me this looks good but not got around to doing it myself yet.
     
  5. jorrit-de-vries

    jorrit-de-vries

    Joined:
    Aug 7, 2009
    Posts:
    71
    We use Jenkins at the company I work for. It is indeed more stable than UCB, but I can't afford setting it up for my own, requiring a Mac server up and running in order to build for iOS.
     
  6. chandler55

    chandler55

    Joined:
    Jun 8, 2010
    Posts:
    17
    I get the same problem. wish I could dig deeper but all we get is that archiving failed
     
  7. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
    Hello,

    UCB does not currently support Xcode 8.3, but this will be rolled out very soon. I will update this post when I have more info :)

    - Sophia
     
  8. jorrit-de-vries

    jorrit-de-vries

    Joined:
    Aug 7, 2009
    Posts:
    71
    @SophiaC Xcode 8.3 is what will result in a successful build, without the sole message of a failing archive? I wish I would get more info than the exit codes from the what seems a generated bash script.
     
  9. jlanisdev

    jlanisdev

    Joined:
    Jan 18, 2016
    Posts:
    76
    @jorrit5477 Have you resolved this issue yet? Having the same problem with iOS cloud builds after upgrading to Unity 5.6.1f1. No problems with local iOS builds on Xcode 8.2.1 or Android. Seems to be the identical problem as well; either exit code 2 or 4 after attempting several builds. Is this an compatibility issue with Xcode 8.0 and 5.6.1?

    Code (csharp):
    1. 13207:        [xcode]     /bin/sh -c /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-asylmiswvkgnlsarsitzexjsixiz/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Script-B29F44B085FE7B509D9FBB07.sh
    2. 13208:        [xcode] Command /bin/sh failed with exit code 4
    3. 13209:        [xcode] ** ARCHIVE FAILED **
    4. 13210:        [xcode] The following build commands failed:
    5. 13211:        [xcode]     PhaseScriptExecution Process\ symbols /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-asylmiswvkgnlsarsitzexjsixiz/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Script-B29F44B085FE7B509D9FBB07.sh
    6. 13212:        [xcode] (1 failure)
     
    Last edited: May 25, 2017
  10. PhilMcJ

    PhilMcJ

    Unity Technologies

    Joined:
    May 29, 2014
    Posts:
    187
    Hello all -
    We've been tracking and working on this new iOS archiving error here. We've just made some changes which should help avoid the archiving failures which some iOS builds have been seeing recently; this error's appearance has come as a surprise to the Cloud Build team as well, and it only affects some projects (which makes troubleshooting it a little more complicated).

    Meanwhile we hope to make xcode8.3 available next week in Cloud Build, barring any more new compatibility issues. Thanks for your patience everyone.
     
  11. jknight-nc

    jknight-nc

    Joined:
    Jun 10, 2014
    Posts:
    52
    Any update on this? I still have this problem. Unity 5.6.1p1

    23237: [xcode] The following build commands failed:
    23238: [xcode] PhaseScriptExecution Process\ symbols /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtpbenwqnywjctfqsqorcltvqeaa/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Script-841B42E2A3C19C58AB851401.sh
     
  12. jorrit-de-vries

    jorrit-de-vries

    Joined:
    Aug 7, 2009
    Posts:
    71
    @jlanisdev sorry for the late reply, missed the forum alerts. No, this isn't resolved yet.

    @PhilMcJ @SophiaC I see in the logs XCode 8.3.2 is up and running on the build servers, but this has not yet been resolved. Do you have any update on this issue?
     
  13. jorrit-de-vries

    jorrit-de-vries

    Joined:
    Aug 7, 2009
    Posts:
    71
    On our side the issue has been resolved. The steps I have executed:
    - Create an empty, new project
    - Copy over the ProjectSettings directory from this empty project to the one to build
    - Correct the project settings (player, quality, etc.)
    - Cleanup the project (remove older prototyping scenes, code, assets)

    I could do this as the project settings are not modified that much (no tags, no layers, no physics, etc.). Since I have cleaned up a lot I can't tell what was the actual thing that caused the failure of archiving.