question

Juicy Beast avatar image
Juicy Beast asked

Sometime purchases are not being granted, with no trace in event history?

From time to time, players will successfully buy iap (transaction goes fine through Apple / Google, credit card gets charged), but something will go wrong with PlayFabClientAPI.ValidateGooglePlayPurchase / PlayFabClientAPI.ValidateIOSReceipt, leaving no trace in the Player's Event History log.

Most of the time, I manually add the missing item to that player's inventory and everything goes back to normal, but some other time, seems like there's a downtime or something that prevents that player from recovering the item.

In some cases, it's only a matter of waiting some time before the issue resolves itself, but in other cases, it doesn't, as if the player cannot connect to his Playfab account anymore.

Here's some Event History's screenshots showing that:

We are on the Essential Tier at the moment, and we've looked at our title's limits to make sure we did not went over any of them, and everything seems fine on that side.

We also looked at Playfab Server Status to make sure everything was online, and nothing wrong there as well.

That being said, we can't seem to figure out what's happening and that made us lose some players as we couldn't do much to help them restore their purchases.

Any insight or help on this would be greatly appreciated.

Thanks,

apisPlayer DatalimitsAuthenticationPlayer Inventory
10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Hi @Juicy Beast,

Yes, I can see that ValidateIOSReceipt generated plenty of “InvalidParams” results and many “InvalidReceipt” results were generated by ValidateGooglePlayPurchase. In general, InvalidReceipt often indicates that something about the receipt is incorrect. If it came back correctly from Apple, you should check that the "receipt-data" sent to Apple is the same as the "ReceiptData" sent to PlayFab. InvalidParams means literally, there may be something wrong with the parameter you passed to ValidateIOSReceipt, if would be helpful to add more logging from the client-side to identify the problem. By the way, I can see plenty “InvalidBundleID” results generated too, it often means that the Bundle ID defined for your title in PlayFab (on the Settings page of the Game Manager) needs to match your game's Bundle ID in iTunes (usually something like "com.company_name.app_name").

Sorry that I cannot see the details from the second pic, I checked those affected users:

For Player 3ED24451489FBEC1, I can see the event “player_inventory_item_added” (InstanceId :6709AC9F801B16A6) generated and the item (the same InstanceId as in the event ) granted in the inventory at the same time(October 4, 2019 9:35 PM).

For Player 62B05C587B5D0BBD, although I cannot see the event on October 3, however, I can the item (Instance ID: DF966F22ED60DC9D) granted in the inventory on October 3, 2019 10:48 PM

For Player B416207307E743D2, the situation is exactly like Player 3ED24451489FBEC1 (Instance ID: F45DDFDAB32A90A).

Looks like those items are restored immediately after you manually add them. I am assuming that you are using GetUserInventory from the client to get the player’s inventory, and the problem you are facing is that the item added was not returned from the response, is that right? If that’s the case, we might need to inform our engineering team to take a look.

10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Hi @Juicy Beast

You said that something went wrong with PlayFabClientAPI.ValidateGooglePlayPurchase / PlayFabClientAPI.ValidateIOSReceipt, were you able to get the error messages? You can see the brief status by navigating to <Game Manager> -> <Title Overview> -> <API CALLS Panel>, select ValidateGooglePlayPurchase/ValidateIOSReceipt, that would help us identify the issue.

You stated that ”but some other time, seems like there's a downtime or something that prevents that player from recovering the item”, did you mean that you cannot manually add the missing to that players?

Can you provide your title id and PlayFab Ids of the players who were having trouble restoring their purchases? We might need to investigate it, thanks.

10 |1200

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

Juicy Beast avatar image
Juicy Beast answered

Hi @Citrus Yan,

thanks for the quick reply on this.

I looked at the API calls, looks like there's something related to "InvalidReceipt" & "InvalidParams"?

The error we managed to received from a user was from a video, and the quality is not that great, but maybe you can guess what it is from this (I'm waiting to receive a clearer version) ->

As for the ”but some other time, seems like there's a downtime or something that prevents that player from recovering the item”, I can manually add the item. It's just that sometime, it can take up to a day or more before the change is reflected in the affected player's game. Most of the time it is instant though.

Our Title Id is: D120D

Some of the affected user IDs are:


3ED24451489FBEC1 (first screenshot in previous post)

Items restored on October 4. Actually restored in game on October 7.

62B05C587B5D0BBD (second screenshot)

Item manually added on October 3. Never restored in game even until today.

B416207307E743D2

Item manually added on October 7. Actually restored on October 8.

Again, thanks for your time and support on this!


api-calls-ios.png (20.2 KiB)
purchase-error.png (195.4 KiB)
10 |1200

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

Juicy Beast avatar image
Juicy Beast answered

Hi again @Citrus Yan,

I'm not sure how we would receive some InvalidReceipt / InvalidParams when we have many other transactions that go through without issues?

Same thing goes for the Bundle ID. If there was something wrong there, wouldn't this lead to way more issues?

Is it possible that these errors come form people trying to hack / trick the game into getting the IAPs without paying for them? (Even though most of the time players show me their receipts and they seem legitimate.)

As for restoring the missing items, as I mentioned before, yes, most of the time they are restored immediately, but in some occasion, they are not. We are indeed using GetUserInventory, so maybe there's something wrong happening before that, unsuccessful login or something else?

I've just updated the SDK from 2.69.190625 to 2.75.191001 so maybe this will help in some ways?

And when you say "the Bundle ID defined for your title in PlayFab (on the Settings page of the Game Manager) needs to match your game's Bundle ID in iTunes", are you talking about this page ->

Because I've looked pretty much everywhere for it, and the only place I see something related to Bundle ID would be where we defined all the Item IDs for the IAPs?

Thanks,


10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Hi @Juicy Beast,

>>For the first three questions:

Yes, I agree, it possible that these errors come from people trying to hack the game. However, in order to identify the exact issue, you may need to add more logging from the clients to analyze.

>>...so maybe there's something wrong happening before that, unsuccessful login or something else?

I don't think it would relate to an unsuccessful login if you are able to make the GetUserInventory call to PlayFab. Can you confirm that the affected user you mentioned above were able to call GetUserInventory to get their inventory but cannot get the manually added item from the response? In other words, the players' clients can successfully call GetUserInventory to PlayFab and get a successful callback, however, the response does not contain the newly added item.

>>I've just updated the SDK from 2.69.190625 to 2.75.191001 so maybe this will help in some ways?

As long as you can make a valid Http request to PlayFab service, it won't make any difference which version of SDK you are using. In your case, the SDK version doesn't matter.

>>Because I've looked pretty much everywhere for it, and the only place I see something related to Bundle ID would be where we defined all the Item IDs for the IAPs?

The Bundle Id should be on this add-on page: https://developer.playfab.com/en-US/D120D/addons/Apple

10 |1200

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

Juicy Beast avatar image
Juicy Beast answered

Hi @Citrus Yan,

>>...so maybe there's something wrong happening before that, unsuccessful login or something else?

From the screenshots I provided in my first post, no event is logged in affected players' Event History after I restored their purchase, even though I've received videos and images as proof that they played the game in this time frame. So my guess is that they don't even get a change to reach GetUserInventory?

And I'm not sure how we can add additional logging if the basic events aren't registering?

And thanks for pointing out the to Bundle ID page. Both Apple and Google are active and look fine, so the "InvalidReceipt / InvalidParams" error should not be coming from that.

1 comment
10 |1200

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

Citrus Yan avatar image Citrus Yan commented ·

Hi @Juicy Beast

>>...So my guess is that they don't even get a change(you mean chance, is that right?) to reach GetUserInventory?

Actually, from the screenshots you provided in the first post, I can see that the "player_inventory_item_added" event (this should correspond to restoring items for the player) is generated in Player 3ED24451489FBEC1 (first screenshot in the previous post) and Player 62B05C587B5D0BBD's Event History. As I see it, the events are actually logged in the affected players' Event History. So, if you can provide some proofs to show that the players' clients called GetUserInventory successfully but were not able to receive the newly added items from the response, that's something we may need to investigate.

>>And I'm not sure how we can add additional logging if the basic events aren't registering?

I think the events are indeed generated("player_inventory_item_added"). You may need to add some loggings to see if they actually reached GetUserInventory, and if they did reach it, you need to prove that the response doesn't include the newly added items.

0 Likes 0 ·
Juicy Beast avatar image
Juicy Beast answered

Hi @Citrus Yan,

>> I think the events are indeed generated("player_inventory_item_added").

This is directly related to me adding the item.

From the client side, after that event, nothing else is logged.

That being said, we added custom event so I'll keep you updated when we have more data to show.

Best,

1 comment
10 |1200

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

Citrus Yan avatar image Citrus Yan commented ·

OK, if you find a prove to show that GetUserInventory cannot return newly added items, that's something we may need to investigate.

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.