Unable to Cook or Package Any UE5 Projects on Fresh Install

RX 4080, R9 7900 32 GB RAM | Restart/UE5 reinstall did not resolve.

Fresh UE 5.1 Install. Running into this output log when trying to cook and/or package any UE5 projects, including blank ones.
Here is the Output Log:


PackagingResults: Error: Errors compiling global shader FBuildInstanceIdBufferAndCommandsFromPrimitiveIdsCs  :
PackagingResults: Error: expected ')'
PackagingResults: Error: unknown type name 'ViewState'
PackagingResults: Error: unknown type name 'ViewState'
PackagingResults: Error: unknown type name 'ViewState'
PackagingResults: Error: unknown type name 'ViewState'
UATHelper: Cooking (Windows): LogShaderCompilers: Display: /Engine/Generated/GeneratedInstancedStereo.ush:435:2: error: unknown type name 'ViewState'
UATHelper: Cooking (Windows):          ViewState Result;
UATHelper: Cooking (Windows):          ^
UATHelper: Cooking (Windows): LogShaderCompilers: Display: /Engine/Private/InstancedStereo.ush:17:30: error: unknown type name 'ViewState'
UATHelper: Cooking (Windows):  void FinalizeViewState(inout ViewState InOutView)
UATHelper: Cooking (Windows):                               ^
UATHelper: Cooking (Windows): LogShaderCompilers: Display: /Engine/Private/InstancedStereo.ush:34:8: error: unknown type name 'ViewState'
UATHelper: Cooking (Windows):  static ViewState ResolvedView = (ViewState)0.0f;
UATHelper: Cooking (Windows):         ^
UATHelper: Cooking (Windows): LogShaderCompilers: Display: /Engine/Private/InstancedStereo.ush:36:1: error: unknown type name 'ViewState'
UATHelper: Cooking (Windows):  ViewState ResolveView()
UATHelper: Cooking (Windows):  ^
UATHelper: Cooking (Windows): LogShaderCompilers: Display: /Engine/Private/Common.ush:1257:65: error: invalid format for vector swizzle 'PreViewTranslation'
UATHelper: Cooking (Windows):          return LWCSubtract(TranslatedWorldPosition,  GetPrimaryView() .PreViewTranslation);
UATHelper: Cooking (Windows):                                                                         ^
UATHelper: Cooking (Windows): LogShaderCompilers: Display: /Engine/Private/Nanite/NaniteDataDecode.ush:728:51: error: unknown type name 'ViewState'
UATHelper: Cooking (Windows):  void PatchViewState(FNaniteView NaniteView, inout ViewState InOutView)
UATHelper: Cooking (Windows):                                                    ^
UATHelper: Cooking (Windows): LogShaderCompilers: Display: D3DCompileToDxil failed. Error code: Unspecified error (0x80004005).
UATHelper: Cooking (Windows): LogOutputDevice: Warning:
UATHelper: Cooking (Windows): Script Stack (0 frames) :
UATHelper: Cooking (Windows): LogWindows: Error: appError called: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 7999]
UATHelper: Cooking (Windows): Failed to compile global shader FBuildInstanceIdBufferAndCommandsFromPrimitiveIdsCs  .  Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries.
PackagingResults: Error: unknown type name 'ViewState'
PackagingResults: Error: unknown type name 'ViewState'
PackagingResults: Error: unknown type name 'ViewState'
PackagingResults: Error: unknown type name 'ViewState'
PackagingResults: Error: invalid format for vector swizzle 'PreViewTranslation'
PackagingResults: Error: unknown type name 'ViewState'
PackagingResults: Error: appError called: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 7999]
UATHelper: Cooking (Windows): LogWindows: Error: begin: stack for UAT
UATHelper: Cooking (Windows): LogWindows: Error: === Critical error: ===
UATHelper: Cooking (Windows): LogWindows: Error:
UATHelper: Cooking (Windows): LogWindows: Error: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 7999]
UATHelper: Cooking (Windows): LogWindows: Error: Failed to compile global shader FBuildInstanceIdBufferAndCommandsFromPrimitiveIdsCs  .  Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries.
UATHelper: Cooking (Windows): LogWindows: Error:
UATHelper: Cooking (Windows): LogWindows: Error:
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe50f43ff4 UnrealEditor-Engine.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe50f45b22 UnrealEditor-Engine.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe50f43ab6 UnrealEditor-Engine.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe50f26322 UnrealEditor-Engine.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe50f4b7fe UnrealEditor-Engine.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe4aecbce0 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe4ae8829f UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe4aecfce8 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe4ac2fcd2 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffe4ac52473 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff71606b0ce UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff716062688 UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff71606296a UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff716065680 UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff7160771b4 UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ff7160796f2 UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffeaf63244d KERNEL32.DLL!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error: [Callstack] 0x00007ffeb116df78 ntdll.dll!UnknownFunction []
UATHelper: Cooking (Windows): LogWindows: Error:
UATHelper: Cooking (Windows): LogWindows: Error: end: stack for UAT
PackagingResults: Error: begin: stack for UAT
PackagingResults: Error: === Critical error: ===
PackagingResults: Error: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 7999]
PackagingResults: Error: Failed to compile global shader FBuildInstanceIdBufferAndCommandsFromPrimitiveIdsCs  .  Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries.
PackagingResults: Error: [Callstack] 0x00007ffe50f43ff4 UnrealEditor-Engine.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe50f45b22 UnrealEditor-Engine.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe50f43ab6 UnrealEditor-Engine.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe50f26322 UnrealEditor-Engine.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe50f4b7fe UnrealEditor-Engine.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe4aecbce0 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe4ae8829f UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe4aecfce8 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe4ac2fcd2 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffe4ac52473 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff71606b0ce UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff716062688 UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff71606296a UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff716065680 UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff7160771b4 UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff7160796f2 UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffeaf63244d KERNEL32.DLL!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffeb116df78 ntdll.dll!UnknownFunction []
PackagingResults: Error: end: stack for UAT
UATHelper: Cooking (Windows): Took 106.41542999999999s to run UnrealEditor-Cmd.exe, ExitCode=3
UATHelper: Cooking (Windows): ERROR: Cook failed.
UATHelper: Cooking (Windows):        (see C:\Users\HoldBaker\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.1\Log.txt for full exception trace)
UATHelper: Cooking (Windows): AutomationTool executed for 0h 1m 46s
UATHelper: Cooking (Windows): AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
PackagingResults: Error: Cook failed.
UATHelper: Cooking (Windows): BUILD FAILED

Any help would be greatly appreciated.

try verifying the unreal engine files from the epic launcher.

is this a C++ project or blueprint?

Hey thanks for the reply!

It occurs on both BP and C++ projects. They can be just blank templates. I have tried verifying and reinstalling 5.1.

Packaging works fine on 5.0.3. ’

My first thought was that it was somehow a bug related to my hardware configuration.

Edit: in case its relevant, I’m on Windows 11, also the issue appears to be shader related based on the logs

Found a fix. After reading through a different log file. This resolved the issue:

Failed to compile global shader FVolumetricFogLightScatteringCS . Enable ‘r.ShaderDevelopmentMode’ in ConsoleVariables.ini for retries.

Path to this file:
“C:\Program Files\Epic Games\UE_5.1\Engine\Config\ConsoleVariables.ini”

1 Like