Windows Packaging Failed (No Engine Plugins Installed)

hi everyone,
i’ve encountered an weird issue: yesterday i could package my project perfectly fine without errors for windows 64bit, but since today it always fails i’ve changed nothing in the project nor i’ve installed any engine plugins

here’s the log (i’m using german windows so a little translation: bei = at; Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt =(roughly translated) an item with the same key has already been added):

UATHelper: Packaging (Windows (64-bit)): Running AutomationTool...
UATHelper: Packaging (Windows (64-bit)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject="D:/Dokumente/Unreal Projects/coderunner/c0derunner.uproject" BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project="D:/Dokumente/Unreal Projects/coderunner/c0derunner.uproject" -cook -stage -archive -archivedirectory=C:/Users/Jeremy/De
sktop/runner -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
UATHelper: Packaging (Windows (64-bit)): Automation.Process: Setting up command environment.
UATHelper: Packaging (Windows (64-bit)): BuildCookRun.SetupParams: Setting up ProjectParams for D:\Dokumente\Unreal Projects\coderunner\c0derunner.uproject
UATHelper: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: System.ArgumentException: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
UATHelper: Packaging (Windows (64-bit)):    bei System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
UATHelper: Packaging (Windows (64-bit)):    bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
UATHelper: Packaging (Windows (64-bit)):    bei System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.ProjectUtils.CompileAndLoadTargetsAssembly(ProjectProperties Properties, FileReference TargetsDllFilename, Boolean DoNotCompile, List`1 TargetScripts)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.ProjectUtils.DetectTargetsForProject(ProjectProperties Properties, List`1 ExtraSearchPaths)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.ProjectUtils.DetectProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, Boolean AssetNativizationRequested)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.ProjectUtils.GetProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, Boolean AssetNativizationRequested)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.ProjectParams.AutodetectSettings(Boolean bReset)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.ProjectParams..ctor(FileReference RawProjectPath, CommandUtils Command, String Device, String MapToRun, String AdditionalServerMapParams, ParamList`1 Port, String RunCommandline, String StageCommandline, String BundleName, String StageDirectoryParam, String UE4Exe, String SignPak, List`1 ClientCo
nfigsToBuild, List`1 ServerConfigsToBuild, ParamList`1 MapsToCook, ParamList`1 DirectoriesToCook, String InternationalizationPreset, ParamList`1 CulturesToCook, ParamList`1 ClientCookedTargets, ParamList`1 EditorTargets, ParamList`1 ServerCookedTargets, List`1 ClientTargetPlatforms, Dictionary`2 ClientDependentPlatformMap, List`1 ServerTargetPlatforms, Dicti
onary`2 ServerDependentPlatformMap, Nullable`1 Build, Nullable`1 Cook, Nullable`1 Run, Nullable`1 SkipServer, Nullable`1 Clean, Nullable`1 Compressed, Nullable`1 UseDebugParamForEditorExe, Nullable`1 IterativeCooking, Nullable`1 CookAll, Nullable`1 CookPartialGC, Nullable`1 CookMapsOnly, Nullable`1 CookOnTheFly, Nullable`1 CookOnTheFlyStreaming, Nullable`1 U
nversionedCookedContent, Nullable`1 EncryptIniFiles, Nullable`1 SkipCookingEditorContent, Nullable`1 NumCookersToSpawn, String AdditionalCookerOptions, String BasedOnReleaseVersion, String CreateReleaseVersion, String CreateReleaseVersionBasePath, String BasedOnReleaseVersionBasePath, Nullable`1 GeneratePatch, String DLCName, String DiffCookedContentPath, Nu
llable`1 DLCIncludeEngineContent, Nullable`1 NewCook, Nullable`1 OldCook, Nullable`1 CrashReporter, Nullable`1 DedicatedServer, Nullable`1 Client, Nullable`1 Deploy, Nullable`1 FileServer, Nullable`1 Foreign, Nullable`1 ForeignCode, Nullable`1 LogWindow, Nullable`1 NoCleanStage, Nullable`1 NoClient, Nullable`1 NoDebugInfo, Nullable`1 NoXGE, Nullable`1 Packag
e, Nullable`1 Pak, Nullable`1 Prereqs, String AppLocalDirectory, Nullable`1 NoBootstrapExe, Nullable`1 SignedPak, Nullable`1 NullRHI, Nullable`1 FakeClient, Nullable`1 EditorTest, Nullable`1 RunAutomationTests, String RunAutomationTest, Nullable`1 CrashIndex, Nullable`1 SkipCook, Nullable`1 SkipCookOnTheFly, Nullable`1 SkipPak, Nullable`1 SkipStage, Nullable
`1 Stage, Nullable`1 Manifests, Nullable`1 CreateChunkInstall, Nullable`1 Unattended, Nullable`1 NumClients, Nullable`1 Archive, String ArchiveDirectoryParam, Nullable`1 ArchiveMetaData, Nullable`1 CreateAppBundle, ParamList`1 ProgramTargets, Nullable`1 Distribution, Nullable`1 Prebuilt, Nullable`1 RunTimeoutSeconds, String SpecifiedArchitecture, Nullable`1 
IterativeDeploy, Nullable`1 FastCook, Nullable`1 IgnoreCookErrors, Nullable`1 RunAssetNativization, Nullable`1 CodeSign, Nullable`1 TreatNonShippingBinariesAsDebugFiles, String Provision, String Certificate, ParamList`1 InMapsToRebuildLightMaps, ParamList`1 TitleID)
UATHelper: Packaging (Windows (64-bit)):    bei BuildCookRun.SetupParams()
UATHelper: Packaging (Windows (64-bit)):    bei BuildCookRun.ExecuteBuild()
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.Automation.Process(String[] Arguments)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Windows (64-bit)):    bei AutomationTool.Program.Main()
UATHelper: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

