question

Victor Ocariz avatar image
Victor Ocariz asked

CloudScript executed from Player dashboard returns unreadable response

Hello there!

So first some context. Every time that we are working on a new handler for the CloudScript, we test it first from the Player dashboard, so we can quickly test the revision without deploying it to "LIVE" and then catch any issues to be polished.

But from a while now, all the data in the responses and the logs is looking like this:

{
    "FunctionResult": [
        [
            []
        ],
        [
            []
        ],
        [
            [
                [
                    []
                ],
                [
                    [
                        [
                            [
                                [
                                    [
                                        []
                                    ],
                                    [
                                        []
                                    ],
                                    [
                                        [
                                            [
                                                []
                                            ]
                                        ]
                                    ]
                                ]
                            ]
                        ]
                    ]
                ],
                [
                    []
                ],
                [
                    [
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            [
                                [
                                    [
                                        []
                                    ]
                                ]
                            ]
                        ]
                    ]
                ]
            ]
        ]
    ],
    "Logs": [
        {
            "Level": "Error",
            "Message": "PlayFab API request error",
            "Data": [
                [
                    []
                ],
                [
                    [
                        [
                            [
                                [
                                    [
                                        []
                                    ],
                                    [
                                        []
                                    ],
                                    [
                                        [
                                            [
                                                []
                                            ]
                                        ]
                                    ]
                                ]
                            ]
                        ]
                    ]
                ],
                [
                    []
                ],
                [
                    [
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            []
                        ],
                        [
                            [
                                [
                                    [
                                        []
                                    ]
                                ]
                            ]
                        ]
                    ]
                ]
            ]
        }
    ],
    "ExecutionTimeSeconds": 0.0344686,
    "MemoryConsumedBytes": 221888,
    "APIRequestsIssued": 1,
    "HttpRequestsIssued": 0,
    "Error": null
}

The execution is doing fine, but I guess this could be some problem with the dashboard response encoder or how the dashboard shows the data to us.


The "ExecuteCloudScriptRequest" from the Unity client the response is just working as expected, no weird brackets as response. We can always test the revisions building a request from Unity, but this is more time consuming and we'd love to have the dashboard working smoothly as it used to do before!

Let me know if we can do anything to help and track this issue.

CloudScript
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

After testing, we found the CloudScript returns the Json Object as the empty array on the Players/CloudScript page. It should be a Game Manager display issue. Did your Players/CloudScript page can display the correct JSON Object before?

Currently, the possible workaround is to use the external testing tool -- Postman to test the API ExecuteCloudScript. Please refer to this document -- Quickstart PlayFab REST API collection for Postman - PlayFab | Microsoft Docs to learn about how to use the Postman to test the PlayFab API. Since the Players/CloudScript page can show the correct JSON string, you can also try to use the JSON.stringify method to convert your result to string, so that the Players/CloudScript page can display 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.

Victor Ocariz avatar image Victor Ocariz commented ·

Hi Sarah, thank you for your answer.

Yes, we were able to display the correct JSON Object before. Some weeks ago.

And also we've already tried to use the JSON.stringify() method to see if the object would be displayed correctly but still the same result.

I'll check the Postman tool for testing meanwhile.

Thank you again!

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Victor Ocariz commented ·

Thanks for the report, we will inform our team to investigate this [Game Manager] display issue.

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.