EOS Client Disconnect when Join Session

Hi,

I am developing a Coop Online game with Unreal Engine’s Listen server system.
Currently, we use EOS as a solution to make the server connectable for the client over the Internet.
For now, session creation works fine, the client drive can see the online session created by the host and can connect to it, but when the client connects to the session, the connection is immediately lost.
The following are the client logs when connecting into the session:

[2022.09.19-13.15.03:092][447]LogEOSSDK: LogEOSLobby: Connection Established
[2022.09.19-13.15.03:390][471]LogEOSVoiceChat: Warning: [000001C3456252B0] EOS_Lobby_GetLobbyRTCRoomName failed error=EOS_Disabled
[2022.09.19-13.15.03:390][471]LogGameInstance: Display: UOnlineGameInstance::OnJoinSessionComplete success : True
[2022.09.19-13.15.03:390][471]LogGameInstance: Display: JoinSession success Client travel to EOS:0002e7f1464b46418f6aef1283b730e3:GameNetDriver:26
[2022.09.19-13.15.03:395][471]LogEOSSDK: LogEOSPresence: Updating Presence to Online. LocalUserId=[06c…10f] RichText=
[2022.09.19-13.15.03:396][471]LogNet: Browse: EOS:0002e7f1464b46418f6aef1283b730e3:GameNetDriver:26/Game/Menus/MainMenu/Maps/MainMenu
[2022.09.19-13.15.03:396][471]LogInit: WinSock: Socket queue. Rx: 32768 (config 32768) Tx: 32768 (config 32768)
[2022.09.19-13.15.03:396][471]LogNet: Created socket for bind address: 0.0.0.0 on port 0
[2022.09.19-13.15.03:404][471]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2022.09.19-13.15.03:455][471]LogNet: Game client on port 7777, rate 100000
[2022.09.19-13.15.03:492][472]LogSockets: Warning: GetAddressInfo failed to resolve host with error SE_HOST_NOT_FOUND [11001]
[2022.09.19-13.15.03:492][472]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: , Name: IpConnection_2147482485, Driver: PendingNetDriver NetDriverEOS_2147482486, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID, Channels: 0, Time: 2022.09.19-13.15.03
[2022.09.19-13.15.03:492][472]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: , Name: IpConnection_2147482485, Driver: PendingNetDriver NetDriverEOS_2147482486, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2022.09.19-13.15.03:506][472]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = PendingConnectionFailure, ErrorString = Your connection to the host has been lost., Driver = PendingNetDriver NetDriverEOS_2147482486
[2022.09.19-13.15.03:506][472]LogNet: Warning: Network Failure: PendingNetDriver[PendingConnectionFailure]: Your connection to the host has been lost.
[2022.09.19-13.15.03:514][472]LogNet: NetworkFailure: PendingConnectionFailure, Error: ‘Your connection to the host has been lost.’
[2022.09.19-13.15.03:518][472]LogBlueprintUserMessages: [BP_OnlineGameInstance_C_2147482576] Network Error :PendingConnectionFailure [IsServer:false]
[2022.09.19-13.15.03:526][472]LogNet: DestroyNamedNetDriver NetDriverEOS_2147482486 [PendingNetDriver]
[2022.09.19-13.15.03:527][473]LogNet: Browse: /Game/Menus/MainMenu/Maps/MainMenu?closed
[2022.09.19-13.15.03:535][473]LogNet: Connection failed; returning to Entry

Here is the code called on the OnJoinSessionCompleteDelegates Callback (Always return Success on join session)

FString ConnectionInfo = FString();
SessionPtr->GetResolvedConnectString(FName(JoinSessionName), ConnectionInfo);
if (!ConnectionInfo.IsEmpty())
{
if (APlayerController* PC = UGameplayStatics::GetPlayerController(GetWorld(), 0))
{
// Client travel to the server
LogMessage(
FString::Printf(TEXT(“JoinSession success Client travel to %s”)
, *ConnectionInfo), EMsgType::Display);
PC->ClientTravel(ConnectionInfo, TRAVEL_Absolute);
}
}

