Search Unity

Cloudbuild IOS failing: "Vuforia.framework/Vuforia' does not contain bitcode"

Discussion in 'Unity Build Automation' started by kaspar_unity889, Oct 29, 2018.

  1. kaspar_unity889

    kaspar_unity889

    Joined:
    Oct 29, 2018
    Posts:
    2
    The local build works fine, in cloudbuild Android builds fine too, but IOS fails with the following error:

    …../Frameworks/Vuforia.framework/Vuforia' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/BUILD_PATH/vivid-unity.wrwallet.default-ios/temp.XXXXXX20181029-5873-1m7csy3/Frameworks/Vuforia.framework/Vuforia' for architecture arm64…

    This started 2 days ago, anyone encountering same problem, and is there a solution?

    thanks in advance

    edit: working in unity 2018.2.7f1 and using Vuforia 7.5.26
     
    fsw likes this.
  2. fsw

    fsw

    Joined:
    Oct 2, 2016
    Posts:
    3
    Also when we revert repository to version that was working before it still fails so seems something changed in cloud build setup.

    Those lines are also reported in log file:

    262: [Unity] ERROR: Unable to find shader Custom/VideoBackground
    263: [Unity] ERROR: Vuforia will not initialize. You need to accept the Vuforia Developer Agreement from "Help -> Vuforia -> Show Developer Agreement".


    However there is no checkbox in "Help -> Vuforia -> Show Developer Agreement" so seems like this might be a problem with license on cloud server?
     
  3. fsw

    fsw

    Joined:
    Oct 2, 2016
    Posts:
    3
    Actually we just found out that Android build works fine, but when you try to open Vuforia scene it does not start the camera.
    So analyzed logs for android build as well and it also reports:

    357: [Unity] ERROR: Unable to find shader Custom/VideoBackground
    358: [Unity] ERROR: Vuforia will not initialize. You need to accept the Vuforia Developer Agreement from "Help -> Vuforia -> Show Developer Agreement".


    When we revert to version that was working before it also is reporting this.

    Built started on OCT 26, 2018 11:54:54 AM works totally fine

    Build started on OCT 26, 2018 9:14:08 PM is broken and every build after this behaves the same.

    So seems like something have changed between those.

    cheers
     
  4. SunnyYSSC

    SunnyYSSC

    Joined:
    Mar 10, 2018
    Posts:
    9
    We got the exact problem on the cloud build and this is the response from Vuforia here (see #8)
    https://developer.vuforia.com/forum/unity/license-agreement-error
     
    fsw likes this.
  5. fsw

    fsw

    Joined:
    Oct 2, 2016
    Posts:
    3
    Thanks a lot @SunnyYSSC ,
    This is so not nice of vuforia :(
     
  6. SunnyYSSC

    SunnyYSSC

    Joined:
    Mar 10, 2018
    Posts:
    9
    No worries~ Yeah I know, hopefully Unity and Vuforia can figure out a solution for that soon... At this moment, Im searching for other alternatives.
     
  7. kaspar_unity889

    kaspar_unity889

    Joined:
    Oct 29, 2018
    Posts:
    2
    Just to give you some insight in our work around: We build our IPA and APK locally (on mac) and upload manually to the cloud build dashboard ("Upload Build" button on top right).. It seems to work for all devices both IOS and Android, except iPhoneXS so far (another problem, and probably has to do with a new format for their UDID`s ?) Anyway hope this helps you ;)
     
    SunnyYSSC likes this.
  8. SunnyYSSC

    SunnyYSSC

    Joined:
    Mar 10, 2018
    Posts:
    9
    Thanks! Im currently looking at these two atm.

    https://blog.mi.hdm-stuttgart.de/in...or-unity-development-using-gitlab-ci-and-aws/

    https://gitlab.com/gableroux/unity3d-gitlab-ci-example
     
  9. CorstiaanMediamonks

    CorstiaanMediamonks

    Joined:
    Sep 14, 2015
    Posts:
    21
    Hi guys, jumping in with a few notes:
    I'm in contact with Unity support about "Vuforia not supporting cloudbuild" and their latest reaction was:
    And we had the BITCODE issue as well. This is fixable by adding a PostBuild script:
    Code (CSharp):
    1. using UnityEditor;
    2. using UnityEditor.Callbacks;
    3. #if UNITY_IOS
    4. using UnityEditor.iOS.Xcode;
    5. #endif
    6.  
    7. public class PostBuildStep
    8. {
    9.     [PostProcessBuild]
    10.     public static void OnPostprocessBuild(BuildTarget buildTarget, string buildPath)
    11.     {
    12. #if UNITY_IOS
    13.         if (buildTarget == BuildTarget.iOS)
    14.         {
    15.             Debug.LogFormat("Cardboard OnPostprocessBuild: {0} {1}", buildPath, buildTarget);
    16.            
    17.             // YES this SHOULD be a method but that seems to break building in Unity (!?)
    18.             // see: http://answers.unity3d.com/questions/1016975/filenotfoundexception-when-using-xcode-api.html
    19.             var projPath = PBXProject.GetPBXProjectPath(buildPath);
    20.             // 'Fix' for 5.1.3 and lower, who return the incorrect xcode project path
    21.             if (projPath.Contains(".xcodeproj") == false)
    22.             {
    23.                 projPath = projPath.Replace("Unity-iPhone", "Unity-iPhone.xcodeproj");
    24.             }
    25.  
    26.             var project  = new PBXProject();
    27.             project.ReadFromString(File.ReadAllText(projPath));
    28.  
    29.             var target = project.TargetGuidByName(PBXProject.GetUnityTargetName());
    30.  
    31.             // TODO: we could manage these settings per project in a json file...
    32.  
    33.             // Uncomment to add extra frameworks to this project
    34.             //project.AddFrameworkToProject(target, "Security.framework", true);
    35.  
    36.             // Uncomment to disable Bitcode
    37.             project.SetBuildProperty(target, "ENABLE_BITCODE", "false");
    38.            
    39.             File.WriteAllText(projPath, project.WriteToString());
    40.         }
    41. #endif
    42.     }
    43. }
     
    MechEthan and SunnyYSSC like this.
  10. SunnyYSSC

    SunnyYSSC

    Joined:
    Mar 10, 2018
    Posts:
    9
    Nice! Glad that Unity is actually approaching them in regard to the EULA issue. Thanks for the note!
     
  11. zloph

    zloph

    Joined:
    Sep 20, 2011
    Posts:
    19
    Any update on this?
     
  12. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    39
    This error persists. Any response from Vuforia yet?
     
  13. coeing

    coeing

    Joined:
    Mar 17, 2011
    Posts:
    271
    Does anyone have an information about the last Unity/Vuforia Version that worked in Unity Cloud Build?
     
  14. zloph

    zloph

    Joined:
    Sep 20, 2011
    Posts:
    19
    anything before 7.5 so 7.2.
     
  15. SunnyYSSC

    SunnyYSSC

    Joined:
    Mar 10, 2018
    Posts:
    9
    The last working version for us was Unity 2018.1.13f and Vuforia 7.2.24, but then the cloud build started not working on same versions. So I don't think the versions of Unity and Vuforia actually matter?
     
  16. Sam-Sproutel

    Sam-Sproutel

    Joined:
    Jun 4, 2018
    Posts:
    5
    We're currently experiencing this on:
    2018.3.0b12
    Vuforia: 7.5.26​

    We are seeing the bitcode error and the Vuforia license issue
    Seems to only be affecting cloud builds...