Download

Cook Fails while compiling even on a temp project

As soon as cook is initiated it fails with errors like this, even on temp projects like VR tempt or Third person temp:

Log.WriteException: ==============================================================================
Log.WriteException: ERROR: Cook failed.
Log.WriteException: (see C:\Users\scalame\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\Log.txt for full exception trace)
Log.WriteException:
Log.WriteException: UnauthorizedAccessException: Access to the path ‘C:\Program Files\Epic Games\UE_4.22\Engine\Programs\AutomationTool\Saved’ is denied.
Log.WriteException: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
Log.WriteException: at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
Log.WriteException: at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
Log.WriteException: at AutomationTool.LogUtils.GetUniqueLogName(String Base) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\LogUtils.cs:line 109
Log.WriteException: at AutomationTool.CommandUtils.RunCommandlet(FileReference ProjectName, String UE4Exe, String Commandlet, String Parameters, String& DestLogFile) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 266
Log.WriteException: at AutomationTool.CommandUtils.RunCommandlet(FileReference ProjectName, String UE4Exe, String Commandlet, String Parameters) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 237
Log.WriteException: at AutomationTool.CommandUtils.CookCommandlet(FileReference ProjectName, String UE4Exe, String] Maps, String] Dirs, String InternationalizationPreset, String] CulturesToCook, String TargetPlatform, String Parameters) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 89
Log.WriteException: at Project.Cook(ProjectParams Params) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\CookCommand.Automation.cs:line 249Wrapped by AutomationException: Cook failed.
Log.WriteException: at Project.Cook(ProjectParams Params) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\CookCommand.Automation.cs:line 263
Log.WriteException: at BuildCookRun.DoBuildCookRun(ProjectParams Params) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 209
Log.WriteException: at BuildCookRun.ExecuteBuild() in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 41
Log.WriteException: at AutomationTool.BuildCommand.Execute() in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 242
Log.WriteException: at AutomationTool.Automation.Execute(List1 CommandsToExecute, Dictionary2 Commands) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 545
Log.WriteException: at AutomationTool.Automation.Process(String] Arguments, StartupTraceListener StartupListener) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 515
Log.WriteException: at AutomationTool.Program.MainProc(String] Arguments, StartupTraceListener StartupListener) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:line 162
Log.WriteException: at AutomationTool.Program.<>c__DisplayClass1_0.<Main>b__2() in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:line 88
Log.WriteException: at AutomationTool.InternalUtils.RunSingleInstance(Func`1 Main) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 725
Log.WriteException: at AutomationTool.Program.Main(String] Arguments) in D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:line 88
Log.WriteException: ==============================================================================
Program.Main: AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

Thanks!

It seems that Unreal cooking systems needs to access ‘C:\Program Files\Epic Games\UE_4.22\Engine\Programs\AutomationTool\Saved’ to store a temporary cook file.

You do not seem to have access to this folder. I would try to run the editor with elevated privileges or give your current user access to C:\Program Files\Epic Games\UE_4.22\ sub folders.

Thanks Flavien that worked!

I ran unreal editor exe in the binaries as an admin, however i have to do this every time i want to open and compile a project.

Is there a way to permanently give it admin status so i can use project exe’s instead? I tried doing it through properties but then the engine wouldnt even launch.

Thanks again for the quick response!

Having a very similar issue but not as clear an error message. I’ve been making quite the monologue on a post for it this last week. Would really appricate any help: Unknown Cook Failure: CookCommand.Automation.cs:249 Wrapped by AutomationException: Cook failed. - Unreal Engine Forums

Hi,i know this thread is old and I dunno if you ever gonna read this. I have the same problem and running the editor as an administrator did not solve the problem. I tried every solution i’ve come across on the net and still no luck in packaging my project. by any chance, what did you do to fix your problem?

Привет. Решил проблему, у меня также

Turn off Real-time Protection in Virus & Threat protection settings