Can't find LAN session (using steam SDK)

As title suggests, I cannot find my Listen server across LAN after steam integration.
I’m not sure if this is a bug, or something I am missing, but just seems to be out of my control right now, which to me, seems more like a bug. So apologies in advance if it is not a bug and it really is just user error :frowning:

To go into a bit more detail, if I am inside of editor, and I set number of players to 2. I can get one player to host server, and other player to join server, absolutely no problems.

But if I compile game, and run 2 instances of it on same machine, one can create server, but other simply cannot find server at all.

I have a feeling it is to do with integration of Steam into my project, since I never had problems with this before.

I followed this guide posted by (I found official documentation to be skimpy on details):

And steam overlay shows up, no problem, that works fine, but cannot find any servers on LAN.

So I did some digging to find a solution and for last few days, I have been searching for one, to no avail.

I decided to check my ports by typing netstat -ab -p UDP into Command Prompt in Windows to see where fault might be, and to see what ports I may need to open.

So this is what I did.

  1. Opened a version of my project before steam integration.

  2. Ran 2 players in PIE, I can create a server, find and join that server no problems.

  3. I checked port being used by server and it is 7777.

  4. I packaged project and ran 2 instances on same machine, once again, no problem creating, finding and joining server, even from other machines across LAN. Port being used is still 7777.

  5. Opened a version of my project that had steam integration based on 's guide.

  6. Ran 2 player in PIE, I can create a server, find and join that server no problems.

  7. I checked port being used by server and it is 7777 still.

  8. I packaged project and ran 2 instances on same machine, server creation works, but I cannot find server from 2nd game instance.
    Port being used? I have no idea, but 7777 is not being used. I assume it is 27015 since this is GameServerQueryPort inside of DefaultEngine.ini after steam integration.

This has me incredibly confused, and I’m honestly not sure which direction to go, other than to completely remove Steam integration from project until I really NEED to add it. This sort of interferes with me wanting to learn how it all works though, and I would really love to have steam integration as early as possible and learn how it works.

Below are some things I noticed were strange with ports being used (I’m hoping more information I give, better chances of being helped).

These are relevant ports before creating a server with steam integration:

svchost.exe UDP 0.0.0.0:27036
Steam.exe UDP 0.0.0.0:51846

After creating server:

svchost.exe UDP 0.0.0.0:14001 (NEW)
SandBox.exe UDP 0.0.0.0: 27015 (NEW: I presume this is  port used instead of 7777?)
SandBox.exe UDP 0.0.0.0:27036 (Note: this is  same as svchost.exe before starting server)
Steam.exe UDP 0.0.0.0:41765 (NEW)
SandBox.exe UDP 0.0.0.0:51846 (Note: this is  same as Steam.exe before starting server)

So I opened up new ports on my router to see if that would work, but it didn’t work unfortunately.

I then went into my DefaultEngine.ini settings and changed DefaultPlatformService to Null (since it is set to “Steam” right now).
But after doing this, I can’t create a server at all.

Here is what my DefaultEngine.ini looks like (At least only parts I have changed for steam integration):
[URL]
GameName=SandBox

