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. B96d7d5bc82e9fe19f45e5c1f4e1cbf2?d=mm


    Jul 26, 2021 08:09

    Issue re-occurred in version 2020.3.10f1

  2. D106128f8d52d1e15dcae0829a8341d3?d=mm


    Nov 18, 2020 09:59

    Unity 2020.1.12f still getting the error.
    2019.3.11 the same.
    I'm using TeamCity and launch XCode with a command line.

  3. 6e4702385c5c9c2123cff01ee855d584?d=mm


    Nov 05, 2020 07:24

    Having the same issue with Jenkins and Unity 2019.4.2f

  4. 346e4f71ad0de0ebd42a6ff89087c03f?d=mm


    Nov 03, 2020 09:30

    This issue happens again with 2019.4.12f1 when building for iOS

  5. 82103bbfe643b7ce415a5cd746db1677?d=mm


    Oct 07, 2020 12:52

    Issue reoccured in 2019.4.11f1 for iOS and tvOS Simulators.

    Giving username and password in command line arguments seems not to be enough.

  6. 9b99e5e12cb62ea5d3ce9960e56b740e?d=mm


    Sep 29, 2020 18:41

    This issue has also been reproduced on 2019.2.18f1, using -username and -password doesn't seem to be fixing it.

  7. 0f1631df304548087ac4cabb54dc76a9?d=mm


    Aug 31, 2020 21:31

    Ok, for me the issue was that I was using the Unity ID username, but the actual email must be used instead. Like:
    -username -password XYZ123

  8. 882801bd5166744aaf02a1b5da2ac2be?d=mm


    Jul 27, 2020 09:50

    Issue reoccured in 2019.4.4f. Giving username and password in command line arguments seems not to be enough.

  9. 16e94268f3e8a3c343baf65e2f22f477?d=mm


    Jul 03, 2020 10:23

    Its working after adding CD access to my jenkins machine

  10. 16e94268f3e8a3c343baf65e2f22f477?d=mm


    Jul 02, 2020 16:00

    Still reproducible in 2019.3.0f6. I am using jenkins to build.
    "time="2020-07-02T21:16:00+05:30" level=warning msg="Failed to create log file at /Users/jenkins/Library/Logs/Unity/symbol_upload.log: open /Users/jenkins/Library/Logs/Unity/symbol_upload.log: no such file or directory"
    time="2020-07-02T21:16:00+05:30" level=fatal msg="Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable"
    Command PhaseScriptExecution failed with a nonzero exit code"

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.