UE5.3 ExitCode=25

I have been working on a game for several months already except that now when I arrive at the final compilation of the project I see this famous error “AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

I looked at a few topics that are similar but each time it seemed like a different problem
noted that I use different packs in my game (including IWALS that’s what I tell myself since it’s a separate pack there could be problems) except that in the editor I have no errors when I launch the game

I saw that I had a lot of warnings and errors (afterwards I don’t know if it’s normal to have so many with a project of this size: 22GB)

here is the log.txt if anyone feels ready to watch it

Log.txt (1.3 MB)

Hi @HadossYT

This happens more often than not, but it’s always something different unfortunately.

You have quite a few BP errors according to your log. Unreal editor prevents most crashes from BP errors, so its easy to be able to PIE and not be able to build or have a build that doesn’t work.

Try fixing the errors in the BPs listed in your log, and maybe try fixing the warnings. Eventually, if there’s some other error preventing the build, you might be able to see it, as the log doesn’t show all errors, just the first 50 warnings+errors.

Also, before trying to build, make sure all your BPs are compiled, even recompile and re-save a few times problematic BPs. As weird as it is, that sometimes works.

Also, try fixing redirectors in your project. That will make builds and PIE run faster, and sometimes you’ll get crashes from some redirectors, which indicates where a real problem is hidden. Better to do it in tiny portions, as it sometimes takes a lot of resources and may crash just because of that.

I would second GRIM_Warlock’s suggestion to fix the bp errors.

There are bad cast errors and missing pin errors that need to be addressed (the missing pin can cause the bp compile to fail causing the cook to fail)

Sometimes verifying the engine also fixes cook problems (especially if the Windows SDK turnkey error rears it’s ugly head).
verify

I’ll try to double-check all my blueprints again, it might take a lot of time with school, I’ll keep you posted in a few days/weeks, thanks for your reply.

I just tried but there is no result unfortunately (by verifying the engine), I will try to recheck all my blueprints to see if that solves the problem, I will keep you informed if anyone has the same problem as me, thanks for your reply.

finally after reviewing all my blueprints, compiling them + saving them (and resolving the errors I think) I still find myself with this same error ExitCode=25
I put the log.txt back, I’m sorry if the error seems basic or if it’s the same but I’m still a beginner so I don’t really understand it…

Log.txt :

LogInit: Display: NOTE: Only first 50 warnings displayed.
LogInit: Display:
LogInit: Display: Failure - 2 error(s), 988 warning(s)
LogInit: Display:

Execution of commandlet took: 5m 44s (344.98 seconds)
LogShaderCompilers: Display: ================================================
LogShaderCompilers: Display: === FShaderJobCache stats ===
LogShaderCompilers: Display: Total job queries 3 240, among them cache hits 1 200 (37.04%)
LogShaderCompilers: Display: Tracking 2 040 distinct input hashes that result in 1 131 distinct outputs (55.44%)
LogShaderCompilers: Display: RAM used: 24,93 MiB of 1,60 GiB budget. Usage: 1.52%
LogShaderCompilers: Display: === Shader Compilation stats ===
LogShaderCompilers: Display: Shaders Compiled: 2 040
LogShaderCompilers: Display: Jobs assigned 2 040, completed 2 040 (100%)
LogShaderCompilers: Display: Average time worker was idle: 0.14 s
LogShaderCompilers: Display: Time job spent in pending queue: average 24.70 s, longest 197.59 s
LogShaderCompilers: Display: Job execution time: average 5.55 s, max 17.94 s
LogShaderCompilers: Display: Job life time (pending + execution): average 30.25 s, max 201.88
LogShaderCompilers: Display: Shader code size: average 31,089 KiB, min 204 B, max 95,262 KiB
LogShaderCompilers: Display: Time at least one job was in flight (either pending or executed): 323.75 s
LogShaderCompilers: Display: Jobs were issued in 266 batches (only local compilation was used), average 7.67 jobs/batch
LogShaderCompilers: Display: Average processing rate: 6.30 jobs/sec
LogShaderCompilers: Display: Total thread time: 1 247,553 s
LogShaderCompilers: Display: Total thread preprocess time: 55,275 s
LogShaderCompilers: Display: Percentage time preprocessing: 4.43%
LogShaderCompilers: Display: Effective parallelization: 3.85 (times faster than compiling all shaders on one thread). Compare with number of workers: 4
LogShaderCompilers: Display: Top 5 most expensive shader types by average time:
LogShaderCompilers: Display: TBasePassPSFSelfShadowedCachedPointIndirectLightingPolicySkylight (compiled 4 times, average 2.02 sec, max 3.35 sec, min 0.66 sec)
LogShaderCompilers: Display: TBasePassPSFSelfShadowedCachedPointIndirectLightingPolicy (compiled 4 times, average 1.96 sec, max 3.02 sec, min 0.78 sec)
LogShaderCompilers: Display: TBasePassPSFSelfShadowedTranslucencyPolicySkylight (compiled 4 times, average 1.88 sec, max 3.03 sec, min 0.68 sec)
LogShaderCompilers: Display: TBasePassPSFSelfShadowedVolumetricLightmapPolicySkylight (compiled 4 times, average 1.88 sec, max 3.36 sec, min 0.89 sec)
LogShaderCompilers: Display: TBasePassPSFSelfShadowedVolumetricLightmapPolicy (compiled 4 times, average 1.79 sec, max 3.11 sec, min 0.70 sec)
LogShaderCompilers: Display: Top 5 shader types by total compile time:
LogShaderCompilers: Display: FMicropolyRasterizeCS - 11.96% of total time (compiled 108 times, average 1.38 sec, max 3.45 sec, min 0.53 sec)
LogShaderCompilers: Display: FHWRasterizePS - 6.73% of total time (compiled 216 times, average 0.39 sec, max 0.99 sec, min 0.02 sec)
LogShaderCompilers: Display: TBasePassPSFPrecomputedVolumetricLightmapLightingPolicySkylight - 4.26% of total time (compiled 68 times, average 0.78 sec, max 3.31 sec, min 0.29 sec)
LogShaderCompilers: Display: TBasePassPSFCachedPointIndirectLightingPolicy - 4.19% of total time (compiled 68 times, average 0.77 sec, max 3.20 sec, min 0.34 sec)
LogShaderCompilers: Display: TBasePassPSFCachedPointIndirectLightingPolicySkylight - 4.18% of total time (compiled 68 times, average 0.77 sec, max 3.22 sec, min 0.31 sec)
LogShaderCompilers: Display: ================================================
LogShaderCompilers: Display: Shaders left to compile 0
Took 360,93s to run UnrealEditor-Cmd.exe, ExitCode=1
SafeDeleteFile C:\Users\tomga\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Unreal+Engine+UE_5.3\Cook-2024.05.15-17.21.36.txt
SafeCopyFile C:\Unreal Engine\UE_5.3\Engine\Programs\AutomationTool\Saved\Cook-2024.05.15-17.15.35.txt C:\Users\tomga\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Unreal+Engine+UE_5.3\Cook-2024.05.15-17.21.36.txt
SafeDeleteFile C:\Unreal Engine\UE_5.3\Engine\Programs\AutomationTool\Saved\Cook-2024.05.15-17.15.35.txt

