Packaging error

Hello.
I have been having this issue where i cant package my project.

my error massage:
UATHelper: Packaging (Windows): LogInit: Display: LogCook: Error: GlobalDefaultGameMode contains a redirected reference ‘/Game/Blueprints/GameModes/BP_DefGameMode’. The intended asset will fail to load in a packaged build. Select the intended asset again in Project Settings to fix this issue.
UATHelper: Packaging (Windows): LogInit: Display: LogCook: Error: GlobalDefaultServerGameMode contains a redirected reference ‘/Game/Blueprints/GameModes/BP_DefMarsGameMode’. The intended asset will fail to load in a packaged build. Select the intended asset again in Project Settings to fix this issue.
UATHelper: Packaging (Windows): LogInit: Display:
UATHelper: Packaging (Windows): LogInit: Display: Failure - 2 error(s), 0 warning(s)
UATHelper: Packaging (Windows): LogInit: Display:
UATHelper: Packaging (Windows): Execution of commandlet took: 15.89 seconds
UATHelper: Packaging (Windows): LogShaderCompilers: Display: ================================================
UATHelper: Packaging (Windows): LogShaderCompilers: Display: === FShaderJobCache stats ===
UATHelper: Packaging (Windows): LogShaderCompilers: Display: Total job queries 0, among them cache hits 0 (0.00%)
UATHelper: Packaging (Windows): LogShaderCompilers: Display: Tracking 0 distinct input hashes that result in 0 distinct outputs (0.00%)
UATHelper: Packaging (Windows): LogShaderCompilers: Display: RAM used: 0.00 MB (0.00 GB) of 819.20 MB (0.80 GB) budget. Usage: 0.00%
UATHelper: Packaging (Windows): LogShaderCompilers: Display: === Shader Compilation stats ===
UATHelper: Packaging (Windows): LogShaderCompilers: Display: Shaders Compiled: 0
UATHelper: Packaging (Windows): LogShaderCompilers: Display: Jobs assigned 0, completed 0 (0.00%)
UATHelper: Packaging (Windows): LogShaderCompilers: Display: Time at least one job was in flight (either pending or executed): 0.00 s
UATHelper: Packaging (Windows): LogShaderCompilers: Display: ================================================
UATHelper: Packaging (Windows): Took 24.663737400000002s to run UnrealEditor-Cmd.exe, ExitCode=1
UATHelper: Packaging (Windows): ERROR: Cook failed.
UATHelper: Packaging (Windows): (see C:\Users\pmate\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UE_5.0\Log.txt for full exception trace)
UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 25s
UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
UATHelper: Packaging (Windows): BUILD FAILED
PackagingResults: Error: Unknown Cook Failure

I use UE5

1 Like

Having same issue in 5.0.2

Going to add to this because I just hit the same issue and it took me more googling than I expected to fix it.

First up, the solution:

  1. Go into Project Settings > Maps & Modes > Default Modes and set the Default GameMode to GameModeBase.
  2. Run a build - This part may be optional, but I ended up doing it just to make sure I could build with the default Game Mode.
  3. Go back into Project Settings > Maps & Modes > Default Modes ans set Default GameMode back to whatever your Game Mode should be.
  4. Run another build. The build should be successful this time.

The Cause:
The reason I encountered this issue is because I re-arranged parts of my folder structure, and moved my Game Mode Blueprint from the base content directory into a subfolder. This appears to throw off UE because the system keeps a redirect reference in memory. Attemping to change from the same gamemode by just toggling the dropdown didnt work, I had to change it, build, then change it back and the system was happy then.

The best I can summarise is that by changing it and forcing the build, it forced the editor to remove its previous reference to the old location and then update it to the new one when I selected it once again.

22 Likes

You are a chief, exactly my problem, I changed my folder structure and now everything just works fine. Thank you very much for your help.

This worked like a charm for me too, thanks!

Thanks my brother!! Redirection sucks man, can’t believe UE5 is still having this sh*** issues

1 Like

it didnt even work xD

Also try ticking the Full Rebuild option under Project - Packaging > Project
Then deselect after a successful build

While, this didn’t work for me, I was able to fix it by right clicking the main content folder and hitting fix up redirectors which fixed it!

4 Likes

sometimes when you make some changes
and they do funny things in a build
it helps to delete the saved and intermediate folders
that causes it to fully rebuild everything

I found a solution by ,Fixing up redirectors, capture thumbnail and clear for struct asset, also re defining variable Don’t delete just select the struct again

I own you a beer man. You’re a hero.

It work well for me thank you very much

Awesome fixed my issue thank u

Thanks bro! it works for me

Thanks, this fixed it for me too. I wish Epic would suggest trying this in the build failure message.

OMG u are the best one! It really works!

OMG U are the best One! It really works!

Kudos to you man!