[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Desktop
AppliedTargetedHardwareClass=Desktop
DefaultGraphicsPerformance=Maximum
AppliedDefaultGraphicsPerformance=Maximum

[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam
PollingIntervalInMs=20

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
GameServerQueryPort=27015
bRelaunchInSteam=false
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"

I see GameServerQueryPort is equal to 27015 so figured that opening 27015 should work, but it does not.

Here is a description of my blueprint set up, and some pictures.

I have a main menu blueprint, player can click on Host Server button which takes them to a server creation screen where they can click on a “Create Server” button which will create a new session:


On client side, player clicks “Join Game” button in Main Menu, and it looks for sessions, iterates through them, and attempts to join. Pretty basic, simple stuff really.


I have to wonder if because of steam integration, I should have UseLAN unticked…
I honestly really don’t know.
I think I will probably just try and remove steam integration by end of day if I can’t get this working. Since I am having people over for a LAN and it’d be a great opportunity to give my game a whirl and see how it goes.

Any help on matter will be greatly, greatly appreciated.
I am happy to help with providing more information. However I will only share my project with Epic Games staff if necessary.

Thank you in advance! :smiley:

UPDATE:
After a bit of reading I decided to try something else. Because when I tested on 2 seperate machines previously, I don’t think steam was open on other machine at all.

  1. I started a server on Computer A.
  2. On Computer B I made sure steam was running and tried to find server, with success (HOORAY!).
  3. It also tells me that Computer B successfully joined server (HOORAY)…but player does not appear in game, level does not load on Computer B, instead, Computer B just remains on Main Menu.

One last thing to note while testing. I actually have a server browser, which lists servers, name, player count and ping. I noticed ping was 9999 when server was found…if this helps.

Check if you not getting errors in logs, go to Window->Devlopers Tools->Output Log, set it up as a part of your layout. it’s very useful tab

I always have Output log open for that reason :slight_smile:

However it works perfectly fine inside of editor.

Also, I just updated main post with this:

UPDATE: After a bit of reading I
decided to try something else. Because
when I tested on 2 seperate machines
previously, I don’t think steam was
open on other machine at all. 1. I
started a server on Computer A. 2. On
Computer B I made sure steam was
running and tried to find server, with
success (HOORAY!). 3. It also tells me
that Computer B successfully joined
server (HOORAY)…but player
does not appear in game, level
does not load on Computer B, instead,
Computer B just remains on Main
Menu.

One last thing to note while testing.
I actually have a server browser,
which lists servers, name,
player count and ping. I noticed
ping was 9999 when server was
found…if this helps.

I’m just taking a look at log produced to see where error might be occurring. I have a feeling it is timing out for whatever reason.

When I do that, I can’t create a server at all unfortunately.

Also, I just checked out log on client side and it’s spitting out a bunch of same line:
LogNet:Warning: Incoming ip address doesn’t match expected server address: Actual: 0.0.0.0:0 Expected: 192.168.1.3:7777

Then it fails with a time out.

im think thats might be problem in actual setup, i had SDK enabled with files and config working for it, but mine menus wasnt ready, so ive tried to test it via Lan but same as you, server was found, connect fails and ping is 9999. But when i change line DefaultPlatformService=Steam to DefaultPlatformService=Null Lan start working. So there are might be some problem with that.

try on clean project, just make easy setup, its not gonna take more than 10 min and check it on standalone test, i think there are no much difference between that and actual packaged game in tearms of behaviour.
Also, when you make clean new project, if thats fails, package project to and post, i would try it and if thats work, we could assume thats not a unreal problem, but your router.

I haven’t tried a clean project just yet, but did try Multiplayer shootout and had exact same problem. So I’m thinking I might need to undo steam integration completely until LAN is over, then work at it later. Still doesn’t really resolve problem though :frowning:

Ok, so tried a clean project, on a fresh, clean re-downloaded version of 4.9.2, and project worked.

This helped me narrow it down to fact that something in my project was broken after steam integration stuff.

So I removed all steam integration stuff, but still couldn’t get it to work, as I was getting this error:
Invalid or uninitialized OnlineSubsystem
Cannot map local player to unique net ID

In my log file.

I jumped online, did a bit of investigating, found a solution that didn’t really go into detail about adding a dependency.

After just fiddling around, I added “OnlineSubsystemNull” into *.Build.cs file as was vaguely suggested (but not explained), and now it works.
Bare in mind, this still doesn’t solve main issue of this post on answerhub, but it at least brings me back to having working multiplayer across LAN again.

// Fill out your copyright notice in Description page of Project Settings.

using UnrealBuildTool;

public class SandBox : ModuleRules
{
public SandBox(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “OnlineSubsystemNull” });

	PrivateDependencyModuleNames.AddRange(new string[] {  });

Hi Otreum,

Can you include a link to information you found that suggested .Build.cs file fix?

Also, you mention using 's tutorial for setting this up. Did you set it up exactly as written? That information is not up to date. For example, 4.9 uses SDK version 1.32, not 1.29.

While this information is not completely updated either, aside from SDK version information should be accurate:

Certainly .

However note that main issue was not resolved with that fix, just issue I had as a result of trying to undo steam integration. :wink:

This was AnswerHub thread where Ryan Gerleve suggests adding dependency (I had no idea how to add a dependency though).

He wrote:

If your project is a code project with
a *.Build.cs file, you’ll need a
dependency on
“OnlineSubsystemNull” module.

There is this link, which was what gave me light bulb moment of where to put “OnlineSubsystemNull” in *.Build.cs file.

I know for some, this is not rocket science, but just something ridiculously simple, but for me, it got me back to a point where local multiplayer was working again.

As for steam integration and 's tutorial. I followed it exactly. But it could very well be that I missed one tiny little thing too, so best I try again.

If it doesn’t work again, I’m going to reset my router back to factory default settings and re-add ports to it as a last resort.

It’s possible your steam integration isn’t correct if you followed 's instructions, since it’s out of date. I’d check this link from official documentation:

That’s a bit out of date as well, but other than SDK version (4.9 uses Steam SDK 1.32) it should work. Are you building your engine version from source, or is this occurring in binary build of 4.9?

So if Local Multiplayer is working again, is problem just LAN connection? Let me know what happens after following Steam integration steps in post above.

Hi Otreum,

Is this still an issue for you? Were you able to get everything working? I’m going to resolve this issue for tracking purposes, but please feel free to respond to questions I asked above and we’ll continue investigating. Thanks!

Hi , Sorry for not responding, I haven’t had much of a chance to try steam integration out again. I will definitely post again if it’s working.

I have a feeling it may be due to my router needing a full factory reset. Or at least it’ll be a good idea.

Hello!

A few months later, in our Project we are having exactly same problem raised in this Post.

With integration of Steamworks, game is unable to find Listen Server across LAN, both Standalone Game mode (PIE) and Packaged Game. Inside of editor (PIE), with number of players set to 2, Server can host game (creates session) and Client can join to Session without problems.

Development Environment

  • Unreal Engine: 4.10.1
  • Steamworks SDK: Steam v135
  • Packaged Games: Winx64 (Debug & Development mode)

I read in other Post that it perfectly works in UE 4.9

I’ll wait attentive any information on subject

Thanks in advance for your attention!

Hi anderson,

As mentioned here, I’d like you to make a new post if you’re still having trouble connecting two separate machines and Steamworks v132. Thanks!

Collected. cannot remember where:

checkbox for “Use LAN” will cause
Steam to not behave correctly even if
your two computers are on a LAN. This
is because Steam protocol for
connecting players into multiplayer
games relies on different methods than
what OnlineSubsystemNULL (or
others) might do.

If you are creating multiplayer games
and want to use Steam, you need to
make sure that “Use LAN” check
boxes are set to false, through
whatever method you deem fit. As in, a
checkbox in a UI element, condition to
see if player is connected to
Steam, etc…