question

Matthew Miskiewicz avatar image
Matthew Miskiewicz asked

PlayerProfile request sometimes fails

I don't have a reproduction case, but it seems that sometimes requesting a player profile fails. I'm basing this on my title with with about 17k DAU; I estimate the failure rate to be <1%. Here is the relevant Azure Functions code:

        var playerCombinedInfo = await serverApi.GetPlayerCombinedInfoAsync(
            new PlayFab.ServerModels.GetPlayerCombinedInfoRequest
            {
                PlayFabId = playfabID,
                InfoRequestParameters = new PlayFab.ServerModels.GetPlayerCombinedInfoRequestParams
                {
                    GetPlayerStatistics = true,
                    GetUserReadOnlyData = true,
                    GetPlayerProfile = true,
                    ProfileConstraints = new PlayerProfileViewConstraints
                    {
                        ShowTotalValueToDateInUsd = true,
                        ShowCreated = true
                    },
                    UserReadOnlyDataKeys = new List<string>() { "MetaData", "SubmissionRecord" }
                }
            }
        );
if (playerCombinedInfo.Error != null) return Fail(playerCombinedInfo.Error.GenerateErrorReport());

I have found that sometimes these problems occur:

  1. playerCombinedInfo.Result.InfoResultPayload.PlayerProfile.TotalValueToDateInUSD is 0 or null, even when the player has made purchases and their VTD is > 0 in the dashboard!
  2. playerCombinedInfo.Result.InfoResultPayload.PlayerProfile.Created is 0 or null. I don't think this value should ever be 0 or null!
  3. All player statistics may be 0, even when they are not actually 0!

Is there is any recommendation for detecting when a request to get a player profile has failed, or returned bogus info?

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

·
Xiao Zha avatar image
Xiao Zha answered

Since we can’t reproduce your issue, we need more detailed information. We suggest that you can add a log to collect the original information that the GetPlayerCombinedInfo API returned, and then provide us with the relevant screenshots and log information for troubleshooting.

6 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.

Matthew Miskiewicz avatar image Matthew Miskiewicz commented ·

There is nothing to troubleshoot on my end: I've already captured logs of the returned player profile, and seen with my own eyes what is happening.

My request was not for the issue to be fixed, but if there was a recommended way to validate that the data returned by the function was accurate.

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Matthew Miskiewicz commented ·

There is no way to verify that the returned data is accurate. Unless you use another API to request the same data for comparison. In addition, We would appreciate it if you could provide the log for us to investigate.

0 Likes 0 ·
Matthew Miskiewicz avatar image Matthew Miskiewicz Xiao Zha commented ·

Ok, thanks for the info. Unfortunely, I captured these logs months ago, and they are buried away, so I would have collect new logs. This issue has only recently become something of an issue (due to player counts scaling), which is why I posted about it now.

If I was to capture logs what is the info you want to see? Just print to the logs the full response of the GetCombinedInfo request?

My temporary solution is to check if PlayerProfile.Created is 0 or null, and if so, assume that the API failed and tell the client to try again. This solution appears to be working for now.

0 Likes 0 ·
Show more comments
Xiao Zha avatar image Xiao Zha Matthew Miskiewicz commented ·

Can you provide a log of the original bogus information that the GetPlayerCombinedInfo API returned.

0 Likes 0 ·
Matthew Miskiewicz avatar image Matthew Miskiewicz Xiao Zha commented ·

Alright, I'll let you know once I've captured it.

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.