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:
- playerCombinedInfo.Result.InfoResultPayload.PlayerProfile.TotalValueToDateInUSD is 0 or null, even when the player has made purchases and their VTD is > 0 in the dashboard!
- playerCombinedInfo.Result.InfoResultPayload.PlayerProfile.Created is 0 or null. I don't think this value should ever be 0 or null!
- 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?