Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question async auth working in editor but not in build (Quest2)

Discussion in 'Authentication' started by tim_ebert, Jun 22, 2023.

  1. tim_ebert

    tim_ebert

    Joined:
    Mar 30, 2017
    Posts:
    3
    Hi, I'm having problems creating a successful async authentication on Quest 2. I'm using the default Initialize-Setup from the documentation.

    Code (CSharp):
    1. private async void Awake()
    2.     {
    3.             await UnityServices.InitializeAsync();
    4.             Debug.Log("after InitializeAsync");
    5.  
    6.             await SignInCachedUser();
    7.             Debug.Log("after SignInCachedUser");
    8. }
    "While starting the game in the editor, the Initiate works just fine, a token is created/found and all leaderboard functions are usable. However, when I start the game as an .apk, the Initiate isn’t working at all. The console shows neither success nor error messages for the Initiate, so it might be stuck or caught in a loop.

    Any help would be greatly appreciated. Does anyone have a possible solution?"
     
    Omega53 likes this.
  2. Omega53

    Omega53

    Joined:
    Nov 28, 2018
    Posts:
    3
    I am having the same issue now on quest pro. were you able to figure out a solution?
     
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,202
    Could it be that the issue is in what is awaited and not in the await keyword?
    Check logcat and make sure permission are set up correctly.
    Async/await itself is supported on android