question

banana avatar image
banana asked

New user, PlayFabClientAPI.GetPlayerCombinedInfo InfoResultPayload.PlayerProfile is null

When calling PlayFabClientAPI.GetPlayerCombinedInfo on a brand new user, sometimes InfoResultPayload.PlayerProfile is either null, or has null content (DisplayName, AvatarURL). It is happening directly after creating a user and changing their display name. We've notice it most after the user has logged out during the current session. After closing the app and restarting the call succedes as expected.

This call is for the local user, we tried the call with and without a playfabId with similar results.

PlayFabClientAPI.GetPlayerCombinedInfo (new GetPlayerCombinedInfoRequest {
        InfoRequestParameters = new GetPlayerCombinedInfoRequestParams {
          GetPlayerProfile = true,
          GetTitleData = true,
          GetUserAccountInfo = true,
          GetUserData = true,
          GetUserInventory = true,
          GetUserReadOnlyData = true,
          GetUserVirtualCurrency = true,
          ProfileConstraints = new PlayerProfileViewConstraints {
            ShowAvatarUrl = true,
            ShowDisplayName = true
          }
        },
        PlayFabId = playFabId
      }
10 |1200

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

1 Answer

·
brendan avatar image
brendan answered

If you're calling this from a Rule that fires in response to the player creation Event, that's expected. We do no wait on everything to be complete in the player setup before sending the Event. If you wait for the response from the login call to the client, that latency should be sufficient - just call the query from the client after that.

2 comments
10 |1200

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

banana avatar image banana commented ·

Hi, we are not calling this from a Rule. This is all on the client flowing through chained success callbacks. We call login with a randomly generated custom Id, then when that returns, we call a few more calls, and then when the user is setup, we request all the data. I added a 0.5 second delay before the call as a hack, which fixes is most of the time, but even that occasionally fails.

0 Likes 0 ·
brendan avatar image brendan banana commented ·

Hm. Under heavy load, I could see it taking slightly longer. If you make that a 1 second wait though, you should be fine.

0 Likes 0 ·

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.