Can't find LAN hosted session

Hello!

I’m currently attempting to set up networking in Unreal Engine 4. Right now, I have a button to create a session using LAN (which works fine). Then, I have a timer set up to try and find sessions (also using LAN) every half second. However, find sessions fails every time, with or without me running a session. Here’s my steps that I’ve been using to test:

  1. Start game
  2. Click the “Start Server” button: it prints out the text saying that the session has been started.
  3. Read the text being printed to the screen: it prints the text that is sent out on failure.

This is my blueprint for creating the session: I know that this (supposedly) succeeds because the “On Success” print string is fired.

This is my blueprint for finding the session: I know this fails because the print string under the “On Failure” pin is fired.

I have attempted many variations on both DefaultEngine.ini and Gravity.Build.cs, but nothing has worked. Here are those files.

// Gravity.Build.cs
using UnrealBuildTool;

public class Gravity : ModuleRules
{
	public Gravity(TargetInfo Target)
	{
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

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

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
		
		// Uncomment if you are using online features
        PrivateDependencyModuleNames.Add("OnlineSubsystem");
        PrivateDependencyModuleNames.Add("OnlineSubsystemNull");
        if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
        {
            if (UEBuildConfiguration.bCompileSteamOSS == true)
            {
                DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
            }
        }
	}
}

[placeholder text, to split the two code files… :slight_smile: ]

// My WHOLE DefaultEngine.ini, because I'm not sure if I messed something up.
[URL]
[/Script/Engine.UserInterfaceSettings]
RenderFocusRule=NavigationOnly
DefaultCursor=None
TextEditBeamCursor=None
CrosshairsCursor=None
GrabHandCursor=None
GrabHandClosedCursor=None
SlashedCircleCursor=None
UIScaleRule=ShortestSide
UIScaleCurve=(EditorCurveData=(Keys=((Time=480.000000,Value=0.444000),(Time=720.000000,Value=0.666000),(Time=1080.000000,Value=1.000000),(Time=8640.000000,Value=8.000000))),ExternalCurve=None)

[/Script/Engine.RendererSettings]
r.MobileHDR=True
r.AllowOcclusionQueries=True
r.MinScreenRadiusForLights=0.030000
r.MinScreenRadiusForDepthPrepass=0.030000
r.PrecomputedVisibilityWarning=False
r.TextureStreaming=True
Compat.UseDXT5NormalMaps=False
r.AllowStaticLighting=True
r.NormalMapsForStaticLighting=False
r.GBuffer=True
r.GenerateMeshDistanceFields=False
r.Shadow.DistanceFieldPenumbraSize=0.050000
r.TessellationAdaptivePixelsPerTriangle=48.000000
r.SeparateTranslucency=True
r.TranslucentSortPolicy=0
TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000)
r.CustomDepth=1
r.DefaultFeature.Bloom=True
r.DefaultFeature.AmbientOcclusion=True
r.DefaultFeature.AmbientOcclusionStaticFraction=True
r.DefaultFeature.AutoExposure=True
r.DefaultFeature.MotionBlur=True
r.DefaultFeature.LensFlare=True
r.DefaultFeature.AntiAliasing=2
r.EarlyZPass=3
r.EarlyZPassMovable=False
r.DBuffer=False
r.ClearSceneMethod=1
r.WireframeCullThreshold=5.000000
UIScaleRule=ShortestSide
UIScaleCurve=(EditorCurveData=(Keys=),ExternalCurve=None)

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

[OnlineSubsystem]
DefaultPlatformService=Null
PollingIntervalInMs=20

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

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/Gravity/Levels/StartScreen
LocalMapOptions=
TransitionMap=
bUseSplitscreen=True
TwoPlayerSplitscreenLayout=Horizontal
ThreePlayerSplitscreenLayout=FavorTop
GameInstanceClass=/Script/Engine.GameInstance
GameDefaultMap=/Game/Gravity/Levels/StartScreen
ServerDefaultMap=/Engine/Maps/Entry
GlobalDefaultGameMode=/Script/Engine.GameMode
GlobalDefaultServerGameMode=None

I’ve tried many variations on all of these files, but nothing has really worked… I’ve probably been missing something obvious, but I’m not the most adept at networking… also, I’m not going to deal with Steam or other services right now, because I’m just attempting to get basic local multiplayer working. Don’t know where to go from here… thanks!

Update: I just tried the “Multiplayer Shootout” sample from the launcher, and that works fine in LAN mode… I’ll try and look and see what’s different, but I don’t see anything obvious yet.

[OnlineSubsystem]
DefaultPlatformService=Null

add this two lines in DefaultEngine.ini

You do not have a player controller hooked into your find sessions.

Those lines are already in there, as you can see.

I’ll try that now, just a sec.

Aaaaaaand I feel stupid, because that worked… Thanks!

Actually, this now works, but it is still refusing to find any sessions: I’ll make a separate post for this.

Did you try use one computer to find the host which is build by the other computer in LAN ?

I have try, but I cannot find any session which is created by the other computer in LAN.

Do you have the same problem?

Did you try use one computer to find the host which is build by the other computer in LAN ?

I have try, but I cannot find any session which is created by the other computer in LAN.
By the way, I can find session if I run the MutiplayerShootout game in one computer. That is to say, one computer run two game process is work, but it doesn’t work in different computer, even through they are in the same LAN

Do you have the same problem?

Hey sorry to ressurect this post, but did you find a solution to this problem (Session can be found if the game is running on one computer, but not if running on a different computer - even when in the same LAN) ? I’m having the same problem

And the world will never know :frowning:

Is 2018 and still no body know T.T

I have the same problem in 4.24.3

![](

disable the hyper v network adapter.