x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can't package game (an item with the same key has already been added)

I recently switched from 4.8.3 binary to a custom build of the engine (https://github.com/Oculus-VR/UnrealEngine/tree/4.8).

This is what I did:

  • Built the engine (configuration 'Development Editor')

  • Converted my project (runs fine in editor)

  • Right-clicked on the *.uproject file, switched unreal engine version to the new build

  • Generated Visual Studio project files

  • Tried to package (shipping/build for distribution) which worked in the binary release

  • After about 10 seconds, the packaging process aborts:

(...) MainFrameActions: Packaging (Windows (64-bit)): BuildCommand.Execute: ERROR: BUILD FAILED MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: Exception in mscorlib: An item with the same key has already been added (translated from German) MainFrameActions: Packaging (Windows (64-bit)): Stacktrace: bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.ProjectUtils.Compil MainFrameActions: Packaging (Windows (64-bit)): eAndLoadTargetsAssembly(ProjectProperties Properties, String TargetsDllFilename, Boolean DoNotCompile, List`1 TargetScripts) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\ProjectUtils.cs:Zeile 521. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.ProjectUtils.DetectTargetsForProject(ProjectProperties Properties, List`1 ExtraSearchPaths) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\ProjectUtils.cs:Zeile 473. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.ProjectUtils.DetectProjectProperties(String RawProjectPath, List`1 ClientTargetPlatforms) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\ProjectUtils.cs:Zeile 287. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.ProjectUtils.GetProjectProperties(String RawProjectPath, List`1 ClientTargetPlatforms) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\ProjectUtils.cs:Zeile 127. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.ProjectParams.AutodetectSettings(Boolean bReset) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\ProjectParams.cs:Zeile 1372. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.ProjectParams..ctor(String RawProjectPath, CommandUtils Command, String Device, String MapToRun, String AdditionalServerMapParams, ParamList`1 Port, String RunCommandline, String StageCommandline, String BundleName, String StageDirectoryParam, Nullable`1 StageNonMonolithic, String UE4Exe, String SignPak, List`1 ClientConfigsToBuild, 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, Dictionary`2 ServerDependentPlatformMap, Nullable`1 Build, Nullable`1 Cook, String CookFlavor, Nullable`1 Run, Nullable`1 SkipServer, Nullable`1 Clean, Nullable`1 Compressed, Nullable`1 UseDebugParamForEditorExe, Nullable`1 IterativeCooking, Nullable`1 CookAll, Nullable`1 CookMapsOnly, Nullable`1 CookOnTheFly, Nullable`1 CookOnTheFlyStreaming, Nullable`1 UnversionedCookedContent, String AdditionalCookerOptions, String BasedOnReleaseVersion, String CreateReleaseVersion, Nullable`1 GeneratePatch, String DLCName, Nullable`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 Package, Nullable`1 Pak, Nullable`1 Prereqs, 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 Rocket, 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, ParamList`1 ProgramTargets, Nullable`1 Distribution, Nullable`1 Prebuilt, Nullable`1 RunTimeoutSeconds, String SpecifiedArchitecture, Nullable`1 IterativeDeploy) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\ProjectParams.cs:Zeile 680. MainFrameActions: Packaging (Windows (64-bit)): bei BuildCookRun.SetupParams() in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:Zeile 54. MainFrameActions: Packaging (Windows (64-bit)): bei BuildCookRun.ExecuteBuild() in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:Zeile 43. MainFrameActions: Packaging (Windows (64-bit)): bei BuildCommand.Execute() in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\BuildCommand.cs:Zeile 37. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\Automation.cs:Zeile 380. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.Automation.Process(String[] CommandLine) in d:\Documents\Unreal Projects\VRShowRoom\UE4_ MainFrameActions: Packaging (Windows (64-bit)): Oculus\Engine\Source\Programs\AutomationTool\Automation.cs:Zeile 352. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.Program.MainProc(Object Param) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\Program.cs:Zeile 172. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param) in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\Utils.cs:Zeile 716. MainFrameActions: Packaging (Windows (64-bit)): bei AutomationTool.Program.Main() in d:\Documents\Unreal Projects\VRShowRoom\UE4_Oculus\Engine\Source\Programs\AutomationTool\Program.cs:Zeile 119. MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: An item with the same key has already been added (translated from German) MainFrameActions: Packaging (Windows (64-bit)): ProcessManager.KillAll: Trying to kill 0 spawned processes. MainFrameActions: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=1 MainFrameActions: Packaging (Windows (64-bit)): Domain_ProcessExit MainFrameActions: Packaging (Windows (64-bit)): ProcessManager.KillAll: Trying to kill 0 spawned processes. MainFrameActions: Packaging (Windows (64-bit)): AutomationToolLauncher exiting with ExitCode=1 MainFrameActions: Packaging (Windows (64-bit)): copying UAT log files... MainFrameActions: Packaging (Windows (64-bit)): RunUAT.bat ERROR: AutomationTool was unable to run successfully. MainFrameActions: Packaging (Windows (64-bit)): BUILD FAILED

