Trouble Cooking Game (Program.Main: ERROR: AutomationTool terminated with exception:)

I am unable to get my project to cook / package.
The error am getting looks like.

MainFrameActions: Cooking (Windows):
Project.Cook: ********** COOK COMMAND
COMPLETED ********** MainFrameActions:
Cooking (Windows):
InternalUtils.SafeFileExists:
SafeFileExists
C:\MyGames\MyGameDevTrunk\MyGame.uproject=True
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
AutomationScripts.Automation: Missing
receipt
‘MyGame-Win64-Development.target.xml’.
Check that this target has been built.
MainFrameActions: Cooking (Windows):
Stacktrace: at
Project.CreateDeploymentContext(ProjectParams
Params, Boolean InDedicatedServer,
MainFrameActions: Cooking (Windows):
Boolean DoCleanStage)
MainFrameActions: Cooking (Windows):
at Project.Package(ProjectParams
Params, Int32 WorkingCL)
MainFrameActions: Cooking (Windows):
at
BuildCookRun.DoBuildCookRun(ProjectParams
Params) 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(MainProc
Main, Object Param) MainFrameActions:
Cooking (Windows): at
AutomationTool.Program.Main()
MainFrameActions: Cooking (Windows):
Program.Main: ERROR: Missing receipt
‘MyGame-Win64-Development.target.xml’.
Check that this target has been built.
MainFrameActions: Cooking (Windows):
ProcessManager.KillAll: Trying to kill
0 spawned processes. MainFrameActions:
Cooking (Windows): Program.Main:
AutomationTool exiting with ExitCode=1
MainFrameActions: Cooking (Windows):
Domain_ProcessExit MainFrameActions:
Cooking (Windows):
ProcessManager.KillAll: Trying to kill
0 spawned processes. MainFrameActions:
Cooking (Windows): copying UAT log
files… MainFrameActions: Cooking
(Windows): RunUAT.bat ERROR:
AutomationTool was unable to run
successfully. MainFrameActions:
Cooking (Windows): BUILD FAILED

Been searching around and seem others also have this issue for 4.8.
Have anyone found any solutions?

is the Output Log for the cooking.
link text

Thanks for any help.

Am stile stuck at this.

I have checked perrmissions and rights.
I have tryed cooking and packaging from full source build.

I stile can`t get this working, cooking seem to finish and the above snip of the log happens.

Can someone please help me with this?
Cheers!

Hi ,

I saw the forum thread you made about this. As pointed out, try removing the _ from the filepath name and see if that fixes the error. The specific error in your logs is a filepath name bug. If this fixes the error I believe this may be a bug.

I’m getting the same error, oddly enough. I’ve tried a bunch of different (easy) solutions, to no avail. I only see this error when attempting to use the “Cook Content for Windows” option in the file menu.

MainFrameActions: Cooking (Windows): Program.Main: ERROR: Missing receipt ‘MyGame-Win64-Development.target.xml’. Check that this target has been built.

In a strange turn of fashion, I can build and package the game for Windows 64-bit with no problems.

I am running 4.8.0, github, and my project contains no third party plugins or code.

So finaly i got it cooking :smiley:
Thanks for all responses and advice.

I will be posting a detailed bug report on this after i get some sleep.

Cheers!

So the solition(s) in my case where this.

Now my first problem as mentiond erlier the _ for the tiles/ .umap`s in my project with this in them cooking command failed. Re-naming all maps and folders for maps with underscore in them, removing it made the project cook. (Thank you forum user )

But i was stile getting the same error and the process stile failed. (But cooked content was now showing in my file explorer)
Now when user mentiond that he had the same error but was able to package i turnd my attention to that.

