Search Issue Tracker

Fixed in 2020.1.X

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

Votes

39

Found in

2018.4.1f1

2018.4.3f1

Issue ID

1167025

Regression

Yes

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

Cloud Diagnostics

-

Internal repro:
./utr.pl --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.zip" 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"

Notes:
- 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:
https://forum.unity.com/threads/ios-build-issues-should-be-resolved-and-unity-2019-1-4f1-now-available.687163/
https://forum.unity.com/threads/unity-2018-4-1f1-lts-batch-build-for-ios-is-not-working.690103/
https://forum.unity.com/threads/unity-2018-4-1f1-lts-batchmode-for-ios-is-not-working.693010/

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 (33)

  1. thomasb_unity972

    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.

  2. esg-odeoliveira

    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 YOUR-UNITY-ID@company.com -password XYZ123

  3. ylen_sami

    Jul 27, 2020 09:50

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

  4. SandeepNsk_SpiritualGamer

    Jul 03, 2020 10:23

    Its working after adding CD access to my jenkins machine

  5. SandeepNsk_SpiritualGamer

    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"

  6. tbg10101_

    Jun 30, 2020 02:57

    Still happening in Unity 2019.4.

  7. eliatlas1

    May 27, 2020 14:57

    Still reproduced

  8. fp-unity

    May 23, 2020 21:21

    The issue is in 2019.3.13 and we used can get rid of it by adding a fake token but now even build directly via Xcode without using batch mode can still cause this problem. That only happens after we upgrade from 2019.2 to 2019.3.13. Please reopen this bug!

  9. unity_ru5MYsmC2Pl_HA

    May 21, 2020 05:34

    Still reproduced in Unity2018.4.23f1

  10. mcarriere

    May 20, 2020 21:07

    Just wanted to followup here after digging in a bit more: we too were able to resolve this by adding -username and -password arguments in 2019.3.0f6. Would be desired to have some sort of failure state on the build that described that when running a build in batchmode with these services enabled.

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.