Search Unity

Suddenly android builds taking more than 2 hours and being automatically cancelled

Discussion in 'Unity Build Automation' started by abeldantas, Aug 16, 2019.

  1. abeldantas

    abeldantas

    Joined:
    Jul 28, 2013
    Posts:
    19
    I have a repo/cloud build setup where builds from a new branch are taking several hours only to be cancelled, what causes cloud build to spontaneously cancel builds?

    The log ends like this:

    upload_2019-8-16_23-3-17.png
    Code (CSharp):
    1. 15156: [Unity] Platform modules already initialized, skipping
    2. 15157: [Unity] Script Compilation Pipeline Post Process Assets time: 72.796693s
    3. 15158: [Unity] Assembly Updater Post Process Assets time: 0.178223s
    4. 15159: Build was canceled
    5. 15160: Killing process...
    6. 15161: postbuildstatus finished successfully.
    7. 15162: postbuildsteps finished successfully
    8. 15163: Finished: CANCELED
     
    Last edited: Aug 16, 2019
  2. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
    Cloud Build cancellations are never spontaneous. Auto-cancellation happens when the build runs for too long, usually because a process has stalled.

    Typically this happens in user-provided or third-party scripts since Editor devs know better than to introduce potential stalls into the build process. Unfortunately these tend to be extremely difficult to debug though since stalls are usually a side effect of a failure but do not themselves log any useful error.

    See if you can determine what change was introduced to cause this, potentially by locking the Unity target version to exactly the same version as you are developing on locally. If you can't identify the issue then we can take a look at your project if you submit a support ticket
     
  3. NamiaLus

    NamiaLus

    Joined:
    Nov 16, 2016
    Posts:
    2
    You may want to try turning off caching.
     
  4. abeldantas

    abeldantas

    Joined:
    Jul 28, 2013
    Posts:
    19
    You are right, there was a AndroidManifest conflict that wasn't showing on the cloud build log.

    Making a manual build shows errors that don't show on cloud build.
     
    victorw likes this.