UE5 Multiplayer Course "Hosting Servers With ServerTravel" Issues

In UE5, if you host your server in the editor, and then try to connect with a client, the client crashes, some weird logs about syncing.

Also, I can’t get any UFUNCTION(exec) custom console commands in game instance to work when starting the editor through the command line. They work fine in the editor, but when trying to host the listen server from the command line to avoid the crashing issue with “Host”, I just get an error log saying the command is missing. UE5 might need extra syntax around these ufunction calls or something now, not sure what’s going on.

As a workaround:
I found using the “ServerTravel” builtin console command to work well enough to test all of this.
Syntax: ServerTravel {relative path to the new level from the currently loaded level}?listen

My lobby level was in the same folder as the level I wanted to load (my level is named Sandbox). So the command is:
ServerTravel Sandbox?listen

2 Likes

Thanks a lot for this! I’m in Unreal 5.03 and was having the same issue. The command from the console works fine.

Now I tried to use the host comand but adding to the GameInstance
#include “Engine/World.h”

I don’t know if it because this was missing, or because there was some data that was not properly executed when starting the clients from the powershell, but now the client can connect to the server.

I would say it is more likely that it triggered a rebuild and updated. Have you got live coding on or off? Generally live coding, while a great idea, doesn’t work particularly well and it will reach a point sometime in the future where it is usable but sometimes it doesn’t rebuild properly so things just don’t work.

Make sure you have it off.

I did have live coding enabled. Disabling it fixed the issues around game instance exec commands not working. Trying to connect a command line started client to a gui editor started server session no longer crashes, but it does still error out on me. I can live without this behavior though.

Thanks for the help.

1 Like

Have the same issue it seams to be a problem with loading the GameInstance.

LogEngine: Error: Unable to load GameInstance Class ‘/Script/PuzzlePlatforms.PuzzlePlatformsGameInstance’. Falling back to generic UGameInstance.

Got it fixed by deactivate live coding

UE 5.0.3

1 Like

Using 5.1 (01/01/2023) and turning off live coding and building from visual studio code worked like a charm. Thanks you.

Privacy & Terms