Search Unity

Building Android builds with 2018.x fail on a pre-2018 project

Discussion in 'Unity Build Automation' started by Kumo-Kairo, Aug 25, 2018.

  1. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    Hi. I'm developing an assetstore package and use unity cloud build extensively to build APKs in different Unity versions. The main project Unity version is 5.3, but cloud targets are set all the way up to 2018.2. Android builds work correctly on all targets up to 2017.4, but fail on 2018.1 and 2018.2 with the following error:
    Code (CSharp):
    1. 3678: [Unity] Refresh: detecting if any assets need to be imported or removed ... Refresh: elapses 0.323730 seconds (Nothing changed)
    2. 3679: [Unity] Refresh completed in 0.323769 seconds.
    3. 3680: Unhandled Exception: UnityEngine.UnityException: GetBool is not allowed to be called while application is terminating.
    4. 3681:   at <0x00000> <unknown method>
    5. 3682:   at <0x00000> <unknown method>
    6. 3683:   at <0x00000> <unknown method>
    7. 3684:   at <0x00000> <unknown method>
    8. 3685: [Unity] Cleanup mono
    (I can share the whole full log if requested)

    It also says that there's an error opening an ivy.xml for Built-in Facebook SDK (which I don't even use), but I don't think it's a culprit.
    It seems that it tries to open the headless mode after closing it for some reason, but fails in the process due to that strange bug - https://forum.unity.com/threads/is-there-a-closing-editor-change-between-beta-9-and-beta-10.538072/

    Is there a workaround for cloud builds on this?
     
    metakefir and MihaPro_CarX like this.
  2. KrcKung

    KrcKung

    Joined:
    Jul 18, 2017
    Posts:
    56
    Having similar problem as well, causing us not able to run unit test due to this error.
     
    MihaPro_CarX likes this.
  3. avive_jellybtn

    avive_jellybtn

    Joined:
    Jul 24, 2016
    Posts:
    4
    Was this fixed? suffering from this issue as well (2018.2.2f1)
     
  4. KrcKung

    KrcKung

    Joined:
    Jul 18, 2017
    Posts:
    56
    Not sure if you're using Jenkins to run the unit test, here is the way we temporary solve it in our company for now, we force it to return true no matter how after running the unit test, the only draw back for now is that it will attempt to build the project then fail the build process if unit test is failing.

    "/Applications/Unity/Hub/Editor/2018.2.11f1/Unity.app/Contents/MacOS/Unity" -projectPath "${WORKSPACE}" -batchmode -nographics -runEditorTests -editorTestsResultFile "${WORKSPACE}/build/test-reports/test_result_build_${BUILD_NUMBER}.xml" || true
     
  5. KBaxtrom-LevelEx

    KBaxtrom-LevelEx

    Joined:
    Feb 5, 2018
    Posts:
    28
    Bumping this thread. Anyone find a cause or more permanent solution?
     
  6. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    I have just setup a completely custom CI solution on one of my machines and now build everything using discord bot commands. Build times also improved significantly (it used to take an hour to build an Android build on Unity Cloud, now it takes 3 minutes). I don't use Jenkins or other systems, it's pretty bare-bones and hacked-up together, but I haven't faced any issues so far.

    I highly recommend investing some time into building a custom CI solution, it's really worth it.