PackagingResults: Error: Unknown Cook Failure (ExitCode=25) in Unreal Engine

This is not a cause. It is the last line AutomationTool prints when the cook commandlet (UnrealEditor-Cmd.exe) exits with code 25. The cooker stopped because of an earlier error, and that error is somewhere above in the same log, often hundreds of lines earlier.

  • Summary message: the real cause is earlier in the log
  • Seen in our lab, no dedicated reproduction yet

Decode your log

Paste your packaging log, or drop Log.txt with Cook-*.txt / UBA-*.txt. The analysis runs in your browser: the log is never uploaded.

What it looks like in your log

Excerpts from a reproduction in our lab (a test plugin, not a real product). Paths anonymized; line numbers are those of the original files.

Unreal Engine 5.4.4

Log.txt (cook failure)

Took 9.96s to run UnrealEditor-Cmd.exe, ExitCode=3Cook failed.AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

ExitCode=3 is the return code of the cook process (UnrealEditor-Cmd.exe). ExitCode=25 is the final code of AutomationTool: the cook failed.

Log.txt (build failure)

Took 1.59s to run dotnet.exe, ExitCode=8UnrealBuildTool failed. See log for more details. (C:\Users\Dev\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4\UBA-MyProjectEditor-Win64-Development.txt)AutomationTool exiting with ExitCode=8 (8)

ExitCode=8 is the final code of AutomationTool when UnrealBuildTool fails: the build stopped before the cook started. The cause is printed above, and in the UBA-*.txt file named in the message.

Unreal Engine 5.8.3

Log.txt (cook failure)

Took 10.99s to run UnrealEditor-Cmd.exe, ExitCode=3AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

ExitCode=3 is the return code of the cook process (UnrealEditor-Cmd.exe). ExitCode=25 is the final code of AutomationTool: the cook failed.

Log.txt (build failure)

Took 2.47s to run dotnet.exe, ExitCode=8UnrealBuildTool failed. See log for more details. (C:\Users\Dev\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.8\UBA-MyProjectEditor-Win64-Development.txt)AutomationTool exiting with ExitCode=8 (8)

ExitCode=8 is the final code of AutomationTool when UnrealBuildTool fails: the build stopped before the cook started. The cause is printed above, and in the UBA-*.txt file named in the message.

Exit codes: where did it fail?

The last line of Log.txt, AutomationTool exiting with ExitCode=N, tells you which stage failed before you read anything else.

ExitCode=25 (Error_UnknownCookFailure): the cook failed. The cook process (UnrealEditor-Cmd.exe) stopped first, often with its own code a few lines above, such as ExitCode=3 after a crash. The cause is in the cook log, Cook-<date>.txt, and is usually copied into Log.txt: an error line, an assertion, or a crash such as EXCEPTION_ACCESS_VIOLATION during cook.

ExitCode=8: UnrealBuildTool failed, before the cook even started. Look at the lines just before "UnrealBuildTool failed. See log for more details.": they usually hold a rules error such as error CS0101, Could not find definition for module or Expecting to find a type in a module rules named. The full UnrealBuildTool output is in the UBA-*.txt file named in that message.

ExitCode=0 means the package was built. It can still hide broken references that only show up when the game runs.

How to find the first real error

Read from the top, not from the bottom: the first blocking error is the cause, later errors are often consequences. Skip the crash banner lines (begin: stack for UAT, === Critical error: ===, Fatal error!) and empty Error: lines: the useful line comes right after them.

Lines logged as Display or Warning do not stop a cook, even when they contain the word Error. Lines relayed by AutomationTool (LogInit: Display: LogUObjectGlobals: Warning: ...) keep the severity of the original line, the inner one.

Common causes

  • Any error logged by the cooker: broken or missing assets, uncookable references, shader or material compilation errors, plugin crashes.
  • A crash of the editor process during the cook (assertion, access violation).

How to fix it

  1. Open the full log: Saved/Logs in your project, or the Cook-*.txt / Log.txt file under AppData/Roaming/Unreal Engine/AutomationTool/Logs.
  2. Search from the top for the first line containing "Error:", "Assertion failed" or "EXCEPTION_". Ignore the summary lines at the end.
  3. Fix that first error, then cook again. Later errors are often consequences of the first one.
  4. If you cannot classify the first error, paste the log into the decoder on this site: it extracts the relevant lines for you.

Questions

What is ExitCode=25 in Unreal Engine?

Error_UnknownCookFailure: the code AutomationTool returns when the cook step fails. It is a summary; the real error is earlier in the log.

What is ExitCode=8?

UnrealBuildTool failed, so packaging stopped at the build stage, before the cook. The cause is just above the "UnrealBuildTool failed" line, and in the UBA-*.txt log.

Why does the log say ExitCode=3, then ExitCode=25?

ExitCode=3 is returned by the cook process itself (UnrealEditor-Cmd.exe) when it crashes or fails. AutomationTool then reports its own final code, 25.

Can it be caught before cooking?

Not reliably. Not applicable: this is a summary message, the real cause is detected by the other rules.

Reports and sources

Get notified when the in-editor plugin launches

The same decoder inside the Unreal Editor, with checks that catch these errors before you cook.