I tried my code using NullSubSystem and it works locally (A server is created on the same network as my client, and they can connect and play with each other)
Should the issue arise from network configuration or EOS implementation/configuration?

Thanks for your time.

1 Like
SessionPtr->GetResolvedConnectString(FName(JoinSessionName), ConnectionInfo);

Is the JoinSessionName set to NAME_GameSession both when creating and joining the session?

Yes I defined the session name like this :

SessionName(NAME_GameSession);

And the join/create sessions :

SessionPtr->CreateSession(0, SessionName, SessionSettings);
SessionPtr->JoinSession(0, SessionName, SessionResult.OnlineResult);

I tested the implementation I made in Unreal Engine 4 and it works flawlessly.
Thus, it appears that the plugin is not currently functioning for UE5 unless it need some specific code for UE5 (But I do not found any documentation about it).

Tested in UE5.0.3

Hi @Akrath_1 ,

I ran into the same issue today (UE5.03). After some digging in the EOSSubsystem code, I found that the EOSNetDriverBase in the SocketSubsystemEOS plugin is not reading the value of bIsUsingP2PSockets and therefore falling back to the default socket subsystem which cannot resolve the host adress.

Long story short, if you followed the offical tutorial to setup the DefaultEngine.ini:

change the entry:

[/Script/SocketSubsystemEOS.NetDriverEOS]
bIsUsingP2PSockets=true

in:

[/Script/SocketSubsystemEOS.NetDriverEOSBase]
bIsUsingP2PSockets=true

and it should work. Hope this works for you too.

PS: Make sure you have the SocketSubsystemEOS plugin enabled.

10 Likes

@RaiderOfLostBit Thanks so much. This fixed my problem.

1 Like

Thanks, can confirm this fixed our issue, we are also in 5.0.3!

1 Like

Thanks a lot!
I spend so many hours trying to figure it out.

PS: Fixed for me on 5.1.1 version

2 Likes

Thank you so much! I spent two days on this one. Still an issue in 5.2.
I reposted this on doc issues forum (Reporting Issues for Documentation - #567 by livada)

I changed the “.NetDriverEOS]” to “.NetDriverEOSBase]”, and what I receive now is this:

[2023.07.13-19.37.00:271][ 24]LogSockets: Warning: GetAddressInfo failed to resolve host with error SE_HOST_NOT_FOUND [11001]
[2023.07.13-19.37.00:272][ 24]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: , Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID, Channels: 2, Time: 2023.07.13-19.37.00
[2023.07.13-19.37.00:273][ 25]LogNet: UNetConnection::SendCloseReason:
[2023.07.13-19.37.00:273][ 25]LogNet:  - Result=AddressResolutionFailed, ErrorContext="AddressResolutionFailed"
[2023.07.13-19.37.00:274][ 25]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: , Name: IpConnection_0, Driver: PendingNetDriver IpNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2023.07.13-19.37.00:274][ 25]LogEOSSDK: LogEOSMessaging: Succesfully connected to Stomp. LocalUserId=[000...eec]
[2023.07.13-19.37.00:275][ 25]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = PendingConnectionFailure, ErrorString = Your connection to the host has been lost., Driver = PendingNetDriver IpNetDriver_0
[2023.07.13-19.37.00:280][ 25]LogNet: Warning: Network Failure: PendingNetDriver[PendingConnectionFailure]: Your connection to the host has been lost.

The other user seems to join the session, but then this errors happen really fast and you get back to the previous map.


EDIT: In the project folder, I deleted the Binaries folder, then the Intermediate folder, and all folders within the Saved folder (except the Config one), and then right-clicked the project file (projName.uproject) and clicked “Generate Visual Studio Project files” and after that was done, I opened and tested the project again and it worked! (the change from “.NetDriverEOS]” to “.NetDriverEOSBase]”)

1 Like

I’ve tried this solution, along with rebuilding, and nothing. I can’t get my two test copies to connect together.

(post deleted by author)