Problem on Creating/Finding Session using the Steam OSS

I believe I misunderstood the usage of that flag.
Adding that property to DefaultEngine.ini I got a new error, but it doesn’t seem the root cause.

LogOnline: Warning: STEAM: AUTH: CreateServerSteam is calling the depricated AdvertiseGame call
...
LogOnlineSession: Warning: STEAM: Failed to respond IP:<MY_IP>

Disabling the firewall make disappearing the last log, without adding visibility to my Lobby

When you launch, does your firewall not prompt for allowing the application to be given access via the firewall?

Actually, I have an idea here. I have a build of a UE4.26 version of the section 3 of the course. This is complete and working. I just tested and launched with the logging enabled and it allowed me to create a session. You might also be able to test this via Steam. Just FYI, it uses steamworks 1.47 and works perfectly. This uses the 480 test ID.

You can download from this link. If this works, then it is something at your end/with the code you have. This is pretty much a copy from the course code with my spin on it from when I first did the course about 4 years ago.
[Shared Link Removed]

Thanks a lot for sharing your project!

Ok, I’m starting to suspect I’ve some bad configuration on my pc.
From your project, when I host, I get these errors:

[2024.01.11-19.30.33:760][919]LogNet: Warning: Could not create socket for bind address 76561198066263816, got error SteamSockets: binding to port 7777 failed (0)
[2024.01.11-19.30.33:760][919]LogNet: Warning: Encountered an error while creating sockets for the bind addresses.
[2024.01.11-19.30.33:761][919]LogNet: Warning: Failed to init net driver ListenURL: /Game/Maps/Lobby?Name=Player?listen:
[2024.01.11-19.30.33:761][919]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = NetDriverListenFailure, ErrorString = , Driver = GameNetDriver IpNetDriver_2147482516
[2024.01.11-19.30.33:762][919]LogNet: Warning: Network Failure: GameNetDriver[NetDriverListenFailure]:

I would say it’s suggesting port 7777 is busy, but I’ve no other games open. I try to restart the pc, maybe some unclosed connection is still there, and I’ll write up a follow up answer.

Do you happen to have the editor open at the same time?

That’s what I thought also, but I closed that, no changes. I also restarted my pc and I get the same error. This is getting odd aha

Just for your reference. Steam startup:

LogSteamShared: Display: Loading Steam SDK 1.47
LogSteamShared: Steam SDK Loaded!
LogOnline: OSS: Creating online subsystem instance for: Steam
LogOnline: STEAM: Steam User is subscribed 1
LogOnline: STEAM: [AppId: 480] Client API initialized 1
LogOnline: STEAM: [AppId: 480] Game Server API initialized 1
LogOnline: STEAM: Initializing SteamNetworking Layer
LogOnline: STEAM: Missing P2PCleanupTimeout key in OnlineSubsystemSteam of DefaultEngine.ini, using default

You should see something like this when you start up. I launched from PowerShell using the following which works well in UE4 - doesn’t quite work as expected in 5

& 'D:\Epic Games\UE_4.26\Engine\Binaries\Win64\UE4Editor.exe' "H:\SourceCode\UEMultiplayer\3-OnlineMultiplayer\PuzzlePlatforms\PuzzlePlatforms.uproject" LOG=mpsteam.log -WINDOWED -GAME

I noticed in your project folder, it was missing the steam_appid.txt, so I added it. Now that I restarted my pc, I need to re-initialize windows sandbox to test also the find session with your project

I don’t think that is needed, certainly isn’t present in my build.

For a session, based on the course code, you get something like the following:

[2024.01.11-19.40.32:989][813]LogTemp: Warning: Button Host Clicked
[2024.01.11-19.40.40:313][764]LogTemp: Warning: Host Start Button Clicked
[2024.01.11-19.40.40:341][764]LogTemp: Warning: Creating Session
[2024.01.11-19.40.40:647][887]LogOnlineSession: Verbose: OSS: dumping NamedSession: 
[2024.01.11-19.40.40:647][887]LogOnlineSession: Verbose: OSS: 	SessionName: GameSession
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	HostingPlayerNum: 0
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	SessionState: Pending
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	RegisteredPlayers: 
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	    0 registered players
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: dumping Session: 
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	OwningPlayerName: ABC
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	OwningPlayerId: ABC
[0xnnnnnnnnn]
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	NumOpenPrivateConnections: 0
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	NumOpenPublicConnections: 3
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	SessionInfo: HostIP: INVALID SteamP2P: 76561198104549042:7777 Type: Lobby session SessionId: Lobby[0x1860000681E84F1]
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: dumping SessionSettings: 
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	NumPublicConnections: 4
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	NumPrivateConnections: 0
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bIsLanMatch: false
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bIsDedicated: false
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bUsesStats: false
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bShouldAdvertise: true
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bAllowJoinInProgress: false
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bAllowInvites: false
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bUsesPresence: true
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bAllowJoinViaPresence: false
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	bAllowJoinViaPresenceFriendsOnly: false
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	BuildUniqueId: 0x00e24b58
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 	Settings:
[2024.01.11-19.40.40:656][887]LogOnlineSession: Verbose: OSS: 		ServerName=Testing12345 : OnlineServiceAndPing
[2024.01.11-19.40.40:656][887]LogTemp: Warning: Created Session GameSession
[2024.01.11-19.40.40:656][887]LogGameMode: ProcessServerTravel: /Game/Maps/Lobby?listen
[2024.01.11-19.40.40:657][887]LogEngine: Server switch level: /Game/Maps/Lobby?Name=Player?listen

Also, re the app id, from the docs. On close, it is deleted. This is as expected.

About the appid I read that but this is not something I’m experiencing at all. UE doesn’t create the appid txt file for me, and doesn’t purge it on close, even if the documentation say so :confused:

It probably does but in the saves folder so you may not notice it. Certainly you don’t need it and I don’t have it either.

The issue you have to figure out is why does that packaged build I provided you not work on your PC. I’m afraid I can’t really help much there but please do share any findings. Another option is to see if someone can help you over on the discord who may have encountered the issue before. It is often easier as you can get a more responsive chat going with someone.

At the moment I’ve to take a couple of steps back since I don’t have access to your source code and it could be there is an hidden bug in there.
Maybe not, but I get exceptions on some “ensure” vars:

[2024.01.11-21.36.47:163][ 68]LogStats: FPlatformStackWalk::StackWalkAndDump -  0.003 s
[2024.01.11-21.36.47:163][ 68]LogOutputDevice: Error: === Handled ensure: ===
[2024.01.11-21.36.47:164][ 68]LogOutputDevice: Error:
[2024.01.11-21.36.47:164][ 68]LogOutputDevice: Error: Ensure condition failed: PlayerController!=nullptr [File:H:\SourceCode\UEMultiplayer\3-OnlineMultiplayer\PuzzlePlatforms\Source\PuzzlePlatforms\Private\PuzzlePlatformsGameInstance.cpp] [Line: 176]

Since I cannot debug this, I try to create a new clean project, to see if there is something extra that is creating the problem.

Thanks for the discord suggesion, I’ll try also there

I’ve finally managed to make it working, also on SteamDeck (Proton, so windows build).
To solve it I needed to add this to the sessionSearch:

sessionSearch->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);

Thanks a lot for all the help.
I hope this thread will help other people in the future! :slight_smile:

1 Like

Thanks so much for sharing that. I’ll have to keep that in mind for future. Good luck.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms