Destroy session returns with Failure


DestroySession node doesn’t seem to work properly! I tried to call it from the playercontroller of the server/client, gamemode, but it always return with OnFailure.

As far as I can tell, it’s not a new problem, found a few other questions that may be about this:

If I’m wrong and it’s not a bug, then what could cause the problem for me?

Hey CrimsonHawk,

Sorry for the delay. I’ve reproduced your issue, and have entered a bug report which you can track using the link below:

Thank you for your report.

Have a great day

Same Problem here with EndSession/DestroySession using Steam OSS and AdvancedSession…

Any idea if it will be fixed in 4.15, since it is really annoying to Continuously needing to leave the whole game to End Sessions :confused:

Unfortunately, there is no set timeline for when a fix will be released.

At the link, you it is written “Unable to test in 4.15 Main CL# 3205566 due to a consistent failure to join session error.” Is it still the case, or just wasn’t checked since because of the Backlogging?
And if you can’t leave a session just like that, then how do other developers solve the problem of disconnecting from a server? (Like Gears of War for a big example)

The issue is still marked as backlogged for the time being. I tested it and the issue is still occurring in 4.15.

As far as a way to work around the issue, I am not aware of any at this time. If one is discovered, I’ll be sure to respond to this thread with more information.

Have a great day

I believe I have a work-around, I had the issue, and I called a “Destroy Session” function right before the create session for the host, and it created the session as expected.

I believe is has to do with the multi-threading nature of the UE4, when it tries to delete the session it’s probably waiting on access from another thread, and it can’t get access to it, so it fails out. But when called before the creation, the NetController is fully destroyed therefor exiting out of all those resources held by those busy threads, so it probably doesn’t has that problem.

Again that explanation is a estimate, but I believe it makes sense.

So you are telling me, the Destroy Session should work as long as I put a Create Session right after it? How about when I don’t want to be in any sessions? Like return to Main Menu or such. Should I make a session with a sole connection anyway?

I can’t believe the “won’t fix” status either. If an engine offers multiplayer, this should be a must “feature”

Took a bit longer than expected to try it out again. But it still doesn’t work as I’d expect. I’m using Win 10, and Steam.

  1. On Destroy Session nothing seems to happen, even if it returns with Success.
  2. If I follow JWYanick’s guide, I could exit to the Main menu by creating a session with 0 public connections, and Open its level.
  3. But upon leaving the session this way I can’t get start another game session even if I call Destroy Session before. Server creation ends with failure.

Could you share your test project? It might be that we don’t use this function exactly how it is intended.

Can we please get a fix for this higher in priority? Unreal is my favorite game Engine, and continues to improve year after year; but the multiplayer genre isn’t using it as often as it could be. I’m sure Unreal wants to see more multiplayer games using their Engine in the market. Right now multiplayer functionality is very clunky, and bugs in core functionality like this, as well as other issues with tutorials and documentation, make it hard for us to get our games out.

This seems to currently be working in my test project, although it is using Steam. What OSS are you working with, CrimsonHawk?

If you’re still seeing the issue and I can reproduce it I can go ahead and reopen the ticket.


To be honest, I haven’t checked in the new versions, I was just hoping that by the time it will be unavoidable to implement it, it will be fixed. All I can see now is the ticket saying “won’t fix”. But if it works now despite the label on the ticket, then I apologise for the harshness, and I will check it out on the weekend with 4.16.2!

Or could you reopen the ticket?

Thank you! Could you also update the versions also? (that it’s still a problem in 4.16)

Hey CrimsonHawk, I’ve tested this and confirmed the behavior you’re seeing. I went ahead and reopened the ticket as a result.

Thanks for your report, and for your patience.

this worked for me after trying in like 20 different ways to destroy the session on the client. important to destroy session before creating a session on the host server!

I am getting this as well in 4.18. Supposedly I see in the ticket, this is a target fix for 4.20… I mean, this is stuff that shouldn’t be broken in UE4 in 2018. The rest of OSS and especially OSS Steam should be 100% good to go. But we are still waiting on things like this: Advanced Sessions Plugin - Community Content, Tools and Tutorials - Unreal Engine Forums to be fully implemented into the engine by default… or even full wrapper like UWorks but with actual OSS support.

I know Epic doesn’t have any plan on putting games on Steam, so it may not be High Priority for Epic, but I would guess that at least 90% of your userbase WILL be using Steam.

Change Nodes in your Game Mode. Event On Log Out. Makes such… Thing or Bug.
If there are any already Destroy Session

It’s still not working. 4.22