Search Unity

Unity Cloud Build API failure

Discussion in 'Unity Build Automation' started by Alex_Worley, Jun 1, 2019.

  1. Alex_Worley

    Alex_Worley

    Joined:
    Mar 13, 2019
    Posts:
    1
    Hello,

    I have a small tool to help trigger builds on Cloud Build set up, and my team ran into an issue where when trying to create a new build target, the API returns an internal server error.

    Here's the body of the api request we're sending: {"Name":"build-name","Platform":"android","Enabled":true,"Settings":{"AutoBuild":false,"UnityVersion":"2018_2_4f1","Scm":{"Type":"git","Branch":"(redacted)},"Platform":{"BundleId":"(redacted)"},"Advanced":{"Unity":{"PreExportMethod":"","PostExportMethod":"","PreBuildScript":"","PostBuildScript":"","ScriptingDefineSymbols":"DEVELOPMENT","PlayerExporter":{"SceneList":[],"BuildOptions":[]},"RunUnitTests":true,"RunEditModeTests":true,"RunPlayModeTests":false,"FailedUnitTestFailsBuild":false,"UnitTestMethod":""}}},"Credentials":{"Signing":{"Credentialid":"(redacted)"}}}


    And the response as follows: "StatusCode: InternalServerError, Content-Type: application/json; charset=utf-8, Content-Length: 286)"
    {"error":"BuildTarget validation failed: executablename: Path `executablename` is required., name: Path `name` is required., buildtargetid: Path `buildtargetid` is required.","detail":["Path `executablename` is required.","Path `name` is required.","Path `buildtargetid` is required."]}

    This was working for us about two days ago; has anything changed?

    EDIT: I attempted to add what I thought were missing settings to the response, but it didn't seem to help.
     
    Last edited: Jun 1, 2019
  2. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
    The first letter of each key should not be capitalized in the JSON body. Try
    {"name":"build-name","platform":"android","enabled":true,"
    etc instead