# Cannot find sessions when hosting in standalone game

**URL:** <https://forums.unrealengine.com/t/cannot-find-sessions-when-hosting-in-standalone-game/429811>\
**Category:** Multiplayer & Networking\
**Tags:** local-host, unreal-engine, Multiplayer, UE4, question, CPP\
**Created:** [July 20, 2018, 12:09am UTC](https://forums.unrealengine.com/t/cannot-find-sessions-when-hosting-in-standalone-game/429811 "2018-07-20T00:09:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dain\_Torson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dain\_Torson](https://forums.unrealengine.com/u/Dain_Torson)\
**Post date:** [July 20, 2018, 12:09am UTC](https://forums.unrealengine.com/t/cannot-find-sessions-when-hosting-in-standalone-game/429811/1 "2018-07-20T00:09:02Z")

</div>

So, I’m trying to host and join LAN session. And it works nice, but only when I’m hosting the game in editor and trying to connect to it from standalone game. Suprisingly, when I’m hosting in standalone game, FOnlineSessionSearch::SearchResults is empty both when I’m trying to connect from editor or standalone game.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [July 20, 2018, 7:06am UTC](https://forums.unrealengine.com/t/cannot-find-sessions-when-hosting-in-standalone-game/429811/2 "2018-07-20T07:06:29Z")

</div>

you got online subsystem on? if not only lan will work

---

<div class="post-metadata">

**Author:** ![Dain\_Torson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dain\_Torson](https://forums.unrealengine.com/u/Dain_Torson)\
**Post date:** [July 20, 2018, 9:17am UTC](https://forums.unrealengine.com/t/cannot-find-sessions-when-hosting-in-standalone-game/429811/3 "2018-07-20T09:17:07Z")

</div>

The problem is even LAN doesn’t work in standalone game (Sorry for vague description in original question, I’ll fix it right now).

I added OnlineSubsystem into Build.cs

```
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "AIModule", "UMG", "GameplayTasks", "OnlineSubsystem", "OnlineSubsystemSteam" });

```

And appropriate line to DefaultEngine.ini:

```
[OnlineSubsystem]
DefaultPlatformService=Null

```

Again, it works perfectly fine when I’m hosting in editor, I get some problems in standalone / packaged game.

Thank you for the reply!

---

<div class="post-metadata">

**Author:** ![Dain\_Torson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dain\_Torson](https://forums.unrealengine.com/u/Dain_Torson)\
**Post date:** [July 25, 2018, 3:59pm UTC](https://forums.unrealengine.com/t/cannot-find-sessions-when-hosting-in-standalone-game/429811/4 "2018-07-25T15:59:43Z")

</div>

Solved this by passing different session name to CreateSession function (i used NAME\_GameSession before). Still no idea, why it helped.
