FindFriendSession Callback Fails

Hello,

I am trying to use the FindFriendSession within the Steam online Subsystem.
The implementation I am using is:

virtual bool FindFriendSession(const FUniqueNetId& LocalUserId, const TArray<TSharedRef<const FUniqueNetId>>& FriendList) = 0;

The way I am using it is:

SessionInterface->FindFriendSession(*PlayerId.ToSharedRef(), OnlineFriendIDs);

Whereas PlayerID is a FUniqueNetId and OnlineFriendIDs a TArray<TSharedRef<const FUniqueNetId>>

The callback for this that I am using is:

void OnFindFriendSessionComplete(int32 LocalUserNum, bool Success, const TArray<FOnlineSessionSearchResult> & SearchResults);

Now when I am calling the method, the callback seems to be called correctly, but apparently it fails (success comes back as fault). If I put in UE_LOG into the call back into a if (!Success) {} branch, it writes it out as well.

The verbose console when launching the game(s) while testing with a steam friend spits out:

LogOnlineSession: Display: STEAM: FOnlineSessionSteam::FindFriendSession(const FUniqueNetId& LocalUserId, const TArray<TSharedRef<const FUniqueNetId>>& FriendList) - not implemented

What does not implemented mean?
Am I using the wrong callback?
Is that implementation of the FindFriendSession not supported anymore?

I am fairly confident that there is one existing session because when I use a FindFriendSession implementation where I pass in a singular friend ID, it finds it.

Chris

Hi Hermi,

I apologize I am giving an answer after 1 year of your post but I only recently started working on the steam sessions.

The reason why we get this LOG is because they haven’t implemented the function. I checked into the source code.

This is inside the function -

bool FOnlineSessionSteam::FindFriendSession(const FUniqueNetId& LocalUserId, const TArray<TSharedRef>& FriendList)
{
UE_LOG_ONLINE_SESSION(Display, TEXT(“FOnlineSessionSteam::FindFriendSession(const FUniqueNetId& LocalUserId, const TArray<TSharedRef>& FriendList) - not implemented”));
// @anonymous_user_5851a2121: use proper LocalUserId
TArray EmptyResult;
TriggerOnFindFriendSessionCompleteDelegates(0, false, EmptyResult);
return false;
}

Instead for a workaround. I’ve implemented another way to do this and it works.

//Find friends servers function, called when friends server list is opened or the refresh button in the menu is clicked
void UMbRGameInstance::FindServersOfFriends()
{
UE_LOG(LogTemp, Warning, TEXT(“Find Friends’ Server”));

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

if (onlineFriendList.Num() != 0)
{
	for (TSharedRef<FOnlineFriend> onlineFriend : onlineFriendList)
	{
		sessionInterface->FindFriendSession(0, onlineFriend->GetUserId().Get());
	}
}

}