question

Wonderland avatar image
Wonderland asked

CloudScript UpdateUserReadOnlyData dont update data,CloudScript UpdateUserReadOnlyData sometimes does not update data

I call the UpdateUserReadOnlyData method however when I check the data of the user on the playfab I understand that they have not been updated (this is not always but often) the response from the method returns only that part of the response body where "data". That is, I get "DataVersion", its not help me, because "DataVersion" may change during the time I received the old DataVersion and requested UpdateUserReadOnlyData.

Questions:
1. Why data may not be updated?
2. how do I get a full body response or at least an HTTP status code

,

I call the UpdateUserReadOnlyData method however when I check the data of the user on the playfab I understand that they have not been updated (this is not always but often) the response from the method returns only that part of the response body where "data". That is, I get "DataVersion", its not help me, because "DataVersion" may change during the time I received the old DataVersion and requested UpdateUserReadOnlyData.
Questions:
1. Why data may not be updated?
2. how do I get a full body response or at least an HTTP status code

Player Data
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

·
Sarah Zhang avatar image
Sarah Zhang answered

There are many possible reasons for it. I’m wondering if you can provide your TitleId and more specific info about this issue? Where did you execute the CloudScript function that includes the API call of UpdateUserReadOnlyData, like Rules or Scheduled Tasks? And where did you check the response body, like on the Event history page? Did you find some error messages?

If you want to get a full-body response that includes an HTTP status code. You can try to use third-party REST API testing tools to test your CloudScript function calls or other API calls, like Postman. You can call Client/Server API ExecuteCloudScript on the testing tool and check the response body that appears in it. You can check this doc for details of Postman SDK.

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

Wonderland avatar image Wonderland commented ·

My CloudScript code runs on playfab. a python client that requests a server (cloudScript) method called OpenChest. OpenChest does something and then needs a UserReadOnlyData update. And in some cases, UserReadOnlyData for some reason is not updated.
I get no errors
used postman and also could not update the data even though the responce was 200 OK

0 Likes 0 ·
Wonderland avatar image Wonderland commented ·

and maybe this information will help:
1. I have a free version
2. Server queries - the server is made frequently

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Wonderland commented ·

Do you ensure you didn't exceed the CloudScript limit? You can navigate to [GameManager]->[Settings]->[Limits] to check it. Is it possible that your cloud script execution time over 4.5s?

0 Likes 0 ·
Wonderland avatar image Wonderland Sarah Zhang commented ·

if the limit was broken it would cause a message error. or no?

0 Likes 0 ·
Show more comments
Wonderland avatar image Wonderland commented ·

I request client-server to empty function and the "Player data updates per request" graph show 2 update request.
is it possible?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Wonderland commented ·
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.