# Failed to spawn player controller, GameSession is null

**URL:** <https://forums.unrealengine.com/t/failed-to-spawn-player-controller-gamesession-is-null/478831>\
**Category:** Character & Animation\
**Tags:** playercontroller, bug, unreal-engine, null, question\
**Created:** [February 15, 2021, 1:30pm UTC](https://forums.unrealengine.com/t/failed-to-spawn-player-controller-gamesession-is-null/478831 "2021-02-15T13:30:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![byalexeykh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/byalexeykh/32/890134_2.png) [@byalexeykh](https://forums.unrealengine.com/u/byalexeykh)\
**Post date:** [February 15, 2021, 1:30pm UTC](https://forums.unrealengine.com/t/failed-to-spawn-player-controller-gamesession-is-null/478831/1 "2021-02-15T13:30:03Z")

</div>

I moved the map files to another folder, after that this error appeared. I have no idea what might be causing it. As you can see in the screenshot, all settings are set, why GameSession is null - I have no idea.

![]()

---

<div class="post-metadata">

**Author:** ![byalexeykh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/byalexeykh/32/890134_2.png) [@byalexeykh](https://forums.unrealengine.com/u/byalexeykh)\
**Post date:** [February 15, 2021, 1:32pm UTC](https://forums.unrealengine.com/t/failed-to-spawn-player-controller-gamesession-is-null/478831/2 "2021-02-15T13:32:33Z")

</div>

This also happens with unreals standard Game Session class, so this is not a problem with the Advanced Sessions plugin.

---

<div class="post-metadata">

**Author:** ![byalexeykh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/byalexeykh/32/890134_2.png) [@byalexeykh](https://forums.unrealengine.com/u/byalexeykh)\
**Post date:** [February 15, 2021, 1:47pm UTC](https://forums.unrealengine.com/t/failed-to-spawn-player-controller-gamesession-is-null/478831/3 "2021-02-15T13:47:18Z")

</div>

Also this happens to all levels i have except main menu which dont have any objects in it except widgets

---

<div class="post-metadata">

**Author:** ![byalexeykh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/byalexeykh/32/890134_2.png) [@byalexeykh](https://forums.unrealengine.com/u/byalexeykh)\
**Post date:** [February 17, 2021, 11:58am UTC](https://forums.unrealengine.com/t/failed-to-spawn-player-controller-gamesession-is-null/478831/4 "2021-02-17T11:58:16Z")

</div>

The problem was my mistake in the code of the character that needed to be controlled.

---

<div class="post-metadata">

**Author:** ![sniek2305](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sniek2305](https://forums.unrealengine.com/u/sniek2305)\
**Post date:** [May 11, 2021, 9:05pm UTC](https://forums.unrealengine.com/t/failed-to-spawn-player-controller-gamesession-is-null/478831/5 "2021-05-11T21:05:11Z")

</div>

Can you elaborate on what fixed this issue? I’m also facing this and I’m not sure which point in the chain is the problem.

---

<div class="post-metadata">

**Author:** ![fabiansk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fabiansk](https://forums.unrealengine.com/u/fabiansk)\
**Post date:** [May 19, 2021, 8:14am UTC](https://forums.unrealengine.com/t/failed-to-spawn-player-controller-gamesession-is-null/478831/6 "2021-05-19T08:14:21Z")

</div>

I had same the error. In my case I had a custom Game Mode derived class and override the `InitGame` function. The mistake was that I didn’t call the base class `InitGame` function.

See [InitGame](https://docs.unrealengine.com/en-US/API/Runtime/Engine/GameFramework/AGameModeBase/InitGame/index.html).
