Warning: STEAM: Unknown session name (GameSession)

I think I’ve found why this is happening.

In the plugin’s code, there is a function that parses the data from the steamworks backend into session settings. Specifically:

/Engine/Plugins/Online/OnlineSubsystemSteam/Source/Private/OnlineSessionAsyncLobbySteam.cpp:228

/**
 *	Populate an FSession data structure from the data stored with a lobby
 * Expects a certain number of keys to be present otherwise this will fail
 *
 * @param SteamSubsystem the online subsystem to use
 * @param LobbyId the Steam lobby to fill data from
 * @param Session empty session structure to fill in
 * @param SearchData if this is provided and the Steam session supports SteamSockets, the ping for the lobby will be written into the search result data.
 *
 * @return true if successful, false otherwise
 */
bool FillSessionFromLobbyData(FOnlineSubsystemSteam* SteamSubsystem, const FUniqueNetIdSteam& LobbyId, FOnlineSession& Session, FOnlineSessionSearchResult* SearchData)

Between lines 273-289, the plugin parses the session settings data from steam:

...
else if (FCStringAnsi::Stricmp(Key, STEAMKEY_SESSIONFLAGS) == 0)
{
	int32 BitShift = 0;
	int32 SessionFlags = FCString::Atoi(ANSI_TO_TCHAR(Value));
	Session.SessionSettings.bShouldAdvertise = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bAllowJoinInProgress = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bIsLANMatch = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bIsDedicated = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bUsesStats = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bAllowInvites = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bUsesPresence = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bUseLobbiesIfAvailable = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bAllowJoinViaPresence = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bAllowJoinViaPresenceFriendsOnly = (SessionFlags & (1 << BitShift++)) ? true : false;
	Session.SessionSettings.bAntiCheatProtected = (SessionFlags & (1 << BitShift++)) ? true : false;
	KeysFound++;
}
...

As you can see, it never sets bUseLobbiesIfAvailable and it does not even have a value stored in the flag. What I did for a fix, and in-fact that is what epic should’ve done, is I added this line after the existing code sets bUsesPresence:

//...other settings..
Session.SessionSettings.bUsesPresence = (SessionFlags & (1 << BitShift++)) ? true : false;
//Force set the lobby flag to the presence flag.
Session.SessionSettings.bUseLobbiesIfAvailable = Session.SessionSettings.bUsesPresence;

I tested it, and it works. Already made a pull request on GitHub It is already updated on the ue5-main branch, so it might be fixed in the next couple of updates. I’ve found several other issues with the OnlineSubsystemSteam plugin, and I’m currently working on an alternative plugin, with all these issues fixed. :smiley: