Server Travel doesn't Work when I packaged

Hi everyone,

i’m having trubles with the servertravel command.
I am creating a multiplayer game and i still don’t know how to implement this command,
I tried many ways, I tried that the host could launch the command and it didn’t work,
I also implemented it in the game mode and it didn’t work either.

Things to consider:

  • I activated the seamsless travel in the travel map and others game modes
  • I tried to “for each” all the connected players and then run the function into the player controller
  • Also I tried to run the servertravel into the gamemode
  • i always packed the project in every attempt , the projects is made in EOS.

Does anyone know how to launch the command correctly or if there is something i am missing?

Thanks in advanced

1 Like

Edit: Non-Seamless ServerTravel is what is currently broken in UE5. Seamless ServerTravel does seem to work, but it’s not compatible with our game specifically.

If you are UE5, the command “servertravel” seems to be 100% broken currently for packaged games, I can’t speak to anything with only the Editor.
Our game is 4 years in development (Blueprints only); have never had an issue with servertravel.
Now, in our packaged game, the command no longer lets clients re-connect. They permanently drop. This isn’t even using our game code, this is just simply typing in “ServerTravel MapName?listen”, have also just tried “ServerTravel MapName”. Server travels fine, but now as of UE5, clients will never reconnect.

I highly recommend anyone using Blueprints to use the following method instead of ServerTravel as it will give you much more modular control:

  1. When your Lobby is ready, send all the clients to a “transition” map by making each PlayerController call “Open Level”
    This map can hold anything you like for a loading screen, requires no replication, and should load instantly for clients. The most important part here is that you are sending the SessionID as a variable into the TransitionLevel to guarantee clients know where to go after hanging out in the TransitionLevel.

  2. When the “Send All Clients to Transition Map” is done, have the Server call “OpenLevel” of the actual map you want to go to. Or if you want, just have the Server also go to the TransitionMap but you’ll need to pass another variable reminding the GameInstance that that’s the server.

  3. You can put some looping logic in the TransitionLevel’s blueprint to FindSession of the SessionID. Just keep searching reasonably if the SessionID you have saved exists. Then you can just JoinSession again, which is far more reliable than sort of Server Traveling or Seamless logic.

Benefits are you can have a nice loading screen, and you know that ever client is joining with a completely fresh PlayerController. Ideally ServerTravel would just work though.

4 Likes

Omg I knew it I’m not crazy!
My first ever bug report was accepted for this issue!
UE-151220

3 Likes

You are actually not crazy, I’m also having this issue, thank you very much for reporting it!!

I’m using UE5, Steam Subsystem and servertravel. Everything is working fine.

But let’s try to solve the problem:

  1. It is crucial how you catch your clients
  • In my case, they are all in an lobby. So in the game mode I use “HandleStartingNewPlayer” and not “OnPostLogin”
  1. The server travel command I use: servertravel/Game/Maps/Level01
    (the first 2 will be the same. The rest depends on your folder structure and the last one is the level itself)

  2. Make sure you added all needed Levels at the packaging options (advanced - Maps)

2 Likes

Are you sure you have Seamless travel disabled? Because this is only when doing non-seamless travels.

The way clients are being catch in my case it’s the default way unreal manages them, so I shouldn’t need to change it in order to make it work.

Im sure that it is activated. (The main difference, is that seamless travel is a non-blocking operation, while non-seamless will be a blocking call.)

If the host presses start within my lobby the game will start, so the Game Mode and Player Controller change. The process would be:

  1. All Player get collected within the lobby (Lobby Game Mode) - Event Handle Starting New Player

  2. As soon as the game starts, the game mode changes to Gameplay Game Mode - Event On Swap Player Controllers

It should not matter if you use a specific lobby map or not

This error is only present if you do non-seamless travel, as described in the bug report

Within the question:

  • I activated the seamsless travel in the travel map and others game modes

and they are useing a transition map. so they are using seamless travel.

Im not refering to the bug report

Hi man i am struggling with the same problem i have a question. it is working in editor ? mine works in editor but not in package

1 Like

Yea, same Problem here. It works in the Editor but not in the final build.

Hello, I also had the same problem when cooking the project in ue5.
In my case the problem was having the maps added in the project configuration.
As in ue5 the map selector of the project configuration does not work well, I have activated the option “Cook everything in the project content directory (ignore list of maps below)” and this has solved the problem of travel

Any updates on this? Still struggling to servertravel the clients when using non-seamless option (which we need for our design).
Clients just get disconnected in packaged game.

1 Like

Looks like it’s fixed on 5.1.

The Bug Tracker shared by @Sebatnik gives info about the commit and target version.

1 Like

can anyone else try to see if it works before i migrate to 5.1

1 Like

Confirmed that the client will travel in 5.1

Cheers all,
Tele

P.S. the bugs I had posted about turned out to just be migration issues that were solvable

Thanks for the confirmation, I’m happy that my game will work again as intended :slight_smile:

I’m having problems with this again! Servertravel is not working on 5.1 in packaged build. I migrated a project from 5.0, could be a problem?

Using version 5.1 here, for me, seamless travel :

  • does nothing in editor

  • works properly if you test from editor using the “standalone game” option

  • does nothing in packaged game D:

Note that I toggled “use seamless travel” in my gamemodes and that I am using a transition map.
I am also calling servertravel from “execute console command” in blueprints