question

Rafael Souza avatar image
Rafael Souza asked

WritePlayerEvent return an error

I'm getting an error when calling WritePlayerEvent, looks like the body parameter can't handle too much data but I'm not sure, the documentation doesn't say anything and the logs don't help either.

Logs:

{
    "FunctionResult": null,
    "Logs": [
        {
            "Level": "Error",
            "Message": "PlayFab API request error",
            "Data": [
                [
                    []
                ],
                [
                    [
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            [
                                [
                                    [
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ],
                                        [
                                            [
                                                []
                                            ],
                                            [
                                                []
                                            ]
                                        ]
                                    ]
                                ],
                                [
                                    []
                                ]
                            ]
                        ]
                    ]
                ],
                [
                    []
                ],
                [
                    [
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ]
                    ]
                ]
            ]
        }
    ],
    "ExecutionTimeSeconds": 0.8950821999999999,
    "MemoryConsumedBytes": 615064,
    "APIRequestsIssued": 7,
    "HttpRequestsIssued": 0,
    "Error": {
        "Error": "CloudScriptAPIRequestError",
        "Message": "The script called a PlayFab API, which returned an error. See the Error logs for details.",
        "StackTrace": "Error\n    at Object.server_request (Script:180:24)\n    at Object.server.WritePlayerEvent (Script:629:73)\n    at Object.handlers.PurchaseItems (B7CD-main.js:1017:12)\n    at handlers.PurchaseItems2 (B7CD-main.js:956:21)\n    at Object.invokeFunction (Script:116:33)"
    }
}
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

Could you please provide some reproduction steps or titleId so we can try to investigate it?

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

Rafael Souza avatar image Rafael Souza commented ·

Found the problem, body parameter can't handle too much data, saw the message error from a client call. Now I still don't understand why calling it from the dashboard gives me this weird error data, happens to any cloud script method that returns an error.

TitleId: B7CD

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Rafael Souza commented ·

How did you call WritePlayerEvent API from the dashboard, could you please provide some reproduction steps?

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.