Error in Windows Project Launch and Project Packaging

I want to package a project in a way that can be used in other computers, i found there are two methods for it, Project Launch and Project Packaging. Still i couldn’t able to find the real difference between them. please tell me what is the major difference and what could be the best solution to have an .exe file that can be run in other computers without installing unreal.
I am basically doinga a VR Project, I am doing the deployment part of it. I have read lot of tutorials and discussion forums, i was able to to package or launch the sample (default vr) project (with or without substance plugin enabled). But when i do it for the real project which is a blueprint only project (with substance plugin enabled) i get the following errors under following scenarios.

1. Project Launch -
Variant - WindowsNoEditor |config - Development | Data Build -On the Fly

Project.Cook: Waiting a few seconds for the server to start…
Project.Cook: ********** COOK COMMAND COMPLETED **********
Project.CopyBuildToStagingDirectory: ********** STAGE COMMAND STARTED **********
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Stage Failed. Missing receipt 'Name_VirtualTour.target’. Check that this target has been built.
at Project.CreateDeploymentContext(ProjectParams Params, Boolean InDedicatedServer, Boolean DoCleanStage) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:line 1799
at Project.CopyBuildToStagingDirectory(ProjectParams Params) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:line 1867
at BuildCookRun.DoBuildCookRun(ProjectParams Params) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 239
at BuildCookRun.ExecuteBuild() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 43
at AutomationTool.BuildCommand.Execute() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 100
at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 561
at AutomationTool.Automation.Process(String[] Arguments) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 531
at AutomationTool.Program.MainProc(Object Param) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Program.cs:line 135
at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 704
at AutomationTool.Program.Main() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Program.cs:line 59
Program.Main: AutomationTool exiting with ExitCode=103 (Error_MissingExecutable)
BUILD FAILED

2. Project Launch -
Variant -WindowsNoEditor | config - Shipping| data build- Do not Cook

Project.CopyBuildToStagingDirectory: ********** STAGE COMMAND STARTED **********
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Stage Failed. Missing receipt ‘Name_VirtualTour-Win64-Shipping.target’. Check that this target has been built.
at Project.CreateDeploymentContext(ProjectParams Params, Boolean InDedicatedServer, Boolean DoCleanStage) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:line 1799
at Project.CopyBuildToStagingDirectory(ProjectParams Params) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:line 1867
at BuildCookRun.DoBuildCookRun(ProjectParams Params) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 239
at BuildCookRun.ExecuteBuild() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 43
at AutomationTool.BuildCommand.Execute() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 100
at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 561
at AutomationTool.Automation.Process(String[] Arguments) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 531
at AutomationTool.Program.MainProc(Object Param) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Program.cs:line 135
at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 704
at AutomationTool.Program.Main() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Program.cs:line 59
Program.Main: AutomationTool exiting with ExitCode=103 (Error_MissingExecutable)
BUILD FAILED

3. Project Launch -
Varaint - WindowsNoEditor | config - Shipping| Data build - By the Book

Project.Cook: Cook failed. Deleting cooked data.
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Cook failed. —> AutomationTool.AutomationException: BUILD FAILED: Failed while running Cook for G:\Virtual_Reality_Name\Name_VirtualTour\Name_VirtualTour.uproject; see log C:\Users\kodex-PC01\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.15\Cook-2018.03.04-12.45.22.txt
at AutomationTool.CommandUtils.RunCommandlet(FileReference ProjectName, String UE4Exe, String Commandlet, String Parameters) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 380
at AutomationTool.CommandUtils.CookCommandlet(FileReference ProjectName, String UE4Exe, String[] Maps, String[] Dirs, String InternationalizationPreset, String[] CulturesToCook, String TargetPlatform, String Parameters) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 80
at Project.Cook(ProjectParams Params) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\CookCommand.Automation.cs:line 266
— End of inner exception stack trace —
at Project.Cook(ProjectParams Params) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\CookCommand.Automation.cs:line 281
at BuildCookRun.DoBuildCookRun(ProjectParams Params) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 211
at BuildCookRun.ExecuteBuild() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 43
at AutomationTool.BuildCommand.Execute() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 100
at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 561
at AutomationTool.Automation.Process(String[] Arguments) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 531
at AutomationTool.Program.MainProc(Object Param) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Program.cs:line 135
at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 704
at AutomationTool.Program.Main() in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\Program.cs:line 59
Program.Main: AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
BUILD FAILED

4. Project Packaging - Shipping
Got the same error as in above 3rd Method

I have performed following tasks to rectify the issue under different scenarios.
To mention when i run map check i get few warnings, and when in the process of cooking i get errors as Long file name (that is resolvable by me). I have performed a complete build successfully.

  1. Create a new project and migrated the existing project’s content to it, but still the error is there

  2. Deleted Saved, Intermediate and Config folder and restarted the computer and tried , no use i still get the same error.

  3. Installed VS c++ 2015 components and Windows 8.1 SDK and i was able to get rid of some errors specific to it

  4. Disabled the Substance Plugin and then i was able to create the .exe in staging folder in my old project.

Please help on this, i suspect i get this error due to some issues in engine files. I hope i will get an solution asap.

Thanks.

Can you provide a full log of the third method?

