question

Fakhra AlMansouri avatar image
Fakhra AlMansouri asked

Cloudscript execution sometimes fails from client call

We are calling Cloudscript function from client as following:

PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest() {

			FunctionName = "ChallengePlayer",
			FunctionParameter = new Dictionary<string, object>() {
				{ "currentPlayerId", GameManager.instance.myPlayFabId }
			}
		}, null, OnPlayFabError);


Cloudscript does not get executed sometimes however works perfectly fine if we call same function from player dashboard with with same argument.

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

v-humcin avatar image v-humcin ♦ commented ·

Can you post your cloudscript? What error is being returned when it fails?

0 Likes 0 ·
Fakhra AlMansouri avatar image Fakhra AlMansouri v-humcin ♦ commented ·

No error, seems like it does not execute at all sometimes. Does Playfab limit Cloudscript execution call from client side? BTW just to make clear this "no execution" only happens few times but same Cloudscript revision works fine if we call it from Game Manager.

Here is our Cloudscript code: https://www.servicehusky.com/textbin/XynTl79L

0 Likes 0 ·
v-humcin avatar image v-humcin ♦ Fakhra AlMansouri commented ·

Unfortunately I cannot view the code at that URL, posting the code directly in a comment may be best. There are some limits on how many API calls can be made at a time from a client. Are you making a large number of other calls at the same time from the client?

Also you may have checked this already, but I figured I should clarify, the ExecuteCloudScript API call itself can return as a success and contain an error from the cloudscript. Can you try adding a OnCloudSuccess callback instead of leaving it null and see if an error returns there? Something like this should work:

void OnCloudSuccess(ExecuteCloudScriptResult result)
    {
        Debug.Log("Success");
        if(result.Error != null)
        {
            Debug.Log(result.Error.Error);
            Debug.Log(result.Error.Message);
        }
    }

0 Likes 0 ·
Show more comments

0 Answers

·

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.