OpenLevel Travel Failure: Invalid URL

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.

This is the blueprint: Screenshot - b3c7e0774e934a026426ea210c69e940 - Gyazo

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”.

1 Like

Same problem here…

  1. I deleted the Onclick event from the Graph,
  2. i created a new OnClick Event
  3. i connected the event with the rest of the blueprint (open level etc)

This worked for me… i think is a bug…

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.

1 Like

The solution I found for this issue is here: https://answers.unrealengine.com/questions/196214/failed-to-load-package-on-client.html

“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.

1 Like

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.

I just gave a solution for this in another post. But I want to share it here too :).

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

4 Likes

This worked for me as well.

Can you send a picture of it please?

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).

261214-enumtostring.png

make sure the name of the level is correct. that did it for me

1 Like

Thank you!

I do not know who are what you are… but to me you are an angel. This post probably saved my career.

Thanks!

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.

I hope this helps anyone who is still struggling.

1 Like

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”.

Not OP, but this is exactly the solution I needed for what I was trying to do.

Thank you so much!

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.

I just hit this problem, it solved it - thank’s