Could I get some help for why FindSessions always return 0 result?

Dear all,

I’m getting a big headache. I’ve been trying to get network session working for our game for a few days now. However, we can never get IOnlineSubsystem’s FindSessions to return any result.
(0 result - Yes we’re following the shooter sample.) All configs are configured. We compiled and tested the shooter project and it is working, but not with our project.

Here’s the code:

HostSettings = MakeShareable(new FOnlineSessionSettings());
	HostSettings->NumPublicConnections = 10;
	HostSettings->NumPrivateConnections = 0;
	HostSettings->bIsLANMatch = true;
	HostSettings->bShouldAdvertise = true;
	HostSettings->bAllowJoinInProgress = true;
	HostSettings->bAllowInvites = true;
	HostSettings->bUsesPresence = true;
	HostSettings->bAllowJoinViaPresence = true;
	HostSettings->bAllowJoinViaPresenceFriendsOnly = false;
	mSession->CreateSession(ControllerId, MapName, *HostSettings);

SearchSettings = MakeShareable(new FOnlineSessionSearch());
	SearchSettings->bIsLanQuery = true;
	SearchSettings->MaxSearchResults = 10;
	SearchSettings->PingBucketSize = 50;
	SearchSettings->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);
	TSharedRef<FOnlineSessionSearch> SearchSettingsRef = SearchSettings.ToSharedRef();

	Sessions->FindSessions(ControllerId, SearchSettingsRef);

That’s all we have but I don’t get what’s wrong with it and why it doesn’t give out any matching. All delegates are in place and return successfully. We have tried turning bIsLANMatch on and off but that didn’t help neither.

Any other pointer for us?


Did you ever get this resolved? I’ve come to notice that the shooter example ignores the first server found but displays every server after that. I’m digging around but haven’t found out why it always ignore the first found server.