On our CI server we build iOS build by running BuildPipeline.BuildPlayer() in Editor batch mode. Turns out that Xcode project that is exported that way has empty USYM_UPLOAD_AUTH_TOKEN and because of that process_symbols.sh step fails to upload symbols to Unity Cloud Diagnostics. Looks like editor do not log-in into unity cloud services when running in batch mode. I’ve checked that by calling UnityEditor.Connect.UnityConnect.instance.GetAccessToken() in post build step and it returned empty string. Is there any way to force Unity Editor to log-in to cloud services when running in batch mode? Or maybe I can obtain upload auth token by some REST api calls in by post build steps?
Unfortunately, symbol upload does not work in batch mode.
Are there any plans to make it work in the future?
We are currently working on a change to support batch mode for symbol upload. We’ll be able to provide more details on what versions of Unity the change will be available in a couple of weeks.
Any updates on this?
We have made a change to support this in our mainline branch and we are now working on identifying which versions of Unity the change can be brought to.
I really hope this will be backported to upcoming 2018.4 LTS
Please inform to this thread which version applied.
Sorry for the delay on this. This fix will be backported up to 2018.4. You should expect it in the latest patch, 2018.4.1, as well as in 2019.1.3f1.
In Unity 2019.1.3 patch notes there is a line:
Services: Fixed symbol upload for Cloud Diagnostics not working in batch mode. (851655, 1140370)
Can’t find the same for 2018.4.1
After upgrading from 2018.4.0f1 to 2018.4.1f1, I can’t build ios projects with jenkins, it gives “Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable” error. With 2018.4.0f1, everything is fine.
I found that to be the case when upgrading from 2018.4.0f1 to 2018.4.1f1 as well. Adding the “-username” and “-password” options to the Unity command line arguments seemed to resolve it, however.
I have the same issue with USYM_UPLOAD_AUTH_TOKEN in Unity 2019.1.3f1. I tried to follow fhickman’s advice and now i am getting this error:
build 14-Jun-2019 17:00:23 [UnityConnectServicesConfig] config is NOT valid, switching to default
error 14-Jun-2019 17:00:23 [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
error 14-Jun-2019 17:00:23 [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
error 14-Jun-2019 17:00:23 [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Anybody encountered that ?
I have the same problem in 2018.4.3f1
First missing file usymtool.
Users/mmalek/tests/Repro/YlandsClassID91/Builds/iOS/DEV_mobile/Dist/Ylands/process_symbols.sh: line 8: /Users/mmalek/tests/Repro/YlandsClassID91/Builds/iOS/DEV_mobile/Dist/Ylands/usymtool: No such file or directory
After copy missing script from Unity app (Unity.app/Contents/Tools/macosx/) and rerun xCode build I got error.
Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable
Also just got bitten by this USYM_UPLOAD_AUTH_TOKEN bug in 2018.4.2.
@Ryan-Unity any idea when the fix will be backported to the LTS branch? Is there any proper workaround while we’re waiting? Thanks!
Hi @DarekRusin , I’m sorry for the late response. 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.
We are currently looking into a known issue where using the -runTests argument throws this same error on iOS even after including both -username and -password. You can track our progress on that fix here.
@Ryan-Unity thanks so much! I did not now that specifying username and password is now required. Once I’ve added these, everything started working properly
In teamcity we fix it, by patching process_symbols.sh in xcode project.
Just change strings with usymtool on something like there:
#!/bin/sh
process_symbols
Copyright (c) 2015 Unity Technologies. All rights reserved.
if [ “${SYNCHRONOUS_SYMBOL_PROCESSING}” = “TRUE” ]; then
echo test
else
nohup “$PROJECT_DIR/usymtool” -symbolPath “$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME” > /dev/null 2>&1 &
disown
fi
@Ryan-Unity Can we get info on what usymtool is, and what’s the downside to not using it?
If it’s just for desymbolicating via Unity Could then it sounds like it should be an opt-in feature because most teams already doing desymbolication are already using something else.
The solution of not using it also came up here usymtool is eating up all my RAM
Hi @psydent , sure thing. usymtool is used to process symbol files from the build and upload them to the Unity Cloud Diagnostics servers. It is required if Cloud Diagnostics is enabled. If you are having an issue with it, please submit a formal bug report with reproduction steps.