After i have renamed map files i get this error when attempring to pakage my game.
Keep in mind that if i press cook for Windows in editor it stile failes but content is in folder`s.

MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files\Epic Games\4.8\Engine\Source\Runtime\Engine\Classes\Engine/DataTable.h(35) : see declaration of 'UDataTable'

MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\MyGameDevTrunk\Source\MyGame\DataTabels\MyGameDataTabels.cpp(124) : error C2228: left of '.Num' must have class/struct/union

MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\MyGameDevTrunk\Source\MyGame\DataTabels\MyGameDataTabels.cpp(133) : error C2039: 'GetTableData' : is not a member of 'UDataTable'

MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files\Epic Games\4.8\Engine\Source\Runtime\Engine\Classes\Engine/DataTable.h(35) : see declaration of 'UDataTable'

MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\MyGameDevTrunk\Source\MyGame\DataTabels\MyGameDataTabels.cpp(133) : error C2228: left of '.Num' must have class/struct/union

And is where it gets strange the code it refers to compils (in Visual ) and works as intended.
But when trying to build in the editor when packaging i get the above error.

So i commented out that section of code and now both cooking and packaging works.

NOTE: You have to run Packageing before you can successfully cook the project.

Now i realy need to figuer out way that is, but atleast i now know way.
I belive this is a bug, but if anyone see something wrong with this code i be happy for some advice.

// Member Decleration
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Game Instance, Data Tabels")
		TArray<TAssetPtr<UDataTable> > GeneralCraftingRecipts;

// Method
int32 UMyGameDataTabels::GetGeneralCraftingReciptCount(int32 CraftingLevel)
{
	bool bIsValid = false;
	UMyGameDataSingleton* Data = UMyGameDataTabels::GetMyGameData(bIsValid);

	if (!bIsValid)
		return 0;

	if (Data->IsValidLowLevel())
	{
		if (Data->GeneralCraftingRecipts[CraftingLevel]->IsValidLowLevel())
		{
			return (Data->GeneralCraftingRecipts[CraftingLevel]->GetTableData().Num() - 1);
		}
		else {
			FStringAssetReference ReciptRefrence = Data->GeneralCraftingRecipts[CraftingLevel].ToStringReference();
			if (ReciptRefrence.IsValid())
			{
				UDataTable* NeededReciptTableToLoad = LoadObjFromPath<UDataTable>(FName(*ReciptRefrence.AssetLongPathname)); // Static Library method.
				if (NeededReciptTableToLoad)
				{
					return (NeededReciptTableToLoad->GetTableData().Num() - 1);
				}
			}
		}
	}

	return 0;
}

Now i hope am not doing anything stupid in code, but to me it makes no sence that code compiles and works as intended in VS but not “within the editor” for lack of a better term.

Again thanks for your help!

EDIT: If anyone wanted to know the answer to the above, check out this post for more info.

In short GetTableData() is only available in a editor build not in a packaged game.

Cheers!

Same problem :

" Missing receipt ‘UE4Game-Win64-Shipping.target.xml’. Check that this target has been built."

(Built from source, then tried to package Blueprint-only project)

So I rebuilt the Editor again with configuration “Shipping”. After that, the missing file appeared under Engine/build/receipts:


But packing still doesn’t work, argh!

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 AutomationScripts.Automation: Missing receipt ‘UE4Game-Win64-Shipping.target.xml’. Check that this target has been built.

Hi ,

Have you tried the solution found to his error below? Does this fix the error you are experiencing? Do you have any files that have a _ in the name? If so try removing that and see if the error still occurs. If not these may not be related and it would be best to make a new post so we can assess what is occurring for you specifically.

Hi ,

no, I didn’t find a solution yet. The error message just makes no sense to me (the needed file is in place)

The solution of doesn’t really help , I don’t have any *.umap files with an underscore in it. My engine, however, was located in a directory named ‘UE4_Oculus’. So I renamed this folder, re-registred the engine and tried to package again.

Same error.

Ok. So I made a new post then as you wanted. You can find it :
https://answers.unrealengine.com/questions/ask.html?space=41

我知道什么解决了,这是因为第三方插件,把Enable去掉

thanks ! i was getting desperate, I should’ve known it was all because of the underscore x)

thanks alot !

你好 我接入了第三方lib,然后打包的时候出现了这个Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Cook failed. —> AutomationTool.AutomationException: BUILD FAILED: Failed while running Cook for E:\work\code\SockeTestDemo\SockeTestDemo.uproject; see log C:\Users\admin\AppData\Roaming\Unreal Engine\AutomationTool\Log
s\D+Epic+Epic+Games+UE_4.15\Cook-2017.03.10-10.08.58.txt,是什么问题,enable??