Search Issue Tracker

Fixed in 2020.1

Fixed in 2018.4, 2019.2, 2019.3

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

  1. D40ed9727d7be0dbf1b368d8092082a3?d=mm

    cozyurt_unity

    Jul 11, 2020 14:47

    kedi ,köpek mama ve konserveleri www.patilimama.com

  2. 16e94268f3e8a3c343baf65e2f22f477?d=mm

    SandeepNsk_SpiritualGamer

    Jul 03, 2020 10:23

    Its working after adding CD access to my jenkins machine

  3. 16e94268f3e8a3c343baf65e2f22f477?d=mm

    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"

  4. A7fc77997f658076faebbc04c80afff3?d=mm

    tbg10101_

    Jun 30, 2020 02:57

    Still happening in Unity 2019.4.

  5. 19f8516b8d7ddeaba3a76e6c0e6f3f53?d=mm

    eliatlas1

    May 27, 2020 14:57

    Still reproduced

  6. 624eb24d6ae467a9abb49b25c8df7b98?d=mm

    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!

  7. 8a99dc2bd63af8a5ee33fc84b089449b?d=mm

    unity_ru5MYsmC2Pl_HA

    May 21, 2020 05:34

    Still reproduced in Unity2018.4.23f1

  8. C364bb5dceae6db8cb22d210a1f6f78b?d=mm

    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.

  9. C364bb5dceae6db8cb22d210a1f6f78b?d=mm

    mcarriere

    May 20, 2020 12:21

    This is still occurring on 2019.3.14f1 -- we typically use jenkins for CI, but can even get this to reproduce if we simply run it as the main user on system.

  10. F9a7600692d6bd4ef09a9c40dcbc0781?d=mm

    yangskybox

    May 07, 2020 16:17

    I just tested 2019.3.13f1 and I don't believe this is fixed? Does "fixed" mean "provide credentials on commandline so it's able to generate token" or "a way exist to leave Cloud Diagnostics ON but without uploading debug symbols".

    What revision was this actually fixed in?

    We're still having to disable crash reporting entirely or giving Unity an invalid token to work around htis.

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.