UE5.1 Playfab and Steam, Server Load always Menu level (wrong map)

Hi all, I’ve been trying for quite a while to fix an annoying problem.
I’m using steam to authenticate my players on playfab and I’ve deployed the package on a playfab server and it’s ok.
When from the client I try to connect using the “open ip:port” command or the BP Open Level node with “IP:PORT” I can connect to the server but then it loads the MainMenu instead of the server game map and on playfab the server passes from standby to active with 0 players and no logs.
I also tried to use the third Person map, the standard EU one, but I have the same problem.

The maps have been set in the project settings and also in the list of maps to include in package builds.

My project was migrated from 4.26 to 5.0.3, these days I brought it to 5.1 but same problem, built several times on vs, deleted and regenerated the config folder.

The only solution that could work, in my opinion, is to force the loading of the map into the server with c++, but doing some research I didn’t quite understand how to do it.

I hope someone has already faced this problem,
on hold,
thank you.

It could be the your DefaultPlatformService defined in DefaultEngine.ini.

If DefaultPlatformService is set to Steam:

> [OnlineSubsystem]
> DefaultPlatformService=Steam

Your deployed server will try to use Steam Driver definitions to stablish connections, then, failing to connect and redirecting the player to Game Default Map.

If you are using Steam just for authentication with Playfab, you might want set you default platform service as Null, disable steam networking as the following snippet:

 [OnlineSubsystem]
 DefaultPlatformService=Null

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=<your_app_id>
bUseSteamNetworking=false

and load manually the identity interface in your authentication class to make the platform Login, like the following snippet:

IOnlineSubsystem* OnlineSubsystem = Online::GetSubsystem(WorldContextObject->GetWorld(), "Steam");

	if(!OnlineSubsystem)
	{
		UE_LOG(LogTemp, Error, TEXT("Couldn't get the online subsystem!"));
		return;
	}
	IOnlineIdentityPtr Identity = OnlineSubsystem->GetIdentityInterface();
	Identity->AutoLogin(0);

Then, you can make the Playfab Login by registering yourself in the delegate OnLoginCompleteDelegates and executing the playfab request as the following snipper:

PlayFab::ClientModels::FLoginWithSteamRequest loginWithSteam =  PlayFab::ClientModels::FLoginWithSteamRequest();
loginWithSteam.CreateAccount = true;
loginWithSteam.SteamTicket = Identity->GetAuthToken(0);
PlayFab::UPlayFabClientAPI::FLoginWithSteamDelegate OnSuccess;OnSuccess.BindUObject(<YourOnSuccessClass>, 
               &<YourOnSuccessFunction>);
			 PlayFab::FPlayFabErrorDelegate OnError;
				OnError.BindUObject(<YourOnErrorMethodClass>, &<YourOnErrorMethod>);
		
				PlayFab::UPlayFabClientAPI().LoginWithSteam(
					loginWithSteam,
					OnSuccess,
					OnError);

Hope it helps :slight_smile:

1 Like