question

brendan avatar image
brendan asked

RunCloudScript 500 Internal Server Error

btiger
started a topic on Tue, 18 August 2015 at 12:23 AM

Hello guys, I was testing out the playfab with photon integration.

While using Postman to test the playfab api, I have encountered a 500 internal server error while attempting to call the RunCloudScript api with actionId helloWorld, this would not be a token issue as if it was it will spit out an auth error message instead.

Any ideas?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

8 Comments
Brendan Vanous said on Tue, 18 August 2015 at 3:13 PM

Thanks - all 500 errors represent error conditions for which we don't have a clearly defined error message. As such, they all get auto-created as bugs in our system, so that we make sure to go and put a definition and return value in place.

Now that said, I just created an account in your title and tested this RunCloudScript call against all the revisions you uploaded to Cloud Script, and they all worked. Are you still seeing this error?

Brendan


btiger said on Tue, 18 August 2015 at 7:20 PM

Hey Brendan,

Thanks for investigating, unfortunately, I am still having the problem, here let me post you more screenshots and details so that we can resolve this issue together.

If possible, will you post your postman's build also, so that I can run it over my side, see if it works.

Game Title: 59CD

User ID used: E37F9CE3843254A5

Do I actually need to grant any permission to my user or what's not?


btiger said on Tue, 18 August 2015 at 7:23 PM

In the attached screenshot in the previous post, the green boxes are fields that I have checked and assume to be correct, do let me know if I have done anything wrong.


Brendan Vanous said on Wed, 19 August 2015 at 12:30 AM

Well, since (at the moment) your current script doesn't have the handler you're calling, all I'm getting back is CloudScriptNotFound, but for the sake of argument, here's the call I'm making (below). The one thing I noticed in your screenshots that was odd was that you had a Session Ticket that had "--" in it. The "-" separator goes between values in the ticket, and there shouldn't be any instances of that dash without a value in between. Can you provide the sign-in credentials for that account?

POST /1/prod/client/RunCloudScript HTTP/1.1

Host: 59CD.playfablogic.com

Content-Type: application/json

X-Authentication: {
                 {SessionTicket}}

{ 

  "ActionId": "onLevelComplete",

  "Params": {"level":2}

}


btiger said on Wed, 19 August 2015 at 2:39 AM

Hi Brendan, the user is created /auth with customID api : https://api.playfab.com/Documentation/Client/method/LoginWithCustomID

You think there's a bug in you guys' server regarding this area?

My session ticket is still giving a long string with the "---", using only a part of the string in an attempt to call RunCloudScript will result in a NotAuthenticated error instead of error 500.

I have attached the postman request for authenticating this user as well as the new attempt to RunCloudScript, I have deployed an old cloudscript with the helloWorld actionId, but it's still throwing up with the same error.

Let me know what you suspect.

Cheers.


Brendan Vanous said on Wed, 19 August 2015 at 11:16 AM

Aha! No, sorry - I wasn't considering that this could be an ID-based (Device or Custom) sign in. That is indeed a perfectly valid Session Ticket, in that context.

Let's focus on the 500 error. I am not able to reproduce that, making the same call. I'm using your Postman collection's RunCloudScript call, with my own signed-in client (signed in with a CustomId). Here's the output:

{

  "code": 200,

  "status": "OK",

  "data": {

    "ActionId": "helloWorld",

    "Version": 1,

    "Revision": 1,

    "Results": {

      "messageValue": "Hello A3AB21B82EA47F24!"

    },

    "ResultsEncoded": "{\"messageValue\":\"Hello A3AB21B82EA47F24!\"}",

    "ActionLog": "info : \"Hello A3AB21B82EA47F24!\"\n",

    "ExecutionTime": 0.0009996999999999999

  }

}

Brendan


btiger said on Wed, 19 August 2015 at 7:23 PM

Good morning Brendan,

Here we go again. I just checked, the cloud script is now working. Now that's just weird, I didn't change anything, you guys fixed something over your side?

Cheers.


Brendan Vanous said on Thu, 20 August 2015 at 12:25 AM

Sorry, no - nothing was changed on the backend for Cloud Script. If you can manage to get the error to reproduce, we'd love to see a Netmon (or similar) capture showing the details.

Brendan

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Never Rage Dungeons and Dragons avatar image
Never Rage Dungeons and Dragons answered

I am having similar issue

failedtoidententifyplayfabserverapi.png


10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.