Fatal error: Couldn't spawn player - After client joins destroyed session and tries to create new one

I have menu screen with 3 buttons:

  • Create Session (calls DestroySession THEN CreateAdvancedSession)
  • Join Session (calls DestroySession THEN JoinSession)
  • Destroy Session (calls DestroySession)

(first of all I’m not sure if I should call DestroySession before both Create/Join, please let me know if it’s a bad idea, but it fixed a bunch of issues for me with not being able to create/join session, because I’m already in one)

Steps that lead to Fatal error: Couldn’t spawn player

  1. Player 1 presses Create Session button
  2. Player 2 presses Join Session button
  3. Player 1 presses Destroy Session button
  4. Player 2 still gets Join Session “On Success” result. Even though he is not connected anywhere
  5. Player 2 is not stucked in non existent session, so he presses Destroy Session button to unstuck himself (Destroy Session node returns “On Success”)
  6. Player 2 now presses Create Session button
  7. Player 2 gets Fatal error: Couldn’t spawn player

Alternative path:
5a. Player 2 waits in this non existent session until he receives On Connection Timeout error and his session gets destroyed
6a. Player 2 now presses Create Session button and he travels to map without any issues

IMPORTANT
When Player 2 is stucked in non existent session and Player 1 creates new session Player 2 is automatically connected to this session, which sure, makes sense. The issue is that when Player 2 is stucked in non existent session and he presses Destroy Session button which returns “On Success” if Player 1 creates new session, then Player 2 is once again automatically connected to his session, and that I do not understand.

I do not know why Player 2 is getting this fatal error after it says that session is destroyed successfuly so he should be free to do whatever…

Well so far I was able to find out that Destroying non existent session wasn’t enough, player 2 also needed to travel back to the menu map (even though he never left it).

Current working solution is to use ReturnToMainMenu() from GameInstance before every CreateSession/JoinSession, which has to be a ridiculous approach…

u got to add player starts to u level to get to work at least mine and do not double click or you will have this error