EOS Session Total Players always 0

Hi,

I am using Online Services for EOS sessions.

One player creates session, another finds and joins the session, but Total Players is always 0 on the EOS Portal.

Why?

My online setup is:
DefaultServices=Epic
PlatformServices=Steam

OnlineSubsystemSteam enabled with (I am not sure what is proper configuration for authentication through steam):
DefaultLinkedAccountAuthTokenType=WebAPI:epiconlineservices
DefaultRemoteServiceIdentity=epiconlineservices

OSSAdapter:
[OnlineServices.OSSAdapter]
+Services=(Service=“Steam”,ConfigName=“Steam”,OnlineSubsystem=“Steam”,Priority=1000)

Also, when I find session, GetOwnerAccountId() (ISession::GetOwnerAccountId) returns invalid account id.
Is that normal?

Hello there @Kyroaku!

Checking your log extract with my peers, the thing that jumps is the GetOwnerAccountId() getting an invalid value. As long as the user setting up the session as a valid ID, and EOS/Steam services are up and running, the value should returned should be a proper ID. And since the players never properly joined, the player count statys at zero.

So, make sure the local user has a valid ID, and that full login sequence is completed. Then confirm in your setup that Steam is configured as the Identity Provider for EOS. The session needs to be using EOS, and not Steam OSS (since you have “DefaultServices=Epic”, EOS should be the default).

Once you have ensured those parameters, test the connection again. If players can access, total player count should increase as intended. If not, please make a new log extract, and we will investigate it further.

Hi @brs-sebascova,

For login, I am using CommonUser from Lyra. I call LoginForOnlinePlay.

To me, everything looks properly, but to be honest, I didn’t find any complete guide for how to wire everything (EOS, Steam, OSSAdapter, Connect), and I am not sure if I do it properly. Most of the things I am trying is just guessing and testing.

Some related logs I get suggests (I think) that everything is working fine:

LogOnlineServices: Verbose: 000001DD897A2050 HandleLoginStatusChangedImpl op state set to: Running

LogOnlineServices: [FAuthOSSAdapter::HandleLoginStatusChangedImplOp][STEAM] Login status changed for account [Steam:1 ()]: NotLoggedIn => LoggedIn.

LogCommonUser: Player login status changed - System:4, UserId:Steam:1 (), NewStatus:LoggedIn
LogEOSSDK: LogEOSMessaging: Connect Messaging: Attempting connection to Stomp. LocalUserId=[000...8a3] Url=[<Redacted>]
LogEOSSDK: LogEOSP2P: Requesting new TURN relay credentials for 000...8a3.
LogOnlineServices: Verbose: 000001DDC4A2D310 HandleConnectLoginStatusChangedImpl op state set to: Queued
LogOnlineServices: Verbose: [FAuthEOSGS::LoginConnect] EOS_Connect_Login Result: [EOS_Success]
LogOnlineServices: [FAuthEOSGS::Login] Successfully logged in as [Epic:1 ()]
LogCommonUser: Player login status changed - System:1, UserId:Epic:1 (), NewStatus:LoggedIn
LogOnlineServices: Verbose: 000001DE77688950 Login op state set to: Complete

But… Later I get warning that I think also are related to my problem:

LogEOSSDK: Warning: LogEOSConnect: FConnectClient::ResolveProductUserIdMappingPrivate - GetProductUserExternalAccountIdPrivate Failed

...

LogEOSSDK: Warning: LogEOSUI: Hot key event ignored because there are no known users.

I don’t really know what it means. Login is successful, it gave Epic user ID, but some mapping (linking?) failed?

Also, host, after creating session, sees proper session owner id and is able to call Services->GetResolvedConnectString()

Clients, after joining the session, are not able to call Services->GetResolvedConnectString(), because session owner id in found session is invalid.

I am suspecting there is a problem with linking steam user with eos?

Hello again!

Thanks for the log extrats, they do make it sound like everything should be working as intended, specially since you are using the Lyra CommonUser.

As for that new error you are getting, it has a particular article explaining it’s meaning, here. This means that, either the client policy is still not properly set, or your login works as intended, but the system is unable to retrieve the other players’ account data.

As mentioned in the previous post, I need you to confirm in the EOS Developer Portal, under My Product Settings > Identity Providers, if Steam is added and configured, with the proper app ID. Here’s a practical example of the process:

Hey, thank you for your reponses,

In Identity Providers, I have Steam provider with Encryption Key from steamworks and game’s App ID.

In Engine.ini, I have also:
DefaultLinkedAccountAuthTokenType=WebAPI:epiconlineservices
DefaultRemoteServiceIdentity=epiconlineservices

(I was trying different approaches to authenticate user by steam, but also I am not sure which one should I use. WebAPI Token seems to be working but maybe I am wrong here?)

I also set `epiconlineservices` as OAuth Client ID and SteamNetworkingIdentity (Not sure how to use both of it tbh).

I am using P2P and Client policy requires Trusted Server for queryExternalAccountsForAnyUser and queryProductUsersForAnyUser. Do I understand correctly that this is the reason why client can’t retrieve session owner ID? This is possible only with trusted server?

So what’s the workflow for P2P multiplayer with EOS sessions and native platform (Steam) authentication? Am I wrong here assuming that it should work with P2P?

I recreated whole setting in different project and Lobbies seems to be working fine, but Sessions still shows no players at all in any session. Also, I can’t find session by Player ID in EOS Developer Portal (when using lobbies, finding lobby by Player ID works fine).

I tested in on both Online Subsystem and Online Services.

What’s going on with sessions? Is this desired behaviour? Sessions are for trusted servers only, while P2P should use Lobbies even for sessions?

I have been thinking that lobbies are more like a party persistent between multiple sessions (e.g.: matches). Am I wrong?

Thanks for the follow up! I think you are on the right path here, with the lobby approach. Checking around the community, I found a few more cases like this, and one pointed to the following EOS doc, here:

Trusted and Untrusted Clients

Clients can be trusted or untrusted.

  • Trusted clients
    These are under your control and are not released publicly. For example, these could be dedicated servers in your datacenter. A trusted client can have more access than an untrusted client. Because it runs only in your environment, you can assume it is not running modified code, and so it is not a security risk.
  • Untrusted clients
    These are usually publicly released software applications, such as your product’s game client. Do not treat the following as trusted clients:
    • Community-run servers.
    • Peer-to-peer clients acting as product servers. Players might run tampered versions of your released code when connecting to EOS services with this policy.

Meaning, this is how EOS is designed in the first place. P2P clients acting as session hosts should not be treated as trusted clients. And since resolving another player’s query requires Trusted Server access, the session setup does not work here.

Since the lobby option is giving you good results, I would suggest sticking to that method, instead of trying to fight the P2P limitation in sessions.