question

Juan Manuel Martinez avatar image
Juan Manuel Martinez asked

GetMatchmakerGameInfo constantly giving 500 error

Hi there, I'm trying to make a simple API call from giving a real lobbyid (Not the Alphanumerical one).
Any ideas about this problem?!

Thanks!

{

"code": 500,

"status": "InternalServerError",

"error": "InternalServerError",

"errorCode": 1110,

"errorMessage": "An unexpected error occured while processing the request.",

"errorHash": "5375b936ecd29fd2cf4454cf29fe62ed",

"errorDetails":

{

"RequestID": ["02ee6da521804fc18a15d34d46487d85"]

}

}

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

Unfortunately, the GetMatchmakerGameInfo API call is not consistent with the rest of the custom game server API calls, in its usage of the LobbyId. That call takes the LobbyId as hexadecimal (in a string), where all the other custom game server calls both take and return it in decimal format. Apologies for the confusion. At a later date, we'll be updating with new API calls to make sure they're all consistent (we can't just change the current call, as that would be a breaking change), but for now I'll get the docs updated to clarify this.

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

Juan Manuel Martinez avatar image Juan Manuel Martinez commented ·

Ok, but the problem persist. We've tried to parse the lobbyid which comes with command line game_id parameter to hexadecimal, and then use this value with GetMatchmakerGameInfo (in a string format). We have tried this in our game server, testing from your API web and from SOAP UI. The returned error is always InternalServerError. Any ideas? Does anybody use this API call?

Thanks Brendan,

Juan,

0 Likes 0 ·
brendan avatar image brendan Juan Manuel Martinez commented ·

To be clear, the game_id parameter passed into the server is in decimal format, not hexadecimal. It's just the one API call (GetMatchmakerGameInfo) that uses hexadecimal.

0 Likes 0 ·
Juan Manuel Martinez avatar image Juan Manuel Martinez brendan commented ·

Ok. For example: StartGame API call gives us the next result:

{ "code": 200, "status": "OK", "data":

{

"LobbyID": "18265818525428928437",

"ServerHostname": "52.49.103.80",

"ServerPort": 9001,

"Ticket": "75C0640084174425-0-B19-27D9-8D3FCAEC08A6E6C-343223B071D854CF.XXXXXXXXXXX",

"Expires": "2016-10-25T08:15:07.4178668Z"

} }

Then this lobby Id when parsed to hexadecimal give us: FD7D392C23F0CFB5.

This is the same number that appears in Dashboard Servers/Active Games section (Lobby Info column). Now, facing GetMatchmakerGameInfo with this request:

{

"LobbyId" : "FD7D392C23F0CFB5"

}

Give us a result:

{

"code": 400, "status": "BadRequest", "error": "InvalidParams", "errorCode": 1000, "errorMessage": "Invalid input parameters", "errorDetails":

{

"LobbyId": ["failed to parse input string as number"]}

}

0 Likes 0 ·
startgame.jpg (188.9 KiB)
Show more comments
Juan Manuel Martinez avatar image Juan Manuel Martinez commented ·

Hi Brendan,

Any new about the fix?

Thanks

Juan,

0 Likes 0 ·
brendan avatar image brendan Juan Manuel Martinez commented ·

Yes, the fix should be going live in today's deployment (by EoD today).

0 Likes 0 ·
Juan Manuel Martinez avatar image Juan Manuel Martinez brendan commented ·

Giving the lobbyID in hexadecimal format:

{ "code": 400, "status": "BadRequest", "error": "InvalidParams", "errorCode": 1000, "errorMessage": "Invalid input parameters", "errorDetails": {"LobbyId": ["failed to parse input string as number"]} }

Giving the lobbyIDin decimal format:

{ "code": 500, "status": "InternalServerError", "error": "InternalServerError", "errorCode": 1110, "errorMessage": "An unexpected error occured while processing the request.", "errorHash": "5375b936ecd29fd2cf4454cf29fe62ed", "errorDetails": {"RequestID": ["39fab91fc35f4c049b06848b9aed72cd"]} }

The problem still happens.

0 Likes 0 ·
Show more comments
Juan Manuel Martinez avatar image Juan Manuel Martinez Juan Manuel Martinez commented ·

I mean, The GetCurrentGames Server API call.

0 Likes 0 ·
brendan avatar image brendan Juan Manuel Martinez commented ·

Given that the call you were trying to use is in the Admin API set, I'm guessing this is for a tool you'll be using locally? We're hoping to have the Server update available in the next few weeks, but you could enable this right now by using the Client API call in your tool, signing in with your own user account.

0 Likes 0 ·
Show more comments
david-marcelis avatar image david-marcelis commented ·

It seems this issue is still persistent to some degree. Although the GetMatchmakerGameInfo call now expects a decimal representation, the LobbyIds are being displayed in hex in the Active/Archived Games tabs. This inconsistency is quite confusing, and the docs don't provide any clarifications

0 Likes 0 ·
brendan avatar image brendan david-marcelis commented ·

Actually, GetMatchmakerGameInfo has always taken the LobbyID as a decimal value (in a string, granted) - that hasn't changed. I thought that was clearly documented, since it is a disconnect from the other API calls, but I see that it isn't. I'll file a bug to get that updated.

1 Like 1 ·
brendan avatar image
brendan answered

The issue is that the LobbyId in the call is a string containing the hexadecimal representation of the Lobby ID. Normally, passing in a LobbyId which doesn't match an existing lobby wouldn't be a problem and you'd just get back the GameNotFound error. However, since the value you're passing in could be interpreted as a hex number, the system is attempting to convert it. But it exceeds the size of a 64 bit value, as it's more than 16 digits (the LobbyId you passed in was "5886965902760920147"). I'm filing a bug to check for this case and return the correct error, but the solution to the issue is to always pass the Lobby ID as hexadecimal (in the string).

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

Juan Manuel Martinez avatar image Juan Manuel Martinez commented ·

Hi Brendan,

My dedicated server is running on this error. The real problem is that this id is the one retrieved by the command line param game_id. Should this param be in hexadecimal format? The same happens when you use GetCurrentGames API Client call.

Just with a simple parse to hexadecimal value is enough?

Thanks

Juan,

0 Likes 0 ·
brendan avatar image brendan Juan Manuel Martinez commented ·

The ID is passed in as a string, in hex format. If you're parsing it into a ulong and then converting that to a string for the call to GetMatchmakerGameInfo (without specifying hex format), that would be the issue. Parsing it into a string would be the simplest way to solve this.

0 Likes 0 ·
Juan Manuel Martinez avatar image Juan Manuel Martinez commented ·

Hi again,

I understand what you say, but it doesn't work any combination. I'm going to explain all the tested cases:

  1. Call StartGame API Call. the value retrieved (a lobby id string in decimal format).
    1. Pass this lobby Id as string to GetMatchmaker Info: Error 500, Internal Server Error.
    2. Pass this lobby Id as string in hexadecimal format to GetMatchmaker Info: Info: Error 500, Internal Server Error.
    3. Pass any random Lobby id which will NOT contain any letter of the Hexadecimal format to GetMatchmaker Info: GameNotFound.
    4. Pass any random Lobby id which will contain any letter of the Hexadecimal format to GetMatchmaker Info: GameNotFound.

While you test this API call, we are going to use GetCurrentGames API call from server side. This is because we want to let the server know which players has redeemed the ticket against Playfab Matchmaker.

Thanks,

0 Likes 0 ·
brendan avatar image brendan Juan Manuel Martinez commented ·

You have my apologies - I've now reviewed all the code for all the custom game server API methods, and I have to correct what I said. All the API calls except GetMatchmakerGameInfo take and return the LobbyId/GameId in decimal form, not hexadecimal. I'll deselect this answer and respond with an update, so that I can tag that as correct (to make this thread easier to read).

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.