And that's it.

Out of pure desperation I tried to additionally build my game and the engine itself from VS again in 'Shipping' configuration, but that doesn't change anything.Got still the same error.

It's also not possible to cook the project (same error). How can I solve this? What is the 'correct' way to switch the engine build, which configuration should I choose (didn't find anything about that in the documentation) for being able to package the project again?

spyro

Product Version: UE 4.8
Tags:
more ▼

asked Aug 18 '15 at 11:12 AM in Packaging & Deployment

avatar image

spyro
1.7k 106 117 232

avatar image spyro Aug 20 '15 at 08:43 AM

Seriously, any advice? I have to get this done...

I now have stripped any source code out of the game (Blueprint-only), completely unloaded my game module - still no success.

Messing around with this since two days now, WHAT IS THE PROBLEM HERE?! :(

avatar image Samantha Sutton ♦♦ STAFF Aug 25 '15 at 09:24 PM

Hey Spyro,

Please try the following and let us know whether or not it works for you:

  • Go ahead and place your engine source code and project folders in separate folders

  • Build the engine, then go into Engine/Binaries/Win64 and run UnrealVersionSelector-Win64-Shipping.exe

  • Once you've done that, go to your project folder, right-click on .uproject and click 'Switch Unreal Engine version' and then select the Source build

  • Generate VS project files and proceed with packaging

Please let me know how this works for you, keep in mind that you may need to start from scratch depending on how your source build is 'behaving'.

Thanks!

avatar image spyro Aug 26 '15 at 11:47 AM

Hi Samantha,

thanks for your answer. Your hint was definitly a step into the right direction. Seems that UE4 doesn't like it if its placed in a project folder.

Here's what I did:

  • Moved engine source from [project folder]/UE4_Oculus one level up into the same folder as [project folder]

  • Recreated UE4 project files

  • Opened solution in VS 2013 Professional

  • Built the engine with Unreal VS Quick Build --> Win64 --> Development Editor

  • Started UnrealVersionSelector-Win64-Shipping.exe

  • Configured uproject file to new engine build

  • Started UE4Editor.exe

  • Opened project

  • Started packaging in Win64-shipping configuration ('development' is grayed out for some reason)

  • (This started a new build process internally)

  • Process seemed to complete successfully (AutomationToolLauncher exiting with ExitCode=0)

These are the created files:

alt text

But I still can't start the packaged game. There seems to be a reference to the uproject file outside the package:

alt text

So I rebuilt the engine once more in VS, this time in configuration 'Win64/Shipping' and started a new packaged process.

The Win64-EXE seems in place:

alt text

But unfortunately I still get the same error when trying to start it.

[3]: http://i.imgur.com/uXAzE30.png

[5]: http://i.imgur.com/GUUL5Qk.png

avatar image Samantha Sutton ♦♦ STAFF Aug 26 '15 at 03:08 PM

Moved engine source from [project folder]/UE4_Oculus one level up into the same folder as [project folder]

Since the engine source code was still within the project folder, I believe that may be the issue that you have. You should separate the engine source code and your project folder, completely. Have you tried that yet?

avatar image spyro Aug 26 '15 at 06:32 PM

Hi Samantha,

yes, this is exactly what I did. "Project" and "Engine" folders are separated (they are only in the same parent directory).

avatar image Superman13711 Dec 04 '15 at 12:34 PM

This is what I got. this is really pissing me off. Any suggestions?????????????

alt text

1212121212.png (94.6 kB)
avatar image Samantha Sutton ♦♦ STAFF Dec 04 '15 at 06:16 PM

Is your editor built from GitHub? It looks like Win64 Development wasn't built in Visual Studio.

Let me know, thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I believe there was an issue with Shipping builds and the stub .exe that's in the root of your packaged build.

If you run the one in Win64 from the command line with the path to the descriptor, it should work:

Run cmd.exe cd \VRShowRoom\Binaries\Win64 VRShowRoom-Win64-Shipping.exe ../../../VRShowRoom/VRShowRoom.uproject

You can put that into a .bat file in the root next to the .exe that's there. Or, package Development, not Shipping. This is fixed in 4.9 I am pretty sure.

Josh

more ▼

answered Aug 26 '15 at 07:34 PM

avatar image

joshbadams STAFF
1.3k 19 7 46

avatar image spyro Aug 26 '15 at 09:16 PM

Hi Josh,

thanks for your answer.

Hmm, the strange thing is that this didn't happen oin the binary version of the engine, only on the GitHub version.

So if I got you right I have to

  • Delete the original EXE

  • Bundle the uproject file with the packaged game

  • Call the binary of my project with the path to the uproject file as parameter

Ok, will try that (can't test it until Friday)

BTW: I can't create a development package, it's grayed out for some reason.

avatar image spyro Aug 28 '15 at 10:21 AM

Update: Doesn't work.

  • Placed uproject file in same folder als VRShowRoom-Win64-Shipping.exe

  • Called "VRShowRoom-Win64-Shipping.exe VRShowRoom.uproject"

  • (Nothing happens. No error message but also no game window)

alt text

alt text

EDIT: If I just manually remove the '-Win64-Shipping.exe' from /[project name]/Binaries/Win64/[projekt name]-Win64-Shipping.exe' it works (but I can't run the EXE in the root folder anymore)...!

EDIT 2: Another observation: If I include the removed, and completely unnecessary code module in the uproject file again (and restore the 'source' folder), it also works. Seems to be some linker error.

avatar image joshbadams STAFF Aug 31 '15 at 05:24 PM

Don't move the .exe. Run the exe with ../../../VRShowRoom/VRShowRoom.uproject as I originally stated. Did you try that?

avatar image spyro Aug 31 '15 at 09:39 PM

I didn't ever move one of the EXE files? And I tried to run this command, but it failes because there is no uproject file packaged.

Will try again after I updated to 4.9. Thank you anyway.

avatar image Samantha Sutton ♦♦ STAFF Sep 01 '15 at 01:27 PM

Let us know your results within 4.9, thank you!

avatar image spyro Sep 02 '15 at 09:22 AM

Hi Samantha,

Packaging worked indeed with 4.9 final (but I can't use that version because of other problems currently).

I also tried again to run the custom version of 4.8.3 with ../../../VRShowRoom/VRShowRoom.uproject as you stated and I can confirm it works this way. Originally I was thinking that you refer to the EXE in the binary subfolder and that I have to really add the uproject file to the package.

avatar image Samantha Sutton ♦♦ STAFF Sep 02 '15 at 01:14 PM

Awesome Spyro! I'm glad that this resolved your issue. Please let us know if you have any further questions!

Have a great day!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question