EOS-services: no player in found ISession after calling ISessions::FindSessions, but it exists

Hello,

I am trying to get the list of all players in a recently created EOS-session, but the list is empty after searching.
For simplicity, I am only adding the hosting-player to the session first, which I want to use later after calling FindSession


1. Host creates session

TSharedPtr<IOnlineServices> OnlineServices = GetServices(EOnlineServices::Epic);

UE::Online::FCreateSession::Params CreateSessionParams;
CreateSessionParams.SessionName = TEXT("Test"); 
CreateSessionParams.LocalAccountId = AccountID; // AccountID is set earlier 
CreateSessionParams.bPresenceEnabled = true;
CreateSessionParams.bIsLANSession = false;
CreateSessionParams.SessionSettings.SchemaName = TEXT("Test");
CreateSessionParams.SessionSettings.NumMaxConnections = 32;
CreateSessionParams.SessionSettings.JoinPolicy = ESessionJoinPolicy::Public;
CreateSessionParams.SessionSettings.bAllowNewMembers = true;

OnlineServices->GetSessionsInterface()->CreateSession(MoveTemp(CreateSessionParams))
 .OnComplete([OnlineServices,this](const TOnlineResult<FCreateSession>& Result)
     {
         if (Result.IsOk())
         {
             //   2.  Add the local player to the session

             UE_LOG(LogTemp, Log, TEXT("Host discussion successful"));
             UE::Online::FAddSessionMember::Params AddSessionMemberParams;
             AddSessionMemberParams.LocalAccountId = AccountID;
             AddSessionMemberParams.SessionName = TEXT("Test");
 
             OnlineServices->GetSessionsInterface()->AddSessionMember(MoveTemp(AddSessionMemberParams))
     .OnComplete([this,OnlineServices](const TOnlineResult<FAddSessionMember>& Result)
         {
             if (Result.IsOk())
             { 
                     // at this point, I can use OnlineServices->GetSessionsInterface()->GetAllSessions() to 
                     // iterate over all local sessions, where a player still exists, but if I use ISessions::FindSessions, the player will be deleted async later, but why ?



More info:

It seems that “FSessionCommon::SessionMembers” is cleared out after calling “ISession::FindSessions”.

Why would “FSessionCommon::SessionMembers” not be persistent ?

For simplicity, I am using only one player and add the host to the created session with ISessions::AddSessionMember.

That call is succeeding, as does “EOS_Sessions_RegisterPlayers” in “FSessionsEOSGS::AddSessionMemberImpl” later.

And I can see that the playercount has been increased in the epic games dev-portal for my application.

So, it seems that the backend has been correctly informed about the added player, but as soon as I try to find the session with ISessions::FindSession, ISession::GetSessionMembers() always returns an empty array.

Any clue what might be wrong? I believe that the client-permissions are correct, but maybe I have missed something.

Thanks

It looks like “FSessionsEOSGS::BuildSessionFromDetailsHandle” calls “GetProductUserIdsFromEOSGSSession” at some point, which is not implemented.

Which probably means, that after calling “ISessions::FindSessions”, several members of a former ISession-instance will not be copied?

From SessionEOSGS.cpp:

TResult<TArray<EOS_ProductUserId>, FOnlineError> GetProductUserIdsFromEOSGSSession(const EOS_HSessionDetails& SessionDetailsHandle)
{
	TArray<EOS_ProductUserId> Result;

	// This code will remain commented until the related functionality is made available by EOSSDK

	/*EOS_SessionDetails_CopyInfoOptions CopyInfoOptions = {};
	CopyInfoOptions.ApiVersion = 1;
	UE_EOS_CHECK_API_MISMATCH(EOS_SESSIONDETAILS_COPYINFO_API_LATEST, 1);

	EOS_SessionDetails_Info* SessionDetailsInfo = nullptr;
	EOS_EResult CopyInfoResult = EOS_SessionDetails_CopyInfo(SessionDetailsHandle, &CopyInfoOptions, &SessionDetailsInfo);
	if (CopyInfoResult == EOS_EResult::EOS_Success)
	{
		// TODO: When available, we'll retrieve the Session's Owner Id here.
	}
	else
	{
		UE_LOG(LogOnlineServices, Warning, TEXT("[FSessionsEOSGS::BuildSessionFromDetailsHandle] EOS_SessionDetails_CopyInfo failed with result [%s]"), *LexToString(CopyInfoResult));

		TResult<TArray<EOS_ProductUserId>, FOnlineError>(Errors::FromEOSResult(CopyInfoResult));
	}*/

	return TResult<TArray<EOS_ProductUserId>, FOnlineError>(MoveTemp(Result));
}

Does this maybe mean, that the EOS-services are not ready yet for some features ?

I simply would like to create a session, join it, and list all members which have joined by name later.

(Perfect would be to be able to test multiplayer locally in the editor with two instances with the Developer Authentication tool, which I am already using. But… the session-member-list seems to be always empty)

Thanks

It seems that this problem might have been related to the “Run Under One Process​” flag.

I could now join the session on the client when I did not use that flag, and then I could also see the player on the hosting-side which created the session in the first place.

It would be IMHO interesting to know, if it is currently possible to debug multiplayer during PIE when using the EOS-services with that flag enabled, since debugging is faster with it enabled.

Cheers