Cook failed.
(see C:\Users\tomga\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Unreal+Engine+UE_5.3\Log.txt for full exception trace)

CommandletException: Editor terminated with exit code 1 while running Cook for C:\Unreal Engine\IWALS\IWALS UE5\IWALS5.2Copie\Interaction_With_ALS.uproject; see log C:\Users\tomga\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Unreal+Engine+UE_5.3\Cook-2024.05.15-17.21.36.txt
at AutomationTool.CommandUtils.FinishRunCommandlet(FileReference ProjectName, String Commandlet, DateTime StartTime, IProcessResult RunResult, String LocalLogFile, String& DestLogFile, UInt32 ErrorLevel) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 472
at AutomationTool.CommandUtils.CookCommandlet(FileReference ProjectName, String UnrealExe, String Maps, String Dirs, String InternationalizationPreset, String CulturesToCook, String TargetPlatform, String Parameters) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 93
at AutomationScripts.Project.Cook(ProjectParams Params) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\CookCommand.Automation.cs:line 292Wrapped by AutomationException: Cook failed.
at AutomationScripts.Project.Cook(ProjectParams Params) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\CookCommand.Automation.cs:line 302
at BuildCookRun.DoBuildCookRun(ProjectParams Params) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 235
at BuildCookRun.ExecuteBuild() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 43
at AutomationTool.BuildCommand.Execute() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 345
at AutomationTool.BuildCommand.ExecuteAsync() in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 354
at AutomationTool.Automation.ExecuteAsync(List1 CommandsToExecute, Dictionary2 Commands) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 265
at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 164

AutomationTool executed for 0h 6m 4s
AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

Yeah, the error is still not clear, as usually with these logs…

I can give you general tips that sometimes work:

  • Make sure there absolutely no assets referenced from a Developer’s folder. That can never be added to build and can cause this build crashes.

  • Try deleting your /Build /Saved /DerivedCachedata and /Intermediate from the root folder and regenerate visual studio project files. Sometimes corrupted data in these folders gets in the way of building.

  • Play your game in Standalone and keep an eye on the Output console for warnings and errors that might require fixing.

  • Rebuild completely instead of using the “Only cook new content” option to make sure it’s a clean build.

  • If you have any plugins in your project that you aren’t using, disable them.

  • Lastly, if nothing works, make a copy of your project and delete all your maps. Try to make a build with an empty map to see if you have any corrupted maps in your original project, or maps with missing or corrupted assets.
    There’s an old weird bug (from Unreal Engine 4) that would cause maps to duplicate and misreference themselves, making it imposible to build while hard to see any issues in the editor.

You can check that by looking at the “debug target” on your map’s level blueprint. If there’s more than one option without pressing play, that’s a big problem, cause as far as I know that can’t be fixed without deleting and creating a new map.

I launched the game in “Standalone Game” then after all the checks of my Blueprints I managed to compile the game

The Warnings in yellow are not the priority but the “LogBlueprint” type errors in red are the ones that gave me failure (ultimately it was a “SetObject” error in 2-3 Widget blueprint and a few other small errors) It was not even the maps, “Only cook”, …

It might seem stupid but I missed all that, Thank you for helping me, really :grinning:
(and sorry for not responding sooner)

for those who have the same problem, look at your “Output Log” during “packaging” or “cooking” the Log.txt was not as complete as the Ouput log
( click on “show output log” at the bottom right when you launch packaging or cooking)*