So I’m trying to call SearchGameSessions() from my client so I can connect to an active game server. But the client isn’t finding anything. So here’s some info on whats happening. Also this is all in UE4 and C++.
This is what my request looks like (basically):
Aws::GameLift::Model::SearchGameSessionsRequest Request; FString AliasID = FString("alias-xxxxx-xxxx-xxxx-xxxx-xxxxxxx"); FString FilterExp = FString("hasAvailablePlayerSessions=true"); Request.SetAliasId(TCHAR_TO_UTF8(*AliasID)); Request.SetFilterExpression(TCHAR_TO_UTF8(*FilterExp)); LOG_NORMAL("Requesting to search for game sessions"); Aws::GameLift::SearchGameSessionsResponseReceivedHandler Handler; Handler = std::bind(&UGameLiftSearchGameSessions::OnSearchGameSessions, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4); GameLiftClient->SearchGameSessionsAsync(Request, Handler); return EActivateStatus::ACTIVATE_Success;
Then once the request is completed or done, OnSearchGameSessions() gets called and I can check the ‘const Aws::GameLift::Model::SearchGameSessionsOutcome& Outcome’. And right now the Outcome is successful, but zero sessions are found and I when I look at ‘Outcome.error.m_errorType’ it equals ‘INCOMPLETE_SIGNATURE’. I looked it up and that means I’m requesting the search incorrectly, I think.
Some other things to note are that I’m trying to make my dedicated servers use CreateSession() on themselves so the client doesn’t have to do that, they just have to search and join. (The server also has the GameLiftClientSDK). But I’m not sure if that’s actually working, it worked locally but this is what I’m seeing on the Amazon GameLift Console.
But on the metrics graph it says I have a few “healthy” and “Active” server processes and “Available” & “Active game sessions”. So that sounds like the client should be able to find a server. But I’m not sure.
So does anyone know what I’ve done wrong? Are my servers not “Active”? Or am setting up and sending a bad SearchGameSessionRequest? If the servers aren’t active, should I use DescribeGameSessionDetails?
Any help would be greatly appreciated!