I’m trying to make a menu with buttons for loading levels, and I have a list of levels in my custom game mode c++ class, where I add one button for each entry. The problem is, that it won’t load any levels. I assign an onlicked event to every button that loads a specific level, but I only get this output:
LogNet:Warning: Travel Failure: [InvalidURL]: Invalid URL: /Game/Scenes/MainMenu
LogNet:Warning: TravelFailure: InvalidURL, Reason for Failure: 'Invalid URL: /Game/Scenes/MainMenu'. Shutting down PIE.
PIE:Warning: Warning TravelFailure: InvalidURL, Reason for Failure: 'Invalid URL: /Game/Scenes/MainMenu'. Shutting down PIE.
LogNet:Warning: Travel Failure: [ClientTravelFailure]: Invalid URL: /Game/Scenes/MainMenu
LogNet:Warning: TravelFailure: ClientTravelFailure, Reason for Failure: 'Invalid URL: /Game/Scenes/MainMenu'. Shutting down PIE.
PIE:Warning: Warning TravelFailure: ClientTravelFailure, Reason for Failure: 'Invalid URL: /Game/Scenes/MainMenu'. Shutting down PIE.
If I type the level name directly into the openlevel node, it seems to work. This way it doesn’t.
For the buttons I had to make another custom widget containing only a button and a textblock, because I wasn’t able to directly add those components.
For the openlevel node I also tried several different formats for the level file.
Any ideas?
Edit: the problem seems to be something with the value that I get from the foreach loop. I see the right value when I output it inside the loop, but in the event it only prints “none”.
I ran into this issue as well. would open a multiplayer session/server. join and play, and when game ended, a controller could call the open level function, but the game viewports would close and the game would crash (the editor didn’t crash though). when deleting the open level function, and replacing it with an execute console command containing ‘open levelname’ it worked out.
“The “Launch” button in the editor will only cook the current level that’s open and save it in the Saved/StagedBuilds directory, which could explain the travel failure. One more thing to try is using the Package Project option. This will cook all the levels in your project, and should allow the server to travel to any of them.”
I know this is probably irrelevant at this point, but I figured I’d post this for any others looking for the solution.
I had the same problem. Took the name from the name of the enumerator. Automatically put the node ‘enum-to-name’.
→ Put by hand ‘enum-to-string’ and ‘string-to-name’, and plug into “open level” function. The error has gone, the level began to load.
Go to Edit > Project Settings > Packaging. Then click on the dropdown arrow under the packaging section. List of maps to include in a packaged build. Add as many elements as you have maps you want to load. And add your maps from their directory.
NOTE: If you can’t find your Levels, right click them in the content browser, Show in Explorer. You may need to uncheck read only on them in the explorer.
Go to
I’ve found away around the bug for my purposes. I was using an Enum for storing my maps and it didn’t like that when trying to feed it to the OpenLevel. By converting it first to a string with the EnumToString function (don’t just use the ToString function- it won’t work).
Make sure that when you specify the name of the map, that you are including the full path to the map, and not just the name of the map. For instance if you have a map, “myMap” in the following folder structure: Game/Levels/
Then you need to pass “Game/Levels/myMap” to GameplayStatics::OpenLevel as the FName LevelName.
You can get the correct path, by going into the project settings->Packaging. Then find ‘List of maps to include in a packaged build’ under advanced settings and locate your map with the three dots (. . .), it will then display the proper path to use.
In case auf Android packing the error may occur, too - but has a complete different cause and situation than above.
For anyone whom it may concern: if game data is not packed inside apk, but in obb. if the obb file is not uploaded, travel fails to access the package and then this misleading error message occurs. Either upload the obb or check “package game data inside .apk”.
I have been trying to figure out why it was giving travel failure even though I went through multiple forms but couldn’t. However, your comment solved my problem, TYSM!!
I was having an Issue travelling back to the main menu.