Possible bug in OnlineSubsytemEOS released with UE5.3

I confirm that after making a second call to OnlineSubsystemEOS::ReadFriendsList() the GetFriendsList() function return zero friends. Like below:

EOSInstance->ReadFriendsList(....);
EOSinstance->GetFriendsList(...);  // This works fine

EOSInstance->ReadFriendsList(...);  // call it again
EOSInstance->GetFriendsList(...);  // This returns zero friends

And the reason that the second call returns zero friends is this line in GetFriendsList() function (line 2209 of UserManagerEOS.cpp):

		// If the service hasn't returned the info yet, skip them
		else if (Friend->GetDisplayName().IsEmpty())
		{
			continue;
		}

Basically after the second call to ReadFriendsList(...) for all the friends the DisplayName is empty.

And the reason for that I believe is because at the begginig of ReadFriendsList(...) only the FriendsList member is reset (line 1958 of UserManagerEOS.cpp) and it’s been forgotten to reset UniqueNetIdToAttributeAccessMap as well.

I changed

GetLocalUserChecked(LocalUserNum).FriendsList->Empty(FriendCount);

by adding this line after:

GetLocalUserChecked(LocalUserNum).FriendsList->Empty(FriendCount);
UniqueNetIdToAttributeAccessMap.Empty(FriendCount);

and it solved the issue.

Thanks

1 Like

I have encountered the same problem, and I can confirm that yes, it is very similar to a bug.
The problem is that the Read Friends List(…) apparently, it can be called automatically after successfully logging into the BIOS, as a result, you should not call the Read Friends List once again(…) if you can cache your data on a one-time basis, however, otherwise, you will need to go all the way described above.