Can't find session using Online Subsystem Steam

Hi. I have a problem finding sessions. I have 0 sessions in the search results. I saw many similar problems on the forum, but not a single solution helped me. I attached the settings that I use and parts of the code.

I’m using ue 5.3.2.

Settings in the DefaultEngine file

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
bInitServerOnClient=true
GameServerQueryPort=27015
bRelaunchInSteam=false
bHasVoiceEnabled=false
GameVersion=1.0.0.0
bVACEnabled=0
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"

in DefaultGame i added

[/Script/Engine.GameSession]
MaxPlayers=150

Session creating settings

	LastSessionSettings = MakeShareable(new FOnlineSessionSettings());
	LastSessionSettings->bIsLANMatch = IOnlineSubsystem::Get()->GetSubsystemName() == "NULL" ? true : false;
	LastSessionSettings->NumPublicConnections = NumPublicConnections; //  = 6
	LastSessionSettings->bAllowJoinInProgress = true;
	LastSessionSettings->bAllowJoinViaPresence = true;
	LastSessionSettings->bShouldAdvertise = true;
	LastSessionSettings->bIsDedicated = false;
	LastSessionSettings->bUsesPresence = true;
	LastSessionSettings->Set(FName("MatchType"), MatchType, EOnlineDataAdvertisementType::ViaOnlineServiceAndPing);
	LastSessionSettings->BuildUniqueId = 1;
	LastSessionSettings->bUseLobbiesIfAvailable = true;

Sessions search settings

	LastSessionSearch = MakeShareable(new FOnlineSessionSearch());
	LastSessionSearch->MaxSearchResults = MaxSearchResults; // = 1000000
	LastSessionSearch->bIsLanQuery = IOnlineSubsystem::Get()->GetSubsystemName() == "NULL" ? true : false;
	LastSessionSearch->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);

For tests, I use two PCs with different Steam accounts and same region selected.

What could be the problem? Can someone give me settings that definitely work on this version of engine? Ready to share details and answer questions. I’ve been trying to fix this problem for three days now. I will be glad for any help.

So I solved the problem. Out of curiosity, I decided to try using VPN and it worked! The fact is that my two laptops on which I tested the game are connected to the same Wi-Fi. I thought that the only requirements were different devices and steam accounts, but apparently ip also affects all of this.

I hope this information will be useful to someone. Just don’t forget to set a different region in Steam; after starting the VPN, it may be reset)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.