I have feature in my game where player have facility to buy moves. In that feature two method get called IAPManager.Instance.BuyConsumable and after success purchase PlayFabClientAPI.GetUserInventory get called. This was working fine before but when i have given build on iOS its hang the game after adding moves to game and after debug i get error /Client/GetUserInventory: HTTP/1.1 409 Conflict
Projectpath<>c__DisplayClass86_0:<FetchPlayerInventory>b__1(PlayFabError).
Could you please help me what would be the reason for this
Hi Chen, I agree there is two calls for the "FetchPlayerInventory" function. But one call only executes when there is an error in cloud script execution. Yesterday i also commented the call of "FetchPlayerInventory" function but still game freeze after cloud script executed.
Answer by Junjin Chen · Jan 05 at 07:57 AM
We have inspected your title, there is concurrent error on GetUserInventory call. In general, this error is caused by making multiple calls without waiting for the responses. We have many servers managing all the API calls, sometimes that will work, but sometimes the calls hit the same server and caused the error. Please refer to this thread: https://community.playfab.com/questions/17862/409-conflict-when-calling-getcontentuploadurl.html
Please aggregate the API calls into one call or wait until the previous call’s response before making the next API call.
Hi Chen
I checked my API call there is only one method in which all API are called one by one. The only difference is i am calling ExecuteCloudScript in one of the method which causing issue. This works fine when i make webgl build but it wont work with andriod and iOS build
Answer by Chanda Yadav · Jan 06 at 02:40 AM
Hi Chen
I checked my API call there is only one method in which all API are called one by one. The only difference is i am calling ExecuteCloudScript in one of the method which causing issue. This works fine when i make webgl build but it wont work with andriod and iOS build
We checked your title again and it seems the error does not occur recently. Could you please check if the issue still exists?
Hi Chen,
I checked it not working the game freeze once the cloud script executed. Now its nit even working with webGl build. It was working before but from sometime it stop working
Added the screenshot
Continue to above screenshot
I have tested the CloudScript function you provide, it did not produce any error. The issue you described could be due to this incident: https://status.playfab.com/incidents/fvwln8pddr73. This incident has been resolved. Could you please try again and see if the issue still exist?
No its still not working same issue. game freeze
In the code screenshots you provide, I noticed that the function “FetchPlayerInventory” is called twice, one is in this screenshot and the other is in this screenshot. And the GetUserInventory API is called inside your “FetchPlayerInventory” function. The “/Client/GetUserInventory: HTTP/1.1 409 Conflict” error could be that your “FetchPlayerInventory” function is called twice in a short period of time. Why is your “FetchPlayerInventory” function called in that 2 place? Could you remove one and try again?