Packaging via UAT.bat - AutomationTool exception being thrown

Trying to package my game from within a C# application, which calls the RunUAT.bat file with the following arguments (the '' character has to precede \ characters and the " character within the string itself, so ignore those):

“BuildCookRun -project="C:\p4\bh-05-SSD\localdepot\UE4 Projects\Test\MyTest\MyTest_App.uproject" -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -maps=AllMaps -compile -stage -cook -pak -archive -archivedirectory="C:\Output"”

I have attached part of the output received. The most important part:

BuildCommand.Execute: ERROR: BUILD FAILED
Program.Main: ERROR: AutomationTool terminated with exception:
Program.Main: ERROR: Exception in AutomationTool: All branches must have the bla
nk project /Samples/Sandbox/BlankProject
Stacktrace:    at AutomationTool.BranchInfo..ctor(List`1 InHostPlatforms) in c:\
Users\UserPC\Desktop\UnrealEngine-4.6.0-release\Engine\Source\Programs\Automatio
nTool\ProjectUtils.cs:line 574
   at BuildCookRun.get_ProjectPath() in c:\Users\UserPC\Desktop\UnrealEngine-4.6
.0-release\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation
.cs:line 361
   at BuildCookRun.ExecuteBuild() in c:\Users\UserPC\Desktop\UnrealEngine-4.6.0-
release\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs
:line 28
   at BuildCommand.Execute() in c:\Users\UserPC\Desktop\UnrealEngine-4.6.0-relea
se\Engine\Source\Programs\AutomationTool\BuildCommand.cs:line 37
   at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictio
nary`1 Commands) in c:\Users\UserPC\Desktop\UnrealEngine-4.6.0-release\Engine\So
urce\Programs\AutomationTool\Automation.cs:line 371
   at AutomationTool.Automation.Process(String[] CommandLine) in c:\Users\UserPC
\Desktop\UnrealEngine-4.6.0-release\Engine\Source\Programs\AutomationTool\Automa
tion.cs:line 343
   at AutomationTool.Program.MainProc(Object Param) in c:\Users\UserPC\Desktop\U
nrealEngine-4.6.0-release\Engine\Source\Programs\AutomationTool\Program.cs:line
167
   at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param
) in c:\Users\UserPC\Desktop\UnrealEngine-4.6.0-release\Engine\Source\Programs\A
utomationTool\Utils.cs:line 649
   at AutomationTool.Program.Main() in c:\Users\UserPC\Desktop\UnrealEngine-4.6.
0-release\Engine\Source\Programs\AutomationTool\Program.cs:line 114
Program.Main: ERROR: All branches must have the blank project /Samples/Sandbox/B
lankProject
ProcessManager.KillAll: Trying to kill 0 spawned processes.
Program.Main: AutomationTool exiting with ExitCode=1
Domain_ProcessExit
ProcessManager.KillAll: Trying to kill 0 spawned processes.
AutomationToolLauncher exiting with ExitCode=1
copying UAT log files...
RunUAT.bat ERROR: AutomationTool was unable to run successfully.
BUILD FAILED

I’ve made sure that the engine used in question is compiled, and even tried the arguments with ‘-build’ as well, just in case, but to no avail.

Any ideas?

EDIT: I have attached a full output log when building with the following arguments (which I copied from the editor’s output when packaging in-editor… I figured that if anybody got the arguments correct, it was Epic :wink: I’m censoring the project name, so don’t worry if it doesn’t match up with anything in the logs).

BuildCookRun -nocompileeditor -nop4 -project=C:/p4/bh-05-SSD/localdepot/UE4 Projects/Test/MyTest/MyTest_App.uproject -cook -allmaps -CrashReporter -stage -archive -archivedirectory=C:/Users/UserPC/Desktop/Output -package -WindowsNoEditor -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -clean -pak -prereqs -targetplatform=Win64 -build -utf8output

Hi ,

Firstly, I see your package is titled 4.6, have you updated to the latest version of the Editor? It should be 4.7.2 at this point. Also, after you do that, if you’re still getting a failed build, can you attach the entirety of the output logs?

Thanks very much!

I have attached a full output log to the opening post, as well as the new arguments I tried. Updated to 4.7.2 is not an option for this project, and this method of packaging is intended to work for projects on version 4.4 through to the most recent.

Hey there,

This is still a problem for us; some internal tools have been built around the ability to package remotely, so you can imagine the issues that this is causing. Is there something else you need from us on this one?

It happens even with a blank 4.7.2 project with both binary and source engine builds, so I haven’t uploaded a sample project. Can someone at least confirm that this method of packaging is still possible?

Hi, i am using UAT like this and it works like a charm (though i will love to see more documentation on this!)

call “C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat” BuildCookRun -project=“C:\Programy\Murnatan-code\Murnatan.uproject” -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -cook -maps=AllMaps -compile -stage -pak -archive -Build -archivedirectory=“C:\Murnatan\Build\Client”

Hey Ypsylon, I tried out your set of commands, but I get the same errors as in the attached log, regardless of engine version etc. Can you try it with a fresh project and/or the engine built from source? (If you have it). What UE version are you using?

Hi i am using 4.7.2 build from source. Right now i build only on remote server, but later tonight i will try to package some fresh project and let you know

Okey i can confirm it fails with fresh project on prebuild engine on both pure bluprint and c++ project

Have you been able to test a fresh project on source-built engine? Did you get an error message similar to mine? Thanks for testing it!

This definitely isn’t ‘resolved’ - both this comment thread and my replies to Ypsylon indicate as much - we’re encountering the same errors on fresh engine builds, fresh projects, etc. What more can we do/provide to facilitate a solution?

Please update to 4.7.4 and attach a complete fresh output log of the failed build. Here is the instructions for where to find all relevant logs. The ones you attached above are from the 4.6 build of the engine, and we have had many crash and bug fixes since then.

Same problem here, I’m using 4.7.6.
link text

Have you been able to successfully run these commands recently (4.12)? Do you know of a good resource that describes what each one does and where all the options are?

Thanks!