AWS Gamelift + STEAM

Trying to link AWS Gamelift (Amazon Web Services) with my project. Everything turns out, the session is created and the players can connect until I turn on the Steam plugin. With the plugin enabled, when connecting to the server, this error is displayed:

Error: UEngine :: BroadcastNetworkFailure: FailureType = PendingConnectionFailure, ErrorString = incompatible_unique_net_id, Driver = PendingNetDriver SteamNetDriver_23

How to make Gamelift plugin and Steam work at the same time? I can’t do without steam.

Sorry for my english :slight_smile:

It seems that the UniqueId parameter passed into your game mode class’ PreLogin and Login functions is not correct. This issue is briefly talked about in this forum post, and essentially the issue is that in the PreLogin function, this UniqueId parameter has to be, in your case, a valid steam id. Here is the source code for the PreLogin function to better explain this:

void AGameModeBase::PreLogin(const FString& Options, const FString& Address, const FUniqueNetIdRepl& UniqueId, FString& ErrorMessage)
{
	// Login unique id must match server expected unique id type OR No unique id could mean game doesn't use them
	const bool bUniqueIdCheckOk = (!UniqueId.IsValid() || (UniqueId.GetType() == UOnlineEngineInterface::Get()->GetDefaultOnlineSubsystemName()));
	if (bUniqueIdCheckOk)
	{
		ErrorMessage = GameSession->ApproveLogin(Options);
	}
	else
	{
		ErrorMessage = TEXT("incompatible_unique_net_id");
	}

	FGameModeEvents::GameModePreLoginEvent.Broadcast(this, UniqueId, ErrorMessage);
}

What you can do in this case is override the PreLogin function in your server’s game mode class. Then in there, get the steam id through the options that the client passed when connecting to the server through a call to OpenLevel or use the options they passed to retrieve the steam id (not sure how to go about this). Finally, using this steam id, call the call the parent class’ PreLogin function (for e.g. Super::PreLogin(Options, Address, SteamId, ErrorMessage)). In the end it would look something like this in your server’s game mode class:

void AYourGameMode::PreLogin(const FString& Options, const FString& Address, const FUniqueNetIdRepl& UniqueId, FString& ErrorMessage)
{
	const FString& SteamId = UGameplayStatics::ParseOption(Options, "SteamId");
    Super::PreLogin(Options, Address, SteamId, ErrorMessage);
}

But keep in mind in this case, the clients are expected to pass an option named “SteamId”.

1 Like

Hey So im facing an issue like this, but its without the steam dealeo…
What would I fill in the UniqueID variable with if I dont have a steam id to fill it?