Client fails to join with TravelFailure error

I am almost done with the UI portion of the multiplayer Unreal series but after implementing the client join via ui option I run into this issue when trying to join a server. (I’ve tested with hamachi and had a friend run around the level with me via the exec command earlier on so I know join should work.)

TravelFailure: LoadMapFailure, Reason for Failure: ‘Failed to load package ‘/Game/PuzzlePlatforms/Maps/UEDPIE_0_ThirdPersonExampleMapMod’’. Shutting down PIE.

I see communication in the server logs that indicates that the client was talking to the server but it always results in this failure.

I’ve tested a couple different ways but this is most recently from running the uproject twice and using play in each. I am running on windows and hosting/joining via the implemented main menu ui.

Have you really named your map UEDPIE_0_ThirdPersonExampleMapMod?

Your server should have a line similar to this one:
(pay attention to the appended ?listen)

// ...
UWorld* World = GetWorld();
if (!ensureMsgf(World, TEXT("GetWorld returned null!"))) return;
World->ServerTravel("/Game/Maps/Lobby?listen");
// ...

And the code to connect to the server should look like this:
(without ?listen)

// ...
APlayerController* PlayerController = GetFirstLocalPlayerController();
if (!ensureMsgf(PlayerController, TEXT("Couldn't get PlayerController object!"))) return;
PlayerController->ClientTravel("/Game/Maps/Lobby", ETravelType::TRAVEL_Absolute);
// ...

No the map name is ThirdPersonExampleMapMod. UEDPIE_0_ seems to be getting appended by Unreal. Not sure why. This is using the same commands that were implemented as exec commands earlier just being called by the Main Menu UI interface / PuzzlePlatformerGameInstance.

Pretty sure UED stands for (Unreal Engine Development) and PIE is probably (Play in Editor) it was appended by Unreal and isn’t a part of my actual map name.

Looks like this is an issue with the run in editor setting. I was able to get joining to work by switching to using the stand alone game run option.

A note for anyone that reads this - I found an interesting crash. If you attempt to join a game and it fails to load the world. This resulted in a black screen, guessing its the main menu level without the UI, and then attempt to join using the exec console command you’ll get a nullptr crash on the teardown menu call for GetWorld(). It flagged it as the line of code after that call for me but the next line was my if (World == nullptr) return; line so the crash had to be the line before which was World = GetWorld();

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms