Hey, I’m currently troubling with getting a running connection with steam and some strange behaviour.
Setup:
UE4.19
2 PC
2 Steam Accounts (both in the same LAN)
Steam OSS enabled
The game is late join. The server is already within the game, client shall be able to join into the running game. Server is already in the correct map while client tries to connect from MainMenu.
Presence is set to false as that only seems to create a Lobby.
When opening a server from one PC, with LAN=false
The client is able to find the server, but only when looking for LAN sessions (FindSessions LAN=true). The log also shows the LAN IP of the other computer for the found session. Trying to join that session, I only get a log spam of
SetActiveLevelCollection attempted to use an out of date NetDriver: GameNetDriver until it finally times out and crashes.
The log originates from
UWorld::SetActiveLevelCollection
...
GameState = ActiveLevelCollection->GetGameState();
NetDriver = ActiveLevelCollection->GetNetDriver();
DemoNetDriver = ActiveLevelCollection->GetDemoNetDriver();
// TODO: START TEMP FIX FOR UE-42508
if (NetDriver && NetDriver->NetDriverName != NAME_None)
{
UNetDriver* TempNetDriver = GEngine->FindNamedNetDriver(this, NetDriver->NetDriverName);
if (TempNetDriver != NetDriver)
{
UE_LOG(LogWorld, Warning, TEXT("SetActiveLevelCollection attempted to use an out of date NetDriver: %s"), *(NetDriver->NetDriverName.ToString()));
NetDriver = TempNetDriver;
}
}
...
The piece of code exchanges the NetDriver of the world, which seems to be an obvious issue when trying to use the SteamNetDriver to connect …
The config setup ( https://docs.unrealengine.com/en-us/…g/Online/Steam )
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnableSteam=true
bEnabled=true
SteamAppID=924770
SteamDevAppId=924770
GameServerQueryPort=27015
bRelaunchInSteam=true
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
Other scenario:
When disabling stuff in the config:
; [/Script/Engine.GameEngine]
; +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnableSteam=true
bEnabled=true
SteamAppID=924770
SteamDevAppId=924770
GameServerQueryPort=27015
bRelaunchInSteam=true
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90
; [/Script/OnlineSubsystemSteam.SteamNetDriver]
; NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
The Internet server still displays as LAN. The client tries to connect, but fails and loads the MainMenu map again. Here is the client log of this scenario:
** // found session**
[2018.11.21-19.11.43:980][334]LogOnline: Warning: STEAM: Server response IP:192.168.1.188 ** // local IP**
[2018.11.21-19.11.44:077][340]LogOnline: Warning: STEAM: Rules response GameName_s None
[2018.11.21-19.11.44:077][340]LogOnline: Warning: STEAM: Rules response OWNINGID 76561198154464056
[2018.11.21-19.11.44:077][340]LogOnline: Warning: STEAM: Rules response OWNINGNAME xxxxxxx
[2018.11.21-19.11.44:077][340]LogOnline: Warning: STEAM: Rules response P2PADDR 76561198154464056
[2018.11.21-19.11.44:078][340]LogOnline: Warning: STEAM: Rules response P2PPORT 7777
[2018.11.21-19.11.44:078][340]LogOnline: Warning: STEAM: Rules response SESSIONFLAGS 643
[2018.11.21-19.11.44:078][340]LogOnline: Warning: STEAM: Rules refresh complete
[2018.11.21-19.11.45:964][457]LogScriptCore: Script Msg: Found a session. Ping is 22
** // trying to connect to session**
[2018.11.21-19.12.00:060][330]LogNet: Browse: steam.76561198154464056//Game/PaintWorld/Maps/MainMenu/MainMenu
[2018.11.21-19.12.00:061][330]LogTemp: Display: ParseSettings for GameNetDriver
[2018.11.21-19.12.00:061][330]LogTemp: Display: ParseSettings for IpNetDriver_1
[2018.11.21-19.12.00:061][330]LogTemp: Display: ParseSettings for PendingNetDriver
[2018.11.21-19.12.00:061][330]LogInit: SteamSockets: Socket queue 32768 / 32768
[2018.11.21-19.12.00:061][330]LogNet: Warning: Failed to init net driver ConnectURL: steam.76561198154464056//Game/PaintWorld/Maps/MainMenu/MainMenu: SteamSockets: binding to port 0 failed (0)
[2018.11.21-19.12.00:061][330]LogNet: Warning: error initializing the network stack
[2018.11.21-19.12.00:061][330]LogNet: DestroyNamedNetDriver IpNetDriver_1 [PendingNetDriver]
[2018.11.21-19.12.00:062][330]LogExit: PendingNetDriver IpNetDriver_1 shut down
[2018.11.21-19.12.00:062][330]LogNet: Warning: Travel Failure: [PendingNetGameCreateFailure]: SteamSockets: binding to port 0 failed (0)
[2018.11.21-19.12.00:062][330]LogNet: TravelFailure: PendingNetGameCreateFailure, Reason for Failure: 'SteamSockets: binding to port 0 failed (0)'
[2018.11.21-19.12.00:062][330]UtilityFunctionLibrary: WriteToLog:[None] BP_PaintProjectGameInstance_C_0: Travel error: Pending Net Game Create Failure
[2018.11.21-19.12.00:064][330]LogNet: Warning: Travel Failure: [ClientTravelFailure]:
[2018.11.21-19.12.00:064][330]LogNet: TravelFailure: ClientTravelFailure, Reason for Failure: ''
[2018.11.21-19.12.00:064][330]UtilityFunctionLibrary: WriteToLog:[None] BP_PaintProjectGameInstance_C_0: Travel error: Client Travel Failure
[2018.11.21-19.12.00:077][331]LogNet: Browse: /Game/PaintWorld/Maps/MainMenu/MainMenu?closed
[2018.11.21-19.12.00:077][331]LogNet: Failed; returning to Entry
[2018.11.21-19.12.00:078][331]LogLoad: LoadMap: /Game/PaintWorld/Maps/MainMenu/MainMenu?closed?listen
- I found that steam requires seamless travel to be enabled in the GameMode, which is set to true. The game mode is set in the maps.
- Trying to host a LAN game, the session does not even show up. Is it even possible to host a LAN game with steam as OSS?
- Also tried to connect one PC to a different network with a devices that establishes a mobile network connection. Not able to find the session in this scenario.