Unreal Cloud Docs
Guides

Unreal Engine packaging errors, explained

What ExitCode=25, ExitCode=6, Unknown Cook Failure, LNK2019, Live Coding and other Unreal Engine packaging errors mean, how to find the real error, and how to fix the common ones.

A failed package usually ends with something like this:

AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

Or, in the editor, a notification saying PackagingResults: Error: Unknown Cook Failure or Unknown Error. Those only tell you which step failed. The actual problem is further up the log, often hundreds of lines earlier. This page shows how to find it, what the exit codes mean, and how to fix the errors that come up most.

Find the real error

  1. Open the full log, not the summary. In the editor, that's Window → Output Log. When packaging from the command line, it's the console output, and on Windows with a launcher engine the logs are also saved in %AppData%\Unreal Engine\AutomationTool\Logs.
  2. Search from the top for the first Error:. The errors at the bottom are usually just other steps failing because of the first one.
  3. Read a few lines above it too. The line that names a file, an asset or a module is the one you need.

Warnings rarely stop a build. If you find dozens of them, skip them and keep looking for the first error.

What the exit code tells you

The exit code says which step failed, so you know which section below to read:

Exit codeWhat failedRead
ExitCode=1 (Error_Unknown)The Automation Tool itself, often because of the command line.Command line
ExitCode=6Compiling your C++ code.Compiling
ExitCode=25 (Error_UnknownCookFailure)Cooking, which converts your assets for the platform.Cooking
ExitCode=137Nothing in Unreal: the operating system killed the process, on Linux or macOS.Out of memory

Command line

"Failed to find scripts to execute"

The Automation Tool didn't understand the command. Usually a path with spaces that isn't in quotes, or a mistyped flag. Put every path in quotes, like -project="C:\My Projects\MyGame\MyGame.uproject", and check each flag's spelling against Package from the command line.

Compiling

"Unable to find valid toolchain"

Unable to find valid 14.38.33130 C++ toolchain for VisualStudio2022 x64

Unreal can't find the Visual Studio compiler it needs. Unreal Engine 5.4 and later build with Visual Studio 2022, and the error names the exact compiler version it wants.

In the Visual Studio Installer, click Modify on Visual Studio 2022 and check that you have:

  • The Game development with C++ workload.
  • Under Individual components, the MSVC build tools version the error names, like MSVC v143 - VS 2022 C++ x64/x86 build tools (v14.38-17.8).
  • A Windows SDK.

If everything is there and the error stays, run Repair from the same installer.

"Unable to build while Live Coding is active"

Unable to build while Live Coding is active. Exit the editor and game, or press Ctrl+Alt+F11 if iterating on code in the editor or game

Live Coding is patching code in a running editor or game, and it locks the build. Close the editor and any game you started from it, make sure LiveCodingConsole.exe isn't still running, then package again.

LNK2019: unresolved external symbol

error LNK2019: unresolved external symbol "..." referenced in function "..."

Your code uses a class from a module your module doesn't depend on. It often compiles in the editor and only fails when packaging, because the editor loads more modules.

  1. Find the module the class belongs to. Epic's API reference shows it at the bottom of each class's page.
  2. Add it to your module's .Build.cs:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "Json" });

Use PrivateDependencyModuleNames instead when only your .cpp files use it.

C1083: cannot open include file

fatal error C1083: Cannot open include file: 'SomeHeader.h': No such file or directory

Same cause, earlier: the header is in a module your .Build.cs doesn't list. Add the module as above. If the header is your own, check the path in the #include line.

Errors you don't get in the editor

The editor builds with the Development Editor configuration, so some code only gets compiled when you package. Look for:

  • Code inside #if WITH_EDITOR that game code calls anyway. It doesn't exist in a packaged build.
  • Editor-only modules, like UnrealEd, listed as a dependency of a runtime module in its .Build.cs.
  • A missing #include that the editor build happened to cover for.

"Expecting to find a type to be declared in a target rules named…"

