Search Unity

"Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable"

Discussion in 'Unity Cloud Build' started by fealtydev, May 21, 2019.

  1. fealtydev

    fealtydev

    Joined:
    Dec 25, 2018
    Posts:
    13
    Hey guys,

    I am seeing this in my iOS build log.

    I am not sure how to resolve it.
     
  2. cometa93

    cometa93

    Joined:
    Mar 5, 2014
    Posts:
    21

    Did you solve it?
     
  3. Exotic308

    Exotic308

    Joined:
    Jul 28, 2013
    Posts:
    5
    I have the same problem on Unity Cloud Build. Please post solution if you manage to solve it. Good luck!
     
  4. Exotic308

    Exotic308

    Joined:
    Jul 28, 2013
    Posts:
    5
  5. xg_vahid_ajimine

    xg_vahid_ajimine

    Joined:
    Mar 2, 2018
    Posts:
    7
    This is also and issue for 2018.4.1f1. It works fine for 2018.4.0f1 as these are both LTS versions
     
  6. fealtydev

    fealtydev

    Joined:
    Dec 25, 2018
    Posts:
    13
    Sorry for not noticing your reply sooner.

    Thank you Exotic for sharing that link, that is where we have been diagnosing this issue. It appears its related to selecting 2019.4.x as the build target.

    Dropping down to 2019.2.x should work until issue is resolved.
     
  7. mikael_lingongames

    mikael_lingongames

    Joined:
    Feb 7, 2019
    Posts:
    5
    I can confirm that this issue also persists for 2018.4.2f1.
     
  8. victorw

    victorw

    Unity Technologies

    Joined:
    Sep 14, 2016
    Posts:
    127
    This issue should be resolved in Cloud Build now and I can't see any project belonging to you in Cloud Build - are you experiencing this issue locally when building in batch mode? If so, you can fix it by supplying the
    -username
    and
    -password
    flags.
     
  9. mikael_lingongames

    mikael_lingongames

    Joined:
    Feb 7, 2019
    Posts:
    5
    Ah, yes, forgot to specify that I'm using my own build pipeline (including fastlane, for the XCode part). I tried using -username and -password yesterday after noticing this thread: https://forum.unity.com/threads/upl...stics-when-building-from-command-line.604780/ Unfortunately I am still getting the same error.
     
  10. TommyLavoie

    TommyLavoie

    Joined:
    Apr 10, 2019
    Posts:
    1
    I have the same problem with 2018.4.2f1 and I don't even use Cloud Builds. The username and password flags didn't fix this issue. The only solution I found for now is to downgrade to Unity 2018.4.0f1.
     
  11. dave_thrive

    dave_thrive

    Joined:
    Jan 30, 2019
    Posts:
    22
    I'm also seeing this issue with 2018.4.2f1
     
  12. MarcoPixion

    MarcoPixion

    Joined:
    Jan 29, 2018
    Posts:
    16
    We are not using Cloud Build (we automate Android and iOS builds on our servers) and after upgrading from 2019.1.0f2 to 2019.1.6f1, iOS project's archiving started to fail with the same error.

    We tried downgrading to 2019.4.f1 but the error persists.

    Everything works again after downgrading to 2019.1.0f2 again.

    Fun fact: our framework (a separated Unity Project embedded in any of our games) builds just fine with every next version of Unity.
    The problem appears just when building our game (which contains the framework).
    I wonder then, if it has to do with any Plugin at this point (apart from Photon and Playfab we are not using that much in the game)?

    Also any news on when this will be fixed and/or when 2019.2 will be official (I think I read that this is fixed there)?
     
  13. victorw

    victorw

    Unity Technologies

    Joined:
    Sep 14, 2016
    Posts:
    127
    I don't think this is fixed in 2019.2, I'm pretty sure you will still need to supply username and password there for batch mode builds. I have reported this to the teams responsible for this issue and they are working on it but I have no specific ETA. If you use the editor interface to report a bug then that will help you to get in contact with the support team responsible for these issues and help us to prioritize and understand this issue.
     
  14. dave_thrive

    dave_thrive

    Joined:
    Jan 30, 2019
    Posts:
    22
    Is there a fix for this I can use without downgrading my Unity version? I don't know what batch mode is and I don't know what is meant by adding the username and password to the command line parameters. We have a build server that uses a butchered version of uTomate to build
     
  15. dave_thrive

    dave_thrive

    Joined:
    Jan 30, 2019
    Posts:
    22
    Tried to upload a bug report but the bug reporter is failing at the end with a Bad Gateway error. I have a full build log with the issue if there is somewhere I can upload it
     
  16. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    828
    I'm also having the same issue with Unity 2019.1.8f1 (running my own script for building).

    If I create a build using 'unity batchmode' it will then fail in xCode with the error: "Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable". If I create the build manually using the Unity GUI it will compile ok in xCode.

    I've tried adding the username/password and someone also suggested passing 'serial' number as well but none of that has helped.
     
  17. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    828
    dave_thrive likes this.
  18. victorw

    victorw

    Unity Technologies

    Joined:
    Sep 14, 2016
    Posts:
    127
    Here's the tracker for the underlying issue: https://issuetracker.unity3d.com/is...e-with-runtests-and-cloud-diagnostics-enabled.

    As mentioned earlier this is resolved in UCB and the main thread for the fix (https://forum.unity.com/threads/ios...ed-and-unity-2019-1-4f1-now-available.687163/) also contains details on fixing this issue if you are encountering it in your local batch mode setup - the short version is that you need to start using
    -username
    and
    -password
    in your CLI script. If that doesn't work then yes, you can try defining
    USYM_UPLOAD_AUTH_TOKEN
    to be an arbitrary value but I really don't recommend that.
     
  19. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    828
    Thanks @victorw , I'd tried the username/password (& serial) combo but that didn't seem to fix it for me locally. Everything is working fine for cloud builds but I'm having to do local builds for tvOS so that's why I needed the fix. I mentioned it to UCB support before but it would be nice to have tvOS build support on UCB, even if it's only available for creating TestFlight builds for uploading.
     
  20. dave_thrive

    dave_thrive

    Joined:
    Jan 30, 2019
    Posts:
    22
    Any chance of a solution that doesn't involve me putting my password into our CI config in plain text? Not exactly great security here
     
  21. victorw

    victorw

    Unity Technologies

    Joined:
    Sep 14, 2016
    Posts:
    127
    Depends on what you're using for CI or how it's being hosted, you could probably set up secure env variables and pipe those into your CLI script? Or of course you can switch to using Unity Cloud Build ;).

    In general it's good practice to pass in username and password since there are a lot of features which are unavailable in Unity without logging in and this is unlikely to be the only time that your builds ever wind up breaking because of trying to access functionality which is incompatible with anonymous usage, but yeah I recognize that there's security implications. For the moment the best approach might just be to define an arbitrary value for
    USYM_UPLOAD_AUTH_TOKEN
    . If you're intending to make use of Cloud Diagnostics then there's no workaround though since there's no way to access account-bound services without a login.
     
  22. dave_thrive

    dave_thrive

    Joined:
    Jan 30, 2019
    Posts:
    22
    Could the command line support, maybe an API key or something generated from id.unity3d.com instead? I know it doesn't at the moment but it would keep my credentials secure which is very important in our organisation.
     
  23. victorw

    victorw

    Unity Technologies

    Joined:
    Sep 14, 2016
    Posts:
    127
    I think that would be a feature request and I believe the Unity Hub team are responsible for that functionality so probably your best bet would be to try asking in their forum: https://forum.unity.com/forums/unity-hub.142/
     
  24. vizgl

    vizgl

    Joined:
    Nov 4, 2014
    Posts:
    23
    I am using unity -batchmode to build my project through sh script, and got this error too. When I build from unity edtitor, all works fine
    Unity 2019.1.13f1.
    Use:
    Firebase, Crashlytics
     
  25. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    232
    We have too with unity 2018.4F1, our CI pipeline is completely broken :(