question

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

StartGame hangs silently

My call to StartGame has the following three results

1. Succeeds (most of the time)

2. Fails with error - No game servers available (some of the time)

3. Hangs silently (occasionally)


I'm trying to figure out why #3 happens. My code properly handles #1 and #2. However, once #3 happens, subsequent calls to StartGame never return properly.

My code looks like this:

public static async Task<StartGameResponse> StartGame(string args, string ownerPlayFabId, Action<PlayFabError> onError)
{
    DeveloperApi.Log("StartGame with args: " + args);

    var task = await PlayFabMatchmakerAPI.StartGameAsync(new StartGameRequest()
    {
        Build = BuildId,
        Region = Region,
        CustomCommandLineData = args,
        GameMode = GameMode,
        // TEMP: copied from Will's code. Just some random URL here.
        // for some reason, passing in null gives invalid input parameters
        // see Brendan email
        ExternalMatchmakerEventEndpoint = WWW.EscapeURL("https://hooks.zapier.com/hooks/catch/[commented out]"),
    });

    if (task.Error != null)
    {
        if (!string.IsNullOrEmpty(ownerPlayFabId))
            LobbyApi.LogPlayFabError(task.Error, ownerPlayFabId);

        if (onError != null)
            onError(task.Error);
    }

    return task.Result;
}

Any errors should be logged, and I print "Finished StartGame" after the caller calls this function, so I am fairly confident that it is just hanging forever.

sdks
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

I've never seen any API call fail to get a response - can you get a Wireshark capture so that we can see the details of the call/response? Also, are you able to reproduce this in Postman at all?

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.

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

I'm not sure how to get a Wireshark capture on the remote AWS server, unfortunately. It seems to hang at about a 1/200 rate, so it's hard to reproduce unfortunately. But it happens about every 15-60 minutes at high load.

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

What I'm suggesting is that you run your matchmaker server locally, so that you can get a Wireshark capture of the calls to StartGame.

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

I recall you mentioning SSL Decryption as being required for Wireshark capture, and referred me to this link (

https://wiki.wireshark.org/SSL#Complete_SSL_decryption_walk_through) - I'm confused; where do I enter those commands? I thought Wireshark is a GUI program.

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.