Following EOS Online Sybsystem gyidelines but can’t join created session.
Please check log below. Trying ?NetMode=ForceIP with no luck, with NULL system it worked, with this approach doesn’t. Please give me advice.
Here is my Join session code:
void UBattleRoyaleGameInstance::OnJoinSessionsComplete(FName SessionName, EOnJoinSessionCompleteResult::Type Result)
{
UE_LOG(BRGameInstance, Display, TEXT("OnJoinSessionsComplete: %d (%s)"), Result, *SessionName.ToString());
if (OnlineSubsystem)
{
if (IOnlineSessionPtr SessionPtr = OnlineSubsystem->GetSessionInterface())
{
UE_LOG(BRGameInstance, Display, TEXT("OnJoinSessionsComplete SessionName: %s"), *SessionName.ToString());
FString URL;
if (!SessionPtr->GetResolvedConnectString(SessionName, URL))
{
UE_LOG(BRGameInstance, Error, TEXT("OnJoinSessionsComplete GetResolvedConnectString FAILED"));
return;
}
UE_LOG(BRGameInstance, Display, TEXT("OnJoinSessionsComplete URL: %s"), *URL);
if (!URL.IsEmpty())
{
APlayerController* const PC = GetFirstLocalPlayerController();
if (PC == nullptr)
{
UE_LOG(BRGameInstance, Error, TEXT("OnJoinSessionsComplete GetFirstLocalPlayerController FAILED"));
return;
}
PC->ClientTravel(URL, ETravelType::TRAVEL_Absolute);
}
}
}
}
and this is how I create session:
void UBattleRoyaleGameInstance::CreateSession(const FString& InTravelURL)
{
TravelURL = InTravelURL;
if (OnlineSubsystem)
{
if (IOnlineSessionPtr SessionPtr = OnlineSubsystem->GetSessionInterface())
{
FOnlineSessionSettings SessionSettings;
SessionSettings.bIsDedicated = false;
//SessionSettings.bIsDedicated = true;
SessionSettings.bShouldAdvertise = true;
SessionSettings.bIsLANMatch = false;
//SessionSettings.bIsLANMatch = true;
SessionSettings.NumPublicConnections = 5;
SessionSettings.NumPrivateConnections = 5;
SessionSettings.bAllowJoinInProgress = true;
SessionSettings.bAllowJoinViaPresence = true;
SessionSettings.bUsesPresence = true;
SessionSettings.Set(SEARCH_KEYWORDS, TestGameName, EOnlineDataAdvertisementType::ViaOnlineService);
SessionPtr->CreateSession(0, TestSessionName, SessionSettings);
}
}
}
InTravelURL set in blueprint to “BasicLevel?listen?NetMode=ForceIP”
[2023.01.19-06.40.57:171][600]LogEOSSDK: LogEOSP2P: A new connection closed listener has been bound. LocalUserId=[000...411] SocketId=[GameNetDriver]
[2023.01.19-06.40.57:172][600]LogEOSSDK: Warning: LogEOSP2P: Attempted to send a packet to yourself. LocalUserId=[000...411]
[2023.01.19-06.40.57:172][600]LogSocketSubsystemEOS: Error: Unable to send data to (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) result code = (EOS_InvalidParameters)
[2023.01.19-06.40.57:173][600]LogNet: UIpConnection::HandleSocketSendResult: Socket->SendTo failed with error 5 (SE_EINVAL). [UNetConnection] RemoteAddr: EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26, Name: NetConnectionEOS_2147482528, Driver: PendingNetDriver NetDriverEOS_2147482529, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID Connection beginning close timeout (Timeout = 0).
[2023.01.19-06.40.58:176][929]LogEOSSDK: Warning: LogEOSP2P: Attempted to send a packet to yourself. LocalUserId=[000...411]
[2023.01.19-06.40.58:177][929]LogSocketSubsystemEOS: Error: Unable to send data to (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) result code = (EOS_InvalidParameters)
[2023.01.19-06.40.58:177][929]LogNet: UIpConnection::HandleSocketSendResult: Socket->SendTo failed with error 5 (SE_EINVAL). [UNetConnection] RemoteAddr: EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26, Name: NetConnectionEOS_2147482528, Driver: PendingNetDriver NetDriverEOS_2147482529, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID Connection beginning close timeout (Timeout = 0).
[2023.01.19-06.40.59:184][249]LogEOSSDK: Warning: LogEOSP2P: Attempted to send a packet to yourself. LocalUserId=[000...411]
[2023.01.19-06.40.59:185][249]LogSocketSubsystemEOS: Error: Unable to send data to (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) result code = (EOS_InvalidParameters)
[2023.01.19-06.41.00:194][567]LogEOSSDK: Warning: LogEOSP2P: Attempted to send a packet to yourself. LocalUserId=[000...411]
[2023.01.19-06.41.00:194][567]LogSocketSubsystemEOS: Error: Unable to send data to (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) result code = (EOS_InvalidParameters)
[2023.01.19-06.41.01:200][884]LogEOSSDK: Warning: LogEOSP2P: Attempted to send a packet to yourself. LocalUserId=[000...411]
[2023.01.19-06.41.01:200][884]LogSocketSubsystemEOS: Error: Unable to send data to (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) result code = (EOS_InvalidParameters)
[2023.01.19-06.41.02:202][198]LogEOSSDK: Warning: LogEOSP2P: Attempted to send a packet to yourself. LocalUserId=[000...411]
[2023.01.19-06.41.02:203][198]LogSocketSubsystemEOS: Error: Unable to send data to (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) result code = (EOS_InvalidParameters)
[2023.01.19-06.41.03:207][513]LogEOSSDK: Warning: LogEOSP2P: Attempted to send a packet to yourself. LocalUserId=[000...411]
[2023.01.19-06.41.03:208][513]LogSocketSubsystemEOS: Error: Unable to send data to (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) result code = (EOS_InvalidParameters)
[2023.01.19-06.41.03:208][513]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionLost, ErrorString = UIpNetConnection::HandleSocketSendResult: Socket->SendTo failed with error 5 (SE_EINVAL). [UNetConnection] RemoteAddr: EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26, Name: NetConnectionEOS_2147482528, Driver: PendingNetDriver NetDriverEOS_2147482529, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID Connection will be closed during next Tick()!, Driver = PendingNetDriver NetDriverEOS_2147482529
[2023.01.19-06.41.03:208][513]LogNet: Warning: Network Failure: PendingNetDriver[ConnectionLost]: UIpNetConnection::HandleSocketSendResult: Socket->SendTo failed with error 5 (SE_EINVAL). [UNetConnection] RemoteAddr: EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26, Name: NetConnectionEOS_2147482528, Driver: PendingNetDriver NetDriverEOS_2147482529, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID Connection will be closed during next Tick()!
[2023.01.19-06.41.03:210][513]LogNet: NetworkFailure: ConnectionLost, Error: 'UIpNetConnection::HandleSocketSendResult: Socket->SendTo failed with error 5 (SE_EINVAL). [UNetConnection] RemoteAddr: EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26, Name: NetConnectionEOS_2147482528, Driver: PendingNetDriver NetDriverEOS_2147482529, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID Connection will be closed during next Tick()!'
[2023.01.19-06.41.03:210][513]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26, Name: NetConnectionEOS_2147482528, Driver: PendingNetDriver NetDriverEOS_2147482529, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID, Channels: 2, Time: 2023.01.19-06.41.03
[2023.01.19-06.41.03:210][513]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26, Name: NetConnectionEOS_2147482528, Driver: PendingNetDriver NetDriverEOS_2147482529, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2023.01.19-06.41.03:211][513]LogNet: DestroyNamedNetDriver NetDriverEOS_2147482529 [PendingNetDriver]
[2023.01.19-06.41.03:211][513]LogEOSSDK: Warning: LogEOSP2P: Attempted to close a connection with yourself. LocalUserId=[000...411]
[2023.01.19-06.41.03:211][513]LogSocketSubsystemEOS: Error: Unable to close socket with remote address RemoteAddress (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) due to error (EOS_InvalidParameters)
[2023.01.19-06.41.03:214][513]LogEOSSDK: LogEOSP2P: Successfully closed last connection closed listener for this socket. SocketId=[GameNetDriver] NotificationId=[34]
[2023.01.19-06.41.03:214][513]LogEOSSDK: LogEOSP2P: Closing a specific socket id with all peers. LocalUserId=[000...411] SocketId=[GameNetDriver]
[2023.01.19-06.41.03:214][513]LogSocketSubsystemEOS: Closing socket (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) with result (EOS_Success)
[2023.01.19-06.41.03:215][513]LogEOSSDK: Warning: LogEOSP2P: Attempted to close a connection closed listener for a Socket ID that was not bound. NotificationId=[34]
[2023.01.19-06.41.03:215][513]LogEOSSDK: LogEOSP2P: Closing a specific socket id with all peers. LocalUserId=[000...411] SocketId=[GameNetDriver]
[2023.01.19-06.41.03:216][513]LogSocketSubsystemEOS: Closing socket (EOS:00023041b7294bcb99408cd5001ed411:GameNetDriver:26) with result (EOS_Success)
[2023.01.19-06.41.03:216][513]LogExit: PendingNetDriver NetDriverEOS_2147482529 shut down