question

brandon@uprootstudios.com avatar image
brandon@uprootstudios.com asked

UpdateTitleDisplayName failing for some users outside the US on Android only

Hi,

We've noticed that a few users were appearing (3 from Mexico, 1 from India) that didn't have display names assigned (you cannot play until you create a username). Looking at our Crashlytics reports, we're seeing the following related errors for these users:

Non-fatal Exception: java.lang.Exception
NullReferenceException : Object reference not set to an instance of an object.

    LoginController+<>c__DisplayClass379_0.<ConfirmUsername>b__2 (LoginController+<>c__DisplayClass379_0)
    System.Action`1[T].Invoke (System.Action`1[T])
    System.Action.Invoke (System.Action)
    PlayFab.Internal.PlayFabUnityHttp.OnResponse (PlayFab.Internal.PlayFabUnityHttp)
    PlayFab.Internal.PlayFabUnityHttp+<Post>d__12.MoveNext (PlayFab.Internal.PlayFabUnityHttp+<Post>d__12)
    UnityEngine.SetupCoroutine.InvokeMoveNext (UnityEngine.SetupCoroutine)
    PlayFab.Internal.PlayFabUnityHttp:OnResponse (PlayFab.Internal)
    PlayFab.Internal.<Post>d__12:MoveNext (PlayFab.Internal)
    UnityEngine.SetupCoroutine:InvokeMoveNext (UnityEngine)
Non-fatal Exception: java.lang.Exception
PlayFabException : Must be logged in to call this method

    PlayFab.PlayFabClientAPI.UpdateUserTitleDisplayName (PlayFab.PlayFabClientAPI)
    System.Action`1[T].Invoke (System.Action`1[T])
    System.Action.Invoke (System.Action)
    PlayFab.Internal.PlayFabUnityHttp.OnResponse (PlayFab.Internal.PlayFabUnityHttp)
    PlayFab.Internal.PlayFabUnityHttp+<Post>d__12.MoveNext (PlayFab.Internal.PlayFabUnityHttp+<Post>d__12)
    UnityEngine.SetupCoroutine.InvokeMoveNext (UnityEngine.SetupCoroutine)
    PlayFab.Internal.PlayFabUnityHttp:OnResponse (PlayFab.Internal)
    PlayFab.Internal.<Post>d__12:MoveNext (PlayFab.Internal)
    UnityEngine.SetupCoroutine:InvokeMoveNext (UnityEngine)

We have yet to see this happen on any iOS clients (worldwide) or any US-based Android clients.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brandon@uprootstudios.com avatar image
brandon@uprootstudios.com answered

Has anyone else encountered this issue? It seems to only really affect players from Mexico using a vairety of devices, which makes it almost seem like it could be a Carrier issue?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image
Seth Du answered

According to the symptom, it is possible that this issue is caused by the network connection.

“Must be logged in to call this method” usually occurs when the client API is called without login. Is UpdateUserTitleDisplayName API called in the callback result of login API? Otherwise, you will need to implement a mechanism that makes sure client API won’t be called if there is no valid session ticket.

“Object reference not set to an instance of an object.” will be a common error, which may occur when a variable is not assigned (some API doesn’t get a successful callback, hence the following required variable is not initialized).

It will be necessary to write some try catch sentences to increase the robustness so that the client can handle this error and if the login is not successful, the player should re-do the job.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.