has anyone ever encountered this and has a solution?

Hi Jeremy301,

This appears to be a partial Output Log. Typically when the automation tool fails, earlier in the body of the log there will be a Warning/Error Summary. The first few lines under that show what is causing the Automation tool to fail.

You can locate this yourself easily by copying the entire contents of your Output log to a text doc and using Ctrl + F to search for the words “Error” or “Summary.” If you still need help, again, please post the entire contents of the output log by:

  • Opening your Output Log
  • Right-Click and select “Clear”
  • Attempt to package your project
  • Once it fails, Ctrl + A or Right-Click and “Select All”
  • Copy and paste into a text file
  • Upload/post here

At that point we will take a closer look.


Steve H.

umm i did that and it only gives me that what i already posted as the output log

Typically when the automation tool fails, there is an Error Summary that points to the cause but if there is not one in the case, that leaves us with the error that you’ve mentioned: An item with the same key has already been added.

A quick search of the AnswerHub yields numerous reports of this as well as their resolution:

Program.Main: ERROR: An item with the same key has already been added.

Packaging error : exception in mscorlib *Note: another user with the same error reported that the resolution reported in this post fixed their issue

Unable to Package C++ Project for Win32/Win64

Package Error 4.12.5

Please take a look at the posts I’ve provided above. Since this is somewhat an ambiguous error message, you may have to continue to search for a post that more closely resembles your situation. Also, make sure The Substance plugin did not inadvertently get activated.

Steve H.

i kinda solved the issue: i’ve built unreal engine 1.14.1 from github source then converted my project to the git version of the engine and now it seems to build fine

Just to add some additional information, if someone else might encounter this problem: The same UAT error is risen, if more than 1 pair of […]Target.cs files are present in a C++ projects source folder. UAT will not yield any additional information if this occurs, so if you run into this issue, also check your source folder for duplicates (e.g. from merging projects by hand) :wink: