Package/Cook Build failed

I recently started experiencing a build failure. Any help would be appreciated. I haven’t changed windows, Visual Studio, or anything major in the project that I can think of.

Here is my very short log.

MainFrameActions: Cooking (Windows): Running AutomationTool…
MainFrameActions: Cooking (Windows): Program.Main: CWD=Y:\Unreal Engine\Epic Games\4.10\Engine\Binaries\DotNET
MainFrameActions: Cooking (Windows): Automation.ParseCommandLine: Parsing command line: BuildCookRun -rocket -nocompile -nocompileeditor -installed -nop4 -project=X:/Unreal Projects/A_Citadel13/A_Citadel13.uproject -cook -ue4exe=UE4Editor-Cmd.exe -targetplatform=Win64 -CookAll
MainFrameActions: Cooking (Windows): Automation.Process: IsBuildMachine=False
MainFrameActions: Cooking (Windows): Automation.Process: ShouldKillProcesses=True
MainFrameActions: Cooking (Windows): Automation.Process: Setting up command environment.
MainFrameActions: Cooking (Windows): CommandUtils.SetEnvVar: SetEnvVar uebp_EngineSavedFolder=Y:/Unreal Engine/Epic Games/4.10/Engine/Programs/AutomationTool/Saved
MainFrameActions: Cooking (Windows): CommandUtils.DeleteDirectoryContents: DeleteDirectoryContents(C:/Users//AppData/Roaming/Unreal Engine/AutomationTool/Logs/Y+Unreal+Engine+Epic+Games+4.10)
MainFrameActions: Cooking (Windows): WindowsHostPlatform.SetFrameworkVars: Setting .Net Framework environment variables.
MainFrameActions: Cooking (Windows): WindowsHostPlatform.SetFrameworkVars: Supports64bitExecutables=True
MainFrameActions: Cooking (Windows): WindowsHostPlatform.SetFrameworkVars: WindowsPlatform.CompilerVisualStudio2015
MainFrameActions: Cooking (Windows): WindowsHostPlatform.SetFrameworkVars: WindowsSDKDir=C:\Program Files (x86)\Windows Kits\8.1
MainFrameActions: Cooking (Windows): WindowsHostPlatform.SetFrameworkVars: BaseVSToolPath=Y:\Visual Studio\Common7\Tools
MainFrameActions: Cooking (Windows): WindowsHostPlatform.SetFrameworkVars: Setting VS environment variables via Y:\Visual Studio\Common7\Tools....\VC\bin\x86_amd64\vcvarsx86_amd64.bat.
MainFrameActions: Cooking (Windows): CommandUtils.SetEnvVar: SetEnvVar FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
MainFrameActions: Cooking (Windows): CommandUtils.SetEnvVar: SetEnvVar FrameworkVersion=v4.0.30319
MainFrameActions: Cooking (Windows): WindowsHostPlatform.SetFrameworkVars: FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
MainFrameActions: Cooking (Windows): WindowsHostPlatform.SetFrameworkVars: FrameworkVersion=v4.0.30319
MainFrameActions: Cooking (Windows): ProjectUtils.CleanupFolders: Cleaning up project rules folder
MainFrameActions: Cooking (Windows): CommandUtils.DeleteDirectoryContents: DeleteDirectoryContents(C:\Users\AppData\Local\Temp\UAT\Y+Unreal+Engine+Epic+Games+4.10\Rules)
MainFrameActions: Cooking (Windows): Automation.Process: Compiling scripts.
MainFrameActions: Cooking (Windows): ScriptCompiler.LoadPreCompiledScriptAssemblies: Loading precompiled script DLLs
MainFrameActions: Cooking (Windows): ScriptCompiler.LoadPreCompiledScriptAssemblies: Found 9 script DLL(s).
MainFrameActions: Cooking (Windows): BuildCookRun.SetupParams: Setting up ProjectParams for X:\Unreal Projects\A_Citadel13\A_Citadel13.uproject
MainFrameActions: Cooking (Windows): ProjectUtils.CompileAndLoadTargetsAssembly: Compiling targets DLL: C:\Users\AppData\Local\Temp\UAT\Y+Unreal+Engine+Epic+Games+4.10\Rules\UATRules-95410045.dll
MainFrameActions: Cooking (Windows): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Cooking (Windows): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Cooking (Windows): Program.Main: ERROR: Exception in mscorlib: An item with the same key has already been added.
MainFrameActions: Cooking (Windows): Stacktrace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
MainFrameActions: Cooking (Windows): at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) MainFrameActions: Cooking (Windows): at AutomationTool.ProjectUtils.CompileAndLoadTargetsAssembly(ProjectProperties Properties, String TargetsDllFilename, Boolean DoNotCompile, List1 TargetScripts)
MainFrameActions: Cooking (Windows): at AutomationTool.ProjectUtils.DetectTargetsForProject(ProjectProperties Properties, List1 ExtraSearchPaths) MainFrameActions: Cooking (Windows): at AutomationTool.ProjectUtils.DetectProjectProperties(String RawProjectPath, List1 ClientTargetPlatforms)
MainFrameActions: Cooking (Windows): at AutomationTool.ProjectUtils.GetProjectProperties(String RawProjectPath, List1 ClientTargetPlatforms) MainFrameActions: Cooking (Windows): at AutomationTool.ProjectParams.AutodetectSettings(Boolean bReset) MainFrameActions: Cooking (Windows): at AutomationTool.ProjectParams..ctor(String RawProjectPath, CommandUtils Command, String Device, String MapToRun, String AdditionalServerMapParams, ParamList1 Port, String RunCommandline, String StageCommandline, String BundleName, String StageDirectoryParam, Nullable1 StageNonMonolithic, String UE4Exe, String SignPak, List1 ClientConfigsToBuild, List1 ServerConfigsToBuild, ParamList1 MapsToCook, ParamList1 DirectoriesToCook, String InternationalizationPreset, ParamList1 CulturesToCook, ParamList1 ClientCookedTargets, ParamList1 EditorTargets, ParamList1 ServerCookedTargets, List1 ClientTargetPlatforms, Dictionary2 ClientDependentPlatformMap, List1 ServerTargetPlatforms, Dictionary2 ServerDependentPlatformMap, Nullable1 Build, Nullable1 Cook, String CookFlavor, Nullable1 Run, Nullable1 SkipServer, Nullable1 Clean, Nullable1 Compressed, Nullable1 UseDebugParamForEditorExe, Nullable1 IterativeCooking, Nullable1 CookAll, Nullable1 CookMapsOnly, Nullable1 CookOnTheFly, Nullable1 CookOnTheFlyStreaming, Nullable1 UnversionedCookedContent, Nullable1 SkipCookingEditorContent, Nullable1 NumCookersToSpawn, String AdditionalCookerOptions, String BasedOnReleaseVersion, String CreateReleaseVersion, Nullable1 GeneratePatch, String DLCName, Nullable1 DLCIncludeEngineContent, Nullable1 NewCook, Nullable1 OldCook, Nullable1 CrashReporter, Nullable1 DedicatedServer, Nullable1 Client, Nullable1 Deploy, Nullable1 FileServer, Nullable1 Foreign, Nullable1 ForeignCode, Nullable1 LogWindow, Nullable1 NoCleanStage, Nullable1 NoClient, Nullable1 NoDebugInfo, Nullable1 NoXGE, Nullable1 Package, Nullable1 Pak, Nullable1 Prereqs, Nullable1 NoBootstrapExe, Nullable1 SignedPak, Nullable1 NullRHI, Nullable1 FakeClient, Nullable1 EditorTest, Nullable1 RunAutomationTests, String RunAutomationTest, Nullable1 CrashIndex, Nullable1 Rocket, Nullable1 SkipCook, Nullable1 SkipCookOnTheFly, Nullable1 SkipPak, Nullable1 SkipStage, Nullable1 Stage, Nullable1 Manifests, Nullable1 CreateChunkInstall, Nullable1 Unattended, Nullable1 NumClients, Nullable1 Archive, String ArchiveDirectoryParam, Nullable1 ArchiveMetaData, Nullable1 CreateAppBundle, ParamList1 ProgramTargets, Nullable1 Distribution, Nullable1 Prebuilt, Nullable1 RunTimeoutSeconds, String SpecifiedArchitecture, Nullable1 IterativeDeploy, Nullable1 FastCook, Nullable1 IgnoreCookErrors, Nullable1 CodeSign, String Provision, String Certificate) MainFrameActions: Cooking (Windows): at BuildCookRun.SetupParams() MainFrameActions: Cooking (Windows): at BuildCookRun.ExecuteBuild() MainFrameActions: Cooking (Windows): at BuildCommand.Execute() MainFrameActions: Cooking (Windows): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) MainFrameActions: Cooking (Windows): at AutomationTool.Automation.Process(String[] CommandLine) MainFrameActions: Cooking (Windows): at AutomationTool.Program.MainProc(Object Param) MainFrameActions: Cooking (Windows): at AutomationTool.InternalUtils.RunSingleInstance(Action1 Main, Object Param)
MainFrameActions: Cooking (Windows): at AutomationTool.Program.Main()
MainFrameActions: Cooking (Windows): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Cooking (Windows): Program.Main: AutomationTool exiting with ExitCode=Error_Unknown
MainFrameActions: Cooking (Windows): Domain_ProcessExit
MainFrameActions: Cooking (Windows): copying UAT log files…
MainFrameActions: Cooking (Windows): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
MainFrameActions: Cooking (Windows): BUILD FAILED

Any help would be apreciated.

This is the entire log.

I did a clear log … then a cook.

Hello ,

Could you upload the entire log in the form of a text file? The cause of the failure doesn’t seem to be present here.

I see, I had assumed by the way you had worded it. There does seem to be one error that stands out but can mean a multitude of things.

“Exception in mscorlib: An item with the same key has already been added.”

There has been a report of the Substance plugin causing this issue. There was also another answerhub post in the past of someone having similar issues. Can you take a look at this post and see if any of it may be helpful?

I sure will. Thank you.

I did recently install the 4.10 version of the substance plugin. (in fact this occured between now and the last time I was able to cook/package my project).

I don’t understand why the heck my project requires the substance plugin at all. But thats another issue.

Have you had any success trying those methods ? As far as the substance plug-in goes, my experience with it is that it’ll give you the message saying that the Substance plugin is required if the project was ever launched once with it enabled. Hitting “No” will still start the project and never seems to cause any issues but if you download it, you should be able to manually disable it in the Plugin settings to avoid this in the future.

I did try them and it didn’t change anything. So far the only thing I have been able to do was to completely rebuild the project and manually copy blueprints from one project to the other.

The new project builds just fine with all of the old blueprints copied over.

As far as the plugin … clicking no does let you proceed with loading the project, but it also pops up a notice to the testers asking them to install the pluygin. They have to be instructed to click no. Which is easy enough … but it shouldn’t have to be that way. There should be a way to remove the plugin requirement for a plugin that isnt actually used in this project.

Thanks for your help. I’m still diging through all of the content in the original project trying to figure out what it won’t cook or package.

Referring to the Substance problem, when you open the project in 4.10, it should give you a message to disable the Substance plugin if you wish, this may not occur if the project was converted from an earlier version though as I know this wasn’t the previous behavior. If that doesn’t work, you can right-click the .uproject file and open it in Notepad or Notepad++ and change the “true” in the following lines to “false”.

“Name”: “Substance”,
“Enabled”: true

Sweet. That’s great info . Thanks I’ll try that.

We haven’t heard from you in a while, . Has removing Substance from the project helped at all with this issue? If not, please let me know if there have been any changes. In the meantime, I’ll be marking this issue as resolved for tracking purposes.