UpdatePlayerNameAsync not working

the documentation states “Players must be signed in to create or update their player name.” but running

AuthenticationService.Instance.UpdatePlayerNameAsync(playerName)

gives me :

Unity.Services.Authentication.AuthenticationException: Invalid state for this operation. The player is already signing in.

Please post the full stacktrace and the full offending code. Are you using async / await or not? This is not visible in the line you sent.

I am signing into google with :

    private void Awake()
    {

#if UNITY_ANDROID
        PlayGamesPlatform.Activate();
        PlayGamesPlatform.Instance.Authenticate(delegate (SignInStatus status) {
            Debug.Log("------------- PlayGamesPlatform.Instance.Authenticate] status=" + status);
            string playerName = PlayGamesPlatform.Instance.GetUserDisplayName();
            UpdateName(playerName);
        }); 
#endif
    }

    public async void UpdateName(string playername)
    {
        try
        {
            Debug.Log("Trying to update name to: " + playername);
            await AuthenticationService.Instance.UpdatePlayerNameAsync(playername);
        }
        catch (RequestFailedException ex)
        {
            Debug.Log("Error changing name: " + ex);
        }
    }

and this is the error:

AndroidPlayer "samsung_SM-S918W" Error changing name: Unity.Services.Authentication.AuthenticationException: Invalid state for this operation. The player is already signing in.
  at Unity.Services.Authentication.AuthenticationServiceInternal.UpdatePlayerNameAsync (System.String playerName) [0x00000] in <00000000000000000000000000000000>:0
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0
  at Unity.Services.Authentication.AuthenticationServiceInternal.UpdatePlayerNameAsync (System.String playerName) [0x00000] in <00000000000000000000000000000000>:0
  at SettingsPanelManager.UpdateName (System.String playername) [0x00000] in <00000000000000000000000000000000>:0
  at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0
  at SettingsPanelManager.UpdateName (System.String playername) [0x00000] in <00000000000000000000000000000000>:0
  at SettingsPanelManager.<Awake>b__4_0 (GooglePlayGames.BasicApi.SignInStatus status) [0x00000] in <00000000000000000000000000000000>:0
  at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <00000000000000000000000000000000>:0
--- End of stack trace from previous location where exception was thrown ---

  at SettingsPanelManager.UpdateName (System.String playername) [0x00000] in <00000000000000000000000000000000>:0
  at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0
  at SettingsPanelManager.UpdateName (System.String playername) [0x00000] in <00000000000000000000000000000000>:0
  at SettingsPanelManager.<Awake>b__4_0 (GooglePlayGames.BasicApi.SignInStatus status) [0x00000] in <00000000000000000000000000000000>:0
  at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <00000000000000000000000000000000>:0
<UpdateName>d__6:MoveNext()
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(TStateMachine&)
SettingsPanelManager:UpdateName(String)
SettingsPanelManager:<Awake>b__4_0(SignInStatus)
GooglePlayGames.OurUtils.PlayGamesHelperObject:Update()

I solved it by delaying the call to update the name