Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[5.5.1+] - BuildPipeline missing namespace but manual build works

Discussion in 'Unity IAP' started by Erik-Hegen, Mar 29, 2017.

  1. Erik-Hegen

    Erik-Hegen

    Joined:
    Aug 5, 2014
    Posts:
    17
    Hi, I'm not sure where to place this issue but I think it is a bug regarding the Unity Purchasing Service.

    The situation is following:
    We are running a build slave for our builds with a buildscript executing the BuildPipeline.BuildPlayer method. This systems worked now for quit a long time but with the new unity versions we encountered the following issue:
    But the missing dll were checked out and exists in the workspace. If we try to build manually it also works.
    Fortunatly this issue only appears on new jobs or when we clear the workspace of an existing job.

    Unfortunatly this bug occoures in every of our projects.

    The IAP Service ist activated and a user with a valid pro licence is logged in on our build maschine.

    I tried deleting the library and the temp folder and building the project again manually. But after the (successfull, manual) build, the BuildPipeline command still fails with the same errors.

    We also have a identical job with nearly the identical workspace for our android builds wich works perfectly.
     
  2. Redoxee

    Redoxee

    Joined:
    Jun 15, 2016
    Posts:
    3
    Still happening for me on 5.6
    but only on mac OS (my pipeline work fine on windows10)
    does someone have a clue ?
     
  3. GladFoxx

    GladFoxx

    Joined:
    May 16, 2017
    Posts:
    1
    We have the same problem.
     
  4. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    967
    @Erik-Hegen, @Redoxee, @GladFoxx

    Those are the errors you would get if the IAP service was disabled in your project. I'm not sure why BuildPipeline wouldn't pick that up correctly.

    Would you be able to fill out a bug report in the Editor? Attaching a repro project would be immensely helpful in figuring out the issue.
    https://unity3d.com/unity/qa/bug-reporting
     
  5. Erik-Hegen

    Erik-Hegen

    Joined:
    Aug 5, 2014
    Posts:
    17
    The problem still exists. I'm afraid I cannot send you our complete projects as they are multiple gb of file size.
    The only help I can give is a report on what happens with every project we have:
    • Create new project
    • Import IAP
    • Checkout project on a Mac OS maschine
    • Build via BuildPipeline -> success
    • Update IAP on original maschine (when IAP updates are available)
    • Push changes to server (we use git)
    • Pull changes on Mac OS maschine
    • Build via BuildPipeline -> still success
    • Checkout project again on Mac OS maschine into a different folder
    • Build via BuildPipeline -> Bug
    • Build manually -> success
    • Build via BuildPipeline -> still Bug (new)
    I'm not 100% sure but this is the way we reproduced the issue everytime in every project of ours. Currently we have min 5 projectes affected by this issue. For a long time we had a workaround to manually build the project on the Mac OS maschine successfully, and building again with BuildPipeline. Then it worked, but not since the latest IAP update (2017.1). Now this workaround also doesn't work any longer.

    I cannot say for my own that the problem only occurs on Mac OS but this is the os our build server runs with.
    Services are active, deleting library folder doesn't work either

    Sorry for the delayed response but we tried to solve this problem by our own since we suspect the issue on our side
     
    Last edited: Aug 23, 2017
  6. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    967
    @Erik-Hegen

    Thanks for the updated report. I've created a bug report and our QA team will try to repro this issue.

    Could you confirm which version of IAP you are using and what versions of the Editor have this issue for you?
     
  7. Erik-Hegen

    Erik-Hegen

    Joined:
    Aug 5, 2014
    Posts:
    17
    I can confirm that it happens with 2017.1f1 and the latest IAP verion

    EDIT: unity 2017.1 und IAP 1.13.1
     
  8. LuisResco

    LuisResco

    Joined:
    Feb 2, 2017
    Posts:
    1
    Any update about this?
     
  9. toshbaird

    toshbaird

    Joined:
    Jan 12, 2017
    Posts:
    3
    We are also having this problem. It only seems to happen if we switch build target though possibly? (ie. build iOS successfully, switch to Android on a subsequent build and it fails). This is super frustrating as it makes automated building much trickier than it needs to be. We also had issues on UCB which only started happening when we enabled iAP in the project, it definitely seems to be related to the iAP Unity module.
     
    Erik-Hegen and LuisResco like this.
  10. Erik-Hegen

    Erik-Hegen

    Joined:
    Aug 5, 2014
    Posts:
    17
    Any updates on this? With the latest version of IAP and Unity (2017.3f03) we can not even build only one project via the build pipeline. It seems that UNITY_ANALYTICS is not enabled on the build machine. Opening the project manually works. An automatic build directly after opening it manually, also works. But every additional build fails again.

    Please guys, implementing your IAP service with all its technical teething and bugs took us a lot of time. Having a automatic build pipeline is totally necessary for us or every other small-middle-sized company.

    Reproduction:
    1. import IAP in a project
    2. checkout the project on a different build machine (we are using a Mac Pro)
    3. try to build via using shell command line
    Best regards,
    Erik
     
    PGI2017 likes this.
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,771
    One important item, make sure that you are also including your Library folder in source control. This may or may not be relevant here, but I wanted to point it out. If you are sharing/uploading your project and not including the Library folder, you may see issues like this. Generally including the Library folder is not necessary, we are working on this issue. I will do additional checking here also.
     
  12. xerohuang

    xerohuang

    Joined:
    Mar 31, 2014
    Posts:
    6
    Same 5.6.4p3
     
  13. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,771
    @xerohuang Did you include the Library folder in source control?
     
  14. xerohuang

    xerohuang

    Joined:
    Mar 31, 2014
    Posts:
    6
    Included. Build successfully when I open Unity manually. Failed in batchmode. (same machine, same path)
     
  15. xerohuang

    xerohuang

    Joined:
    Mar 31, 2014
    Posts:
    6
    More details: Succeeded in batchmode as user account, but failed as service account (jenkins).
     
    PGI2017 likes this.
  16. PGI2017

    PGI2017

    Joined:
    Mar 30, 2017
    Posts:
    30
    I think this is similar to what I'm seeing happen as well. Were you able to get the service account to work?
     
  17. xerohuang

    xerohuang

    Joined:
    Mar 31, 2014
    Posts:
    6
    We use Jenkins to auto-build android and ios package. There are two different project in Jenkins, checking out codes at different path. I login as Jenkins and open ios project once manually, then ios build succeeded but android build failed. And open android project manually, then ios build failed but android build succeeded. (build by Jenkins)
     
  18. xerohuang

    xerohuang

    Joined:
    Mar 31, 2014
    Posts:
    6
    Let me guess what happened: Unity saved local datas that indicating the Project-ID is building for what platform. When open project manually(and change platform), Unity check platform again and rewrite the local datas. But in batchmode, Unity just read the local datas and think it's for the wrong platform at some steps (such as loading IAP plugins).
     
  19. Erik-Hegen

    Erik-Hegen

    Joined:
    Aug 5, 2014
    Posts:
    17
    @JeffDUnity3D

    So we included the whole library folder in git. Still the same. IAP is installed but not enabled when the build pipline starts to build.

    We also receive this log message:
    Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs(3,0): warning CS1030: #warning: `"Unity IAP plugin is installed, but Unity IAP is not enabled. Please enable Unity IAP in the Services window."'

    The logged in user on the build slave is member of the project and company and has a valid unity pro license.

    Is there maybe a way to enable or check the services per code?
     
    PGI2017 likes this.
  20. Erik-Hegen

    Erik-Hegen

    Joined:
    Aug 5, 2014
    Posts:
    17
    Our current approach:
    We inserted
    Code (CSharp):
    1.  
    2.            UnityEditor.Purchasing.PurchasingSettings.enabled = true;
    3.             UnityEditor.Analytics.AnalyticsSettings.enabled = true;
    4.             AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
    5.  
    before invoking the build pipeline. Stil not working. Opening the project manually works perfectly
     
    PGI2017 likes this.
  21. PGI2017

    PGI2017

    Joined:
    Mar 30, 2017
    Posts:
    30
    We've tried multiple newer versions of Unity with the same issue. This problem seems to have originated sometime after 5.6.1p1.
     
  22. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,771
    We are continuing to investigate. Have you had a chance to test with Unity 2018.1 ? We are testing here also.
     
  23. PGI2017

    PGI2017

    Joined:
    Mar 30, 2017
    Posts:
    30
    For us, Unity appears to get stuck in an infinite loop during the build. It never completes.

    (Filename: Assets/Plugins/UnityChannel/XiaomiSupport/Editor/AppStoreOnboardApi.cs Line: 46)

    Reloading assemblies after finishing script compilation.
    Begin MonoManager ReloadAssembly

    Refreshing native plugins compatible for Editor in 16.44 ms, found 5 plugins.
    Preloading 2 native plugins for Editor in 2.40 ms.
    UnityIAP: [InitializeOnLoad] Facebook Check
    UnityIAP: Runtime [2018.1.0b6]
    UnityIAP: Current Build is iOS:iOS
    UnityIAP: stub FacebookStore.dll enabled
    Mono: successfully reloaded assembly

    Refreshing native plugins compatible for Editor in 2.09 ms, found 5 plugins.
    Preloading 2 native plugins for Editor in 2.65 ms.

    ----- Total AssetImport time: 0.306176s, AssetImport time: 0.000000s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]

    - Completed reload, in 2.454 seconds
    Initializing Unity.PackageManager (PackageManager) v2018.1.0 for Unity v2018.1.0b6
    Registering platform support modules:
    Registered platform support modules in: 0.093266s.
    Native extension for OSXStandalone target not found
    Native extension for WebGL target not found
    Native extension for iOS target not found
    Native extension for Android target not found
     
  24. Erik-Hegen

    Erik-Hegen

    Joined:
    Aug 5, 2014
    Posts:
    17
    Still the same problem in 2018.1.0b6. Namespaces are missing
     
  25. ttermeer-reboundcg

    ttermeer-reboundcg

    Joined:
    Jul 12, 2017
    Posts:
    11
    Same issue with Unity 2017.1.0p5 and the lastest version of Unity IAP on a Mac High Sierra (10.13.3)
    While running in Unity in command line (with or without batchMode), I suspect that the IAP dll is not loaded on launch of Unity and thus the compilation fails.


    Edit: Same result on a Windows 10 machine.
     
    Last edited: Feb 12, 2018
  26. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,771
    It's my understanding that this issue will be addressed in a soon upcoming release of 2018.1 beta.
     
    PGI2017 likes this.
  27. ttermeer-reboundcg

    ttermeer-reboundcg

    Joined:
    Jul 12, 2017
    Posts:
    11
    Can we expect this to hit 2017.1 ? This is a major issue for us.
    (or at least have a workaround)
     
    PGI2017 likes this.
  28. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    1,771
    We are checking here to see if the update will be back ported, and will keep this thread updated.
     
    ttermeer-reboundcg likes this.
  29. PGI2017

    PGI2017

    Joined:
    Mar 30, 2017
    Posts:
    30
    2018 b7 is showing the same issue.