Search Issue Tracker

Fixed in 2020.1.X

Fixed in 2018.4.X, 2019.2.X, 2019.3.X



Found in



Issue ID




[iOS] Batchmode builds fail with CloudDiagnostics enabled when USYM_UPLOAD_AUTH_TOKEN is not set

Cloud Diagnostics


Internal repro:
./ --suite=integration --testtarget=iOS --testfilter=Unity.IntegrationTests.CrashReporting.CrashReportingBuildsTest.CanBuildiOS
The test enables CloudDiagnostics and performs a batchmode build. The resultant Xcode project won't compile with the error:
Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable.

Compiling the Xcode project by passing the env variable to xcodebuild process results in a successful build:
USYM_UPLOAD_AUTH_TOKEN=test xcodebuild build <projectPath>

To reproduce:

1. Download attached "" project and open in Unity
2. Change the platform to iOS
3. Enable Cloud Diagnostics
4. Close Unity Editor
5. Build in BatchMode with Arguments:

<Unity Path> -batchmode -buildTarget iOS -runTests -testplatform playmode -projectpath <PATH> -executeMethod BuildScript.UnityBuildTest -username <Your Unity ID> -password <Password of your Unity ID> -quit

6. When Build complete, open Xcode project
7. In Menu bar press Product > Build

Expected result: Xcode successfully Builds Project
Actual result: Xcode fails to Build Project and throws Error:

"Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable"

- This issue happens only on iOS
- If You Build directly from Unity Editor, everything works as Expected
- If You Build without "-runTests -testplatform playmode" or with Cloud Diagnostics disabled, the Build in Xcode completes without any issues
- The Project and a Video how to reproduce this issue are attached in Comments section
- There are few Forum links to this issue:

Reproduced on Unity 2018.4.1f1, 2018.4.3f1, 2019.1.9f1, 2019.2.0b8 and 2019.3.0a8
Not reproduced on Unity 2018.4.0f1
Regression on Unity 2018.4.1f1

Comments (28)

  1. 882801bd5166744aaf02a1b5da2ac2be?d=mm


    Aug 14, 2019 15:03

    Reproduced in 2019.1.14f1 as well.

  2. 7f2ef4247316de40b14dce5b0175bf9a?d=mm


    Aug 09, 2019 06:49

    In teamcity we can fix it, by patching in xcode project.

    Just change strings with usymtool on something like there:


    # process_symbols
    # Copyright (c) 2015 Unity Technologies. All rights reserved.


    echo test

    nohup "$PROJECT_DIR/usymtool" -symbolPath "$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME" > /dev/null 2>&1 &

  3. 48e90eef596fdd4eda77b966a18d8ea8?d=mm


    Aug 06, 2019 20:59

    Unity 2019.1.13f1

  4. 19fd9b7257f6c2faffcbfdf7cdc04f85?d=mm


    Jul 31, 2019 03:31

    I was able to resolve this by adding -username and -password arguments.

    Info found here:

    "When using Cloud Diagnostics with -batchmode it's now required that you specify both the -username and -password arguments to avoid the USYM_UPLOAD_AUTH_TOKEN error message."

  5. B2f7e325b3496366f0bbb33a639da009?d=mm


    Jul 28, 2019 07:07

    Did anyone check 2018.4.5f1?

  6. E8a9678b045ce1e55aa73322e433d172?d=mm


    Jul 26, 2019 23:34

    This problem showed up on our Jenkins build script when we updated from 2018.3.10 -> Unity 2018.4.4. I tried added username, password, and serial as some other forums posts suggested but it did not help. The build will occasionally/randomly succeed but usually we get the USYM_UPLOAD_AUTH_TOKEN error.

  7. F815ab59681803b223cd231ef18f97d7?d=mm


    Jul 15, 2019 07:40

    this is also reproduced on Unity 2018.4.4f1

  8. 1e1228c7ba760a5e06d01a05c0778297?d=mm


    Jul 08, 2019 15:09

    This is a major problem for us, we need the Diagnostics tool enabled to be able to track crashes.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.