Expecting to find a type to be declared in a target rules named 'MyGameTarget'

Unreal reads each .Target.cs and .Build.cs file and expects the class inside to match the file's name: MyGame.Target.cs must declare MyGameTarget, and MyModule.Build.cs must declare MyModule. Fix any name that doesn't match, often after renaming a project. If they all match, delete the project's Intermediate folder, and remove any old copies of plugins left in the project or a previous build folder.

"Missing precompiled manifest"

Missing precompiled manifest for 'SomeModule'

A plugin module wasn't built for the packaged game. It usually comes from a plugin installed into the engine, like one from Fab. In order:

  1. In the plugin's .uplugin file, check that the module's Type is right: Runtime for code the game needs, Editor only for editor tools.
  2. Check that the plugin's EngineVersion matches your engine version, and update the plugin if it doesn't.
  3. Delete your project's Binaries and Intermediate folders and package again.
  4. As a last resort, add PrecompileForTargets = PrecompileTargetsType.Any; to the module's .Build.cs.

"Missing UnrealGame binary"

Missing UnrealGame binary. You may have to build the UE project with your IDE.

The packaging step expected a game executable that wasn't built. It mostly happens with Blueprint-only projects whose plugins or settings need a custom build. In Project Settings → Packaging, set Build to Always, then package again. If it still fails, add a C++ class from Tools → New C++ Class so the project gets its own code to compile.

"Couldn't find target rules file"

Couldn't find target rules file for target 'MyGameServer'

You're building a dedicated server. Server builds need an engine built from source and a MyGameServer.Target.cs file in your project's Source folder. The launcher version of the engine can't build servers. See Dedicated servers.

Cooking

A Blueprint with a compile error

A single Blueprint that doesn't compile is enough to fail the whole cook, and the editor only says Unknown Cook Failure. Search the log for LogBlueprint errors: they name the Blueprint and the broken node. Open it, click Compile, fix or delete the broken nodes, and save.

To check every Blueprint at once, run the engine's CompileAllBlueprints commandlet:

"C:\Program Files\Epic Games\UE_5.7\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" "C:\Projects\MyGame\MyGame.uproject" -run=CompileAllBlueprints

It lists every Blueprint that fails to compile.

An error naming an asset

When the cook stops on a specific asset, the asset usually references something that was moved or deleted:

  1. Open the asset in the editor and fix any warnings it shows.
  2. In the Content Browser, right-click the folder and choose Fix Up Redirectors. That updates references to assets that were moved or renamed.
  3. Save the asset again.

If you don't need the asset, delete it and fix the references the editor reports.

Out of memory

ExitCode=137 on Linux, or a crash without a clear error partway through cooking or shader compiling, usually means the machine ran out of memory. Big projects can use a lot of memory while cooking. Close other programs, add memory or swap, or package on a bigger machine.

Staging and files

Locked files: "Access to the path is denied"

Staging copies thousands of files, and fails if one of them is open somewhere else. Check that:

  • No copy of the game is still running from a previous package.
  • The project isn't in a folder synced by OneDrive, Dropbox or Google Drive, which lock files while they sync.
  • Your antivirus isn't scanning the project folder. Excluding it also makes builds faster.

Disk full

Cooked content, the staged build, the archive and the derived data cache can add up to several times your project's size. If errors mention writing a file, check free space on the drive with the project and on the one with the archive folder.

Windows: paths that are too long

Windows limits most paths to 260 characters, and a cooked build nests folders deeply. If errors mention a path that's cut off, or files that "don't exist" but do, move the project closer to the root of the drive, like C:\Projects\MyGame, and use a short archive folder.

Android

Most Android failures come from the SDK, NDK or JDK not matching your engine version, or an SDK license that wasn't accepted. See Android setup for the versions each engine needs and the fixes for those errors.

Catch it before release day

Packaging errors pile up when nobody packages for weeks. Building on every commit catches each one the day it's introduced, while it's still easy to find.

On this page