Yep that worked! Thanks for the tip. Now I need to find out why the 2nd player is being disconnected when I launch the game from the lobby.
So, I fixed my problem where clients wouldnât connect by enabling the Steam sockets plugin and changing the ini file, but itâs seems like more of a work around than a fix to me. Nothing Iâve watched or read suggests that you need to do this, but maybe I just missed it.
Yeah you shouldnât need to do that.
Hi
Yeah, thats what I figured. So I started a new 3rd person project (because Iâve been working in the other project for a while and thought maybe I had done something in it that was causing this problem). In the new project I enabled the steam online subsytem, advanced sessions, and created 2 really simple menus widgets. A main menu where these are the only blueprints:
And then a session result widget which will show in the main widget scroll box:
The only other things in this project is a blank main menu level and and a menu game mode which includes the following:
Everything else is default, and I get exactly the same result. I can host on steam. The client will find the game and try to join but the connection will time out. The only way to get them to connect successfully is to include the Steam sockets plugin, then everything works fine.
Iâm not implying this problem has anything to do with the advanced sessions plugin by the way, that seems to be working absolutely fine. But if any has any ideas about where Iâm going wrong, Iâd love to figure this out. I realise Iâve just put everything in menus here, but that was for simplicity - I was previously doing this in the game instance and using interfaces to trigger, with the same results.
Many thanks for any potential insights.
You will need to generate VS project files and build from Visual Studios.
Hey just wanted to say thanks again for letting me know why I couldnât connect properly. Turns out I didnât successfully download the updated 4.27 plugins, but once I did that and checked bSearchLobbies everything worked great. I was stuck for a very long time and Iâm glad I was finally able to figure it out with your help. I know it was a simple solution but for me itâs huge because I can finally continue with my game now after overcoming such a massive hurdle. Thanks!
Thanks Kettlefish.
I was having the exact same setup and issues, and your suggestion fixed it. For anyone else interested, after you enable SteamSockets youâll need to update the DefaultEngine.ini file to the following as mentioned in their documentation:
[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/SteamSockets.SteamSocketsNetDriver",DriverClassNameFallback="/Script/SteamSockets.SteamNetSocketsNetDriver")
I have the p2p server player on the âWorldâ map and the joining player is on the âMainMenuâ map. The joiner either canât connect or doesnât connect properly and it just reloads the MainMenu map.
Iâll leave Lobbies on then (itâs off in the pic but I was using it on), but I still canât connect after using the fix in the previous post.
UE 4.27
Unless you are running a dedicated server you DO want to use lobbies. Epic has the listen server architecture for steam setup to use the lobby system.
Its a seperate flag now because EOS required it, which is what broke the native (engine) hosting nodes in 4.27 (defaulted to false so no BP hosting works over steam anymore).
Thanks for the reply as always, I just edited the post for some clarity, still having problems.
Session info dump:
2022.08.30-17.20.37:634][457]LogOnlineSession: Verbose: OSS: dumping NamedSession:
[2022.08.30-17.20.37:634][457]LogOnlineSession: Verbose: OSS: SessionName: GameSession
[2022.08.30-17.20.37:634][457]LogOnlineSession: Verbose: OSS: HostingPlayerNum: 0
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: SessionState: Pending
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: RegisteredPlayers:
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: 0 registered players
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: dumping Session:
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: OwningPlayerName: boxchat
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: OwningPlayerId: boxchat [0x110000100001491]
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: NumOpenPrivateConnections: 0
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: NumOpenPublicConnections: 3
[2022.08.30-17.20.37:635][457]LogOnlineSession: Verbose: OSS: SessionInfo: HostIP: INVALID SteamP2P: 76561197960270993:7777 Type: Lobby session SessionId: Lobby[0x1860000BCA33B71]
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: dumping SessionSettings:
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: NumPublicConnections: 4
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: NumPrivateConnections: 0
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bIsLanMatch: false
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bIsDedicated: false
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bUsesStats: false
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bShouldAdvertise: true
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bAllowJoinInProgress: true
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bAllowInvites: true
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bUsesPresence: true
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bAllowJoinViaPresence: true
[2022.08.30-17.20.37:636][457]LogOnlineSession: Verbose: OSS: bAllowJoinViaPresenceFriendsOnly: false
[2022.08.30-17.20.37:637][457]LogOnlineSession: Verbose: OSS: BuildUniqueId: 0x0105c47c
hereâs the client errors:
[2022.08.30-17.13.13:108][816]LogOnlineSession: STEAM: Found 1 lobbies, finalizing the search
[2022.08.30-17.13.13:108][816]LogOnlineSession: STEAM: Search result 0: LobbyId=Lobby[0x1860000BC9D3C47], LobbyId.IsValid()=true, CSteamID(LobbyId).IsLobby()=true
[2022.08.30-17.13.20:865][595]LogOnlineSession: STEAM: Using P2P Data for Connection Serialization
[2022.08.30-17.13.20:865][595]LogOnlineSession: OSS: Join session: traveling to steam.76561198043086423:7777
[2022.08.30-17.13.20:865][595]LogNet: Browse: steam.76561198043086423/Game/_GoblinKeep/Map/MainMenuWorld
[2022.08.30-17.13.20:868][595]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2022.08.30-17.13.20:871][595]LogSockets: SteamSockets: Now tracking socket 4159199351 for addr 76561198043086423:7777, has parent? 0
[2022.08.30-17.13.20:871][595]LogNet: Game client on port 7777, rate 100000
[2022.08.30-17.13.30:872][589]LogSteamSocketsAPI: Verbose: SteamSockets API: Log [#4159199351 P2P steamid:76561198043086423 vport 7777] problem detected locally (5003): Timed out attempting to connect
[2022.08.30-17.13.30:887][590]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = PendingConnectionFailure, ErrorString = Your connection to the host has been lost., Driver = PendingNetDriver SteamSocketsNetDriver_0
[2022.08.30-17.13.30:888][590]LogNet: Warning: Network Failure: PendingNetDriver[PendingConnectionFailure]: Your connection to the host has been lost.
[2022.08.30-17.13.30:888][590]LogNet: NetworkFailure: PendingConnectionFailure, Error: âYour connection to the host has been lost.â
[2022.08.30-17.13.30:888][590]LogNet: DestroyNamedNetDriver SteamSocketsNetDriver_0 [PendingNetDriver]
[2022.08.30-17.13.30:898][591]LogNet: Browse: /Game/_GoblinKeep/Map/MainMenuWorld?closed
[2022.08.30-17.13.30:899][591]LogNet: Connection failed; returning to Entry[2022.08.30-17.13.31:001][591]LogNet: UChannel::CleanUp: ChIndex == 0. Closing connection. [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 76561198043086423:7777, Name: SteamSocketsNetConnection_0, Driver: PendingNetDriver SteamSocketsNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
[2022.08.30-17.13.31:001][591]LogAudio: Display: Audio Device unregistered from world âNoneâ.
[2022.08.30-17.13.31:042][591]LogNet: UNetConnection::PendingConnectionLost. [UNetConnection] RemoteAddr: 76561198043086423:7777, Name: None, Driver: PendingNetDriver None, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID bPendingDestroy=0
[2022.08.30-17.13.31:048][591]LogUObjectHash: Compacting FUObjectHashTables data took 2.26ms
On server:
[2022.08.30-17.17.50:648][147]LogSteamSocketsAPI: Warning: SteamSockets API: Warning Ignoring P2P signal from âsteamid:76561198043086423â, unknown remote connection #3690442424
I might have fixed it: the peer is able to connect and they disconnect when they close the game (from reading the log) but the map doesnât change. Do I need to manually change the map or is something still not working (like connection timeout)?
Hereâs what I did maybe someone else will be able to fix their stuff:
- Download the specific 4.27 steam sessions plugin, I downloaded the master the first time
- Dont use steam sockets or the steam auth plugin in your defaultEngine.ini, my .ini looks like this
[OnlineSubsystemSteam]
SteamDevAppId=480
bEnabled=true[OnlineSubsystem]
DefaultPlatformService=Steam[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName=âGameNetDriverâ,DriverClassName=âOnlineSubsystemSteam.SteamNetDriverâ,DriverClassNameFallback=âOnlineSubsystemUtils.IpNetDriverâ)[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName=âOnlineSubsystemSteam.SteamNetConnectionâ
now the log looks like this
[2022.08.31-12.00.59:213][436]LogOnlineSession: STEAM: Using P2P Data for Connection Serialization
[2022.08.31-12.00.59:214][436]LogOnlineSession: OSS: Join session: traveling to steam.76561198043086423:7777
[2022.08.31-12.00.59:214][436]LogNet: Browse: steam.76561198043086423/Game/Map/MainMenuWorld
[2022.08.31-12.00.59:217][436]LogNet: Display: SteamNetDriver_0 bound to port 7777
[2022.08.31-12.00.59:219][436]PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
[2022.08.31-12.00.59:220][436]LogOnline: STEAM: Adding user 76561198043086423:7777 from RegisterConnection
[2022.08.31-12.00.59:220][436]LogNet: Game client on port 7777, rate 100000
[2022.08.31-12.01.59:230][276]LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection⌠Elapsed: 60.01, Real: 60.00, Good: 60.00, DriverTime: 60.01, Threshold: 60.00, [UNetConnection] RemoteAddr: 76561198043086423:7777, Name: SteamNetConnection_0, Driver: PendingNetDriver SteamNetDriver_0, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
still looks like itâs timing out, but connected. I cant test for another couple days but Iâll be backâŚ
As long as the host loaded a map with ?Listen they should be able to load into the map. There are no extra steps no, the post above your last it looked like steam auth was disallowing them as they didnât âownâ the application.
I did indeed forget that part. It works. Youâre pretty much the coolest guy.
Hi, does the serverTravel command work when the player joins the session?
After the serverTravel command is run, the actors in the new level are only visible to the host, and most importantly, all RPC events cannot be run.
Everything was perfect before the update UE 5.0.3. âŻď¸żâ°
Steam in non development builds requires an app_id.txt file in the .exe location of your application that contains your steam app id.
Hello! Iâm not sure if this is the right place to post a bug Iâve found (Not entirely sure if this is even considered a bug!) I swapped over from EOS to EOS Plus, and it all works flawlessly except for when I check if my player is in a session by getting their âUnique Net IDâ while theyâre not online.
Not sure if this is a steam-specific issue (My second subsystem is steam), but it only started happening after swapping.
A solution Iâve found is just to use âGet Login Statusâ with the âGet Unique Net IDâ to first ensure theyâre logged in, and then to get their session if that was successful.
Thank you for the wonderful plugin!
yo fellas, been a while since i try many, many, many things and i canât replicate any informations between the host and the clients in the lobby (UE5) like how the heck im not getting any infos, yet im still capable of log-in, travel to a map, eveyrthings works on the server parts, i managed to make work the steam player name display and stuff ( just the icon doesnât works since itâs friend Idâs only ) ( not even a simple chnage text method nothing, nada. ( i can see on my host 1/(x serverslots selected) but nothing appear not even the default text on the clients)
BROKEN in UE 5.1? Advanced steam sessions seems to be broken in UE5.1 preview, it wonât compile our project, the error is line 200 of AdvancedSteamFriendsLibrary.h saying this does not take 1 argument:
return GetTypeHash(A.UniqueNetId);
To get it to compile I commented it out and uncommented the line below it, but not sure if this is actually a fix or something else will break down the line? Hopefully someone knows
//return (uint32)(A.UniqueNetId) + ((uint32)((A.UniqueNetId) >> 32) * 23);
Have to use the 5.1-preview branch of it.
Is is possible to use Create Advanced Session
to start (host) a session but not change the level (stay on âMain Menuâ Level), and then the other players to join the session, but as well to remain in the same level (stay on âMain Menuâ Level), and only change the showed widgets for host and joined players?
The âMain Menuâ level contains a widget with the function for hosting/joining/lobby widgets.
I tried to use the blueprint, the session was created, and it was found using Find Sessions Advanced
, but after calling Join Session
they didnât actually joined the session. As a test I simply done a Get Game State
â Player Array
â Length
and set that value to a Text
which is updated on every tick.
//Edit:
On host I was able to make it work and keep the same level loaded. Before MainMenu
level have another level which somehow loads MainMenu
(it can be empty Image 1 bellow) with ?listen
as options. With this, when you use Create Advanced Session
it will keep track of players that are joining. I used the same method of testing as mentioned above.
Image 1:
Now the problem is on players that are joining. When Join Session
is called, even if they were on MainMenu
level, it still get reloaded as it is the level of the host is in.
Is there a way to not load the level for players that joined? To simply join the session but not the level.