The first two method are failing because of this error: Missing receipt ‘Name_VirtualTour.target’. Check that this target has been built.

In this case the problem is related to the build of the engine itsfel. It basically means that the engine is not built for the platform you’re trying to package. Doing a normal package should fix the problem.

First of all resolve the issue with the long file names. Building and launching will always fail during cooking if there are files with long names. Then try to make a normal package.

The differences between launching and packaging are that with launching you can have some controls about cooking, staging, building etc. You can for example decide to “NotCook” your content, or to not build UAT. That is good when you are working on something and you have to try it in a build.

Normal package process is better for distribution.

link text

Thanks for your response
Check the attachment for last few lines of 3rd method, i got LogCook:Error: Couldn’t save package, filename is too long errors also in this log.

I have built my project successfully , is that means building target ? or if it difference from it please let me know how to perform it. If am doing launching, how to build the engine ? my project is a completely a blueprint one.

I will resolve the issues with long file names and i will try it again.

Thanks for your explanation, what happens in UAT ?

little time ago i packaged by disabling substance plugin , i get the same error
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Cook failed. —> AutomationTool.AutomationException: BUILD FAILED: Failed while running Cook for G:\Virtual_Reality_Name\Name_VirtualTour\Name_VirtualTour.uproject; see log C:\Users\kodex-PC01\AppData\Roaming\Unreal Engine\Autom
ationTool\Logs\C+Program+Files+Epic+Games+UE_4.15\Cook-2018.03.04-19.21.29.txt

In the attachment you provided there is this line:

UE4Editor-Cmd: [2018.03.04-07.15.17:415][ 0]LogInit:Display: Failure - 2577 error(s), 3698 warning(s)

2577 errors. So read your log and search for this errors. I’m pretty sure they are related with the file names too long. I don’t think that Substance is causing troubles. There is nothing in the logs about it so should be ok. The engine is built automatically when you make a package for the first time or when you perform a full rebuild.

If you are using the project launcher, you can make a custom launch profile in which you can set “Build” to true. Anyway I suggest you to try with a normale package until these problems go away.

Fix the file name problem and let me know if something changes.

Okay Thank you very much , I will look into that errors , i have to because in the last successful launch there were many textures missing. (to mention i could launch successfully without substance plugin
successfully few days before, after a full build i couldn’t)

When i package i didnt enable full rebuild since it takes some more time to finish. So you mean that doing project specific build will build the engine right?.

I will fix all the issues and let you know, thank you very much

When you build for a specific platform. the engine will be built for that platform. Some modules for example aren’t built for mobile games while are for windows and so on.

You don’t have to enable full rebuild every time. Anyway let me know! You’re welcome!

Thanks,
I want to know what is the maximum number of character that the asset can have when it get cooks, some people say it is 256 , some say 226 what is the correct one ?
and changing the name or changing the folder structure in my project is a tedious task and seems not advisable in our project , is there any other way to do it quickly and without much work.
I have seen some say use Long Path tool for it, but still couldn’t able find how the tool can help since all the cooked files go to project/saved/cooked folder. Do you have any idea on doing it in a simple way.?
Thanks.

Hi maraman26. At the moment I can’t remember what is the maximum number of characters. I’ll have a look in code as soon as I can and let you know. Anyway, UE4 calculates the file name including the path in which the file is located.

So if your project is in a “complex” folder structure like: C:/Programs/…/…/…/UE4/Projects/ThisProject
then UE4 will fail to cook those assets that will be in subdirectories of your project.

You can simply try to move your entire project to a shortest path like D:/Project.

I’ve never used Long Path tool or similar tools, because I was aware of this problem so I always tried to keep a simple structure. I cannot help you with that tools, I’m sorry.

Hi DjFrex, Thanks .
I will try to reduce the character length of the asset name. I already have almost a simple folder structure, anyway I will change that too. So you mean there are no other ways to do it nah.
Anyway thanks for much important answers.

Hi DjFrex, I have done the Packaging by reducing length of project name. at the end of the packing I got following error

InternalUtils.SafeCopyFile: WARNING: Failed to copy G:\VR\Saved\StagedBuilds\WindowsNoEditor\VR\Content\Paks\VR-WindowsNoEditor.pak to G:\VR_Packaging\WindowsNoEditor\VR\Content\Paks\VR-WindowsNoEditor.pak
UATHelper: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Failed to copy G:\VR\Saved\StagedBuilds\WindowsNoEditor\VR\Content\Paks\VR-WindowsNoEditor.pak to G:\VR_Packaging\WindowsNoEditor\VR\Content\Paks\VR-WindowsNoEditor.pak
UATHelper: Packaging (Windows (64-bit)): at AutomationTool.CommandUtils.CopyFileIncremental(String Source, String Dest, Boolean bAllowDifferingTimestamps, Boolean bFilterSpecialLinesFromIniFiles) in C:\Program Files\Epic Games\UE_4.15\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandUtils.cs:line 1394

VR-WindowsNoEditor.pak is around 33GB, my disk did not have adequate where the packaging file is created. I have a question why when packaging, the files are duplicated in Project\Saved\StagedBuilds\ folder even if we add a folder specifically packaging? same content is available in Packaging folder as well as in Project\Saved\StageBuilds folder.

Thank you