question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

ConnectionError when calling RedeemMatchmakerTicket

I'm receiving a ConnectionError when calling RedeemMatchmakerTicket from my server.

I'm calling RedeemMatchmakerTicket via the

PlayFabServerAPI.RedeemMatchmakerTicketAsync method in the C# SDK using the ticket and lobbyId from my client, which my client received from its call to Matchmake.

(In any event, I'm assuming that I'd receive a more specific error if the lobbyId or ticket were incorrect.)

Additionally, on the server, I'm setting PlayFabSettings.DeveloperSecretKey via the title_secret_key passed in via command line, and setting PlayFabSettings.TitleId via the title_id passed in via command line.

How should I proceed in debugging further?

Custom Game ServersMatchmaking
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

·
brendan avatar image
brendan answered

A connection error would mean that your server is having trouble hitting the endpoint for the call. Can you provide the code snippet of how you're making the call, and the info on which SDK you're using (with version)?

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

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

I'm calling it as follows (CSharpSDK) - not sure exactly which version; I got the versioned copy on Monday, 10/4/16.

The code snippet in question is as follows:

var task = PlayFabServerAPI.RedeemMatchmakerTicketAsync(new PlayFab.ServerModels.RedeemMatchmakerTicketRequest()
                {
                    Ticket = matchmakerTicket,
                    LobbyId = lobbyId
                });

Fairly certain that the matchmakerTicket and lobbyId are correct, but I'll confirm it with logs if needed. (Wouldn't it show a different error if they were invalid?)

Update: I ran it again and logged the Ticket and LobbyId. They are as follows:


Ticket

F13D3F29D6D1AE65-0-D45D1228A5FF8283-9092-8D3EE4E0F334B4E-391D641CE76FD053.7C2582AF02ACA3CF 

Lobbyid

3599758651714011384

0 Likes 0 ·
brendan avatar image brendan Brent Batas (Lisk) commented ·

To be clear, the error isn't coming from PlayFab. A Connection Error is a more fundamental error, indicating that you couldn't reach the endpoint. The full error message should contain additional details on what form the connection error took - timeout, abort, no permissions, etc. As I've never seen any hosted game server have issues calling the Server API methods, we'll need more info to try to track this down. Can you try logging the complete response?

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) brendan commented ·

Will do when I get back to this issue. Thanks for the context!

0 Likes 0 ·
Show more comments
Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

1) I'm not familiar with UseDevelopmentEnvironment and have never referenced it, so I assume it is false.

2) I just copy & pasted the logic from PlayFabServerStartupCommand from the custom game server to parse the command line arguments for title_id among other things.

0 Likes 0 ·
brendan avatar image brendan Brent Batas (Lisk) commented ·

In the example server, we set a class named ServerSettingsData in that call. But the PlayFabSettings class is where the TitleId value is stored, which is used for the API calls from the server. You'll notice that in the startup logic for the server sample, we set the PlayFabSettings.TitleId to be the ServerSettingsData.TitleId (https://github.com/PlayFab/PlayFabGameServer/blob/bd07a13bf6c72e0b7e3a388c1f94f1d2da14c06e/GameServerSource/Assets/Packages/DefaultPackages/PlayFabServer/Commands/PlayFabServerStartupCommand.cs).

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) brendan commented ·

Sorry for the confusion - I do exactly that. I set PlayFabSettings.TitleId to be the ServerSettingsData.TitleId.

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Any update on this @Brendan ? still getting the same error.

0 Likes 0 ·
brendan avatar image brendan Brent Batas (Lisk) commented ·

So again, the Connection Error indicates you aren't even talking to the PlayFab service. Can you get a NetMon or Wireshark capture, with SSL decryption (ex: https://wiki.wireshark.org/SSL), so that we can see specifically what your call is trying to do?

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) brendan commented ·

Just to clarify, I am supposed to run Wireshark on the PlayFab server?

Edit: I looked at the SDK signature again, and I'm pretty sure I'm just not calling the async function properly. What is the recommended way to call this type of async function?

0 Likes 0 ·
Show more comments

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.