GameLiftError: ErrorType=NETWORK_NOT_INITIALIZED - GetInstanceCertificate()

Hi,

I am attempting to get a TLS certificate from the GameLiftServerAPI for c#. I call the lines:

GetInstanceCertificateOutcome CertOutcome = GameLiftServerAPI.GetInstanceCertificate();
if (!CertOutcome.Success) { Debug.LogError("Couldnt get tls certificate from Gamelift! " + CertOutcome.Error.ToString());return; }

And in my logs I am geting the error:

3 Error 2/4/2021 6:23:15 AM:
Couldnt get tls certificate from gamelift! [GameLiftError: ErrorType=NETWORK_NOT_INITIALIZED, ErrorName=Network not initialized., ErrorMessage=Local network was not initialized. Have you called InitSDK()?]

I have already run initSDK a few lines earlier as shown in the log:

0 Log 2/4/2021 6:23:15 AM:
Init Gamelift Server API: True

which links to the code:

initSDKOutcome = GameLiftServerAPI.InitSDK();
print("Init Gamelift Server API: " + initSDKOutcome.Success);

Any help would be appreciated. I know that other server api calls such as

GameLiftServerAPI.DescribePlayerSessions
GameLiftServerAPI.RemovePlayerSession

are working later as I log them out.

Is there some sort of delay between init sdk and the local network working or something else at play here?

Thanks

Jack

That seems strange, you can generally call GetInstanceCertificate() immediately

public bool InitSDK()
{ 
      var outcome = GameLiftServerAPI.InitSDK();
      return outcome.Success;
}

if (InitSDK) 
{
           GetInstanceCertificateOutcome outcome = GameLiftServerAPI.GetInstanceCertificate();
           if (!outcome.Success)
           {
                return false;
           }
}

InitSDK should initialize the SDK network connections, but the error message is saying that we didn’t do it

Can I ask which GameLift Server SDK version you are on? Latest C# version I believe is 4.0.2 (12/12/2020 release).

  • Also if you provide a fleet id, I can get the GameLift service team to take a look (but having the C# SDK version would be very handy)

I just upgraded from 3.4.0 to 4.0.2 as I wanted to rule out a SDK version issue and it solved the problem!

Must be something in 3.4.0

Thanks for your time!