AutomationTool Exited with ExitCode 6

Error Code

Took 2444.5545271s to run UnrealBuildTool.exe, ExitCode=6
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool failed. See log for more details. (C:\Tools\UnrealEngine\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE426-Win64-Development.txt)
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

Context
I ran Unreal Engine 4 from the source code in Visual Studio. After adding assets, I realized that I ran out of space, so I uninstalled Visual Studio since I didn’t know that I would need this to actually package the whole thing. I reinstalled it then, built the UE4.sln file, and built the AutomationTool as well. However, after packaging all 700+ files, it gave me the error code I specified in the first section of this post.

Full Error Message
UnrealBuildTool.Main: CompilationResultException: Error: OtherCompilationError
UnrealBuildTool.Main: at UnrealBuildTool.ActionGraph.ExecuteActions(BuildConfiguration BuildConfiguration, List1 ActionsToExecute) in C:\Tools\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\System\ActionGraph.cs:line 230 UnrealBuildTool.Main: at UnrealBuildTool.BuildMode.Build(TargetMakefile[] Makefiles, List1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile) in C:\Tools\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 483
UnrealBuildTool.Main: at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in C:\Tools\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 226
UnrealBuildTool.Main: at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in C:\Tools\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 550
Timeline.Print: Timeline:
Timeline.Print:
Timeline.Print: [ 0.000]
Timeline.Print: 0.000
Timeline.Print: 0.040 FileMetadataPrefetch.QueueEngineDirectory()
Timeline.Print: 0.047 XmlConfig.ReadConfigFiles()
Timeline.Print: 0.155 SingleInstanceMutex.Acquire()
Timeline.Print: 0.155 UEBuildPlatform.RegisterPlatforms()
Timeline.Print: 0.157 0.001 Initializing InstalledPlatformInfo
Timeline.Print: 0.236 0.080 Querying types
Timeline.Print: 0.239 0.083 MacPlatformFactory
Timeline.Print: 0.305 0.149 TVOSPlatformFactory
Timeline.Print: 0.318 0.162 AndroidPlatformFactory
Timeline.Print: 0.325 0.169 HoloLensPlatformFactory
Timeline.Print: 0.333 0.178 IOSPlatformFactory
Timeline.Print: 0.353 0.197 LinuxPlatformFactory
Timeline.Print: 0.360 0.204 LuminPlatformFactory
Timeline.Print: 0.364 0.208 WindowsPlatformFactory
Timeline.Print: 0.377 DeleteJunk()
Timeline.Print: 0.383 TargetDescriptor.ParseCommandLine()
Timeline.Print: 0.421
Timeline.Print: 0.446 UEBuildTarget.Create()
Timeline.Print: 0.452 0.005 RulesCompiler.CreateTargetRulesAssembly()
Timeline.Print: 0.452 0.005 0.000
Timeline.Print: 0.585 0.139 0.133 Finding engine modules
Timeline.Print: 0.620 0.173 0.167 Finding plugin modules
Timeline.Print: 0.626 0.179 0.173
Timeline.Print: 0.775 0.329 0.323 Finding program modules
Timeline.Print: 0.794 0.348 0.342 Finding program targets
Timeline.Print: 0.808 0.362 RulesAssembly.CreateTargetRules()
Timeline.Print: 0.950 0.503 UEBuildTarget constructor
Timeline.Print: 0.956 0.510 0.006 Reading source file metadata cache
Timeline.Print: 1.068 0.621 UEBuildTarget.PreBuildSetup()
Timeline.Print: 1.603 UEBuildTarget.Build()
Timeline.Print: 1.603 0.000
Timeline.Print: 1.664 0.060 ExternalExecution.SetupUObjectModules()
Timeline.Print: 1.725 0.121
Timeline.Print: 1.970 0.366 ExternalExecution.UpdateDirectoryTimestamps()
Timeline.Print: 2.208 0.604 UEBuildBinary.Build()
Timeline.Print: 4.403 2.799
Timeline.Print: 4.529 ActionGraph.CheckPathLengths
Timeline.Print: 4.535
Timeline.Print: 4.560 Reading action history
Timeline.Print: 4.561 Reading dependency cache
Timeline.Print: 4.565 Prefetching include dependencies
Timeline.Print: 4.595 Cache outdated actions
Timeline.Print: 4.764
Timeline.Print: 4.785 ActionGraph.ExecuteActions()
Timeline.Print: 2444.270
Timeline.Print: 2444.370 FileMetadataPrefetch.Stop()
Timeline.Print: [2444.374]

3 Likes

Update: I tried to read the logs line by line and analyse the .cs files specified within to no avail.

Bump! Anyone know how to solve this yet?

Is this a working project or you are migrating from a previous UE4 version?

This is a working project! I think the main problem here is literally because I reinstalled Visual Studio before I built the final project from within the Unreal Editor… I have no clue how to fix this though.

I am also stuck with same error

Did you also reinstall Visual Studio like me?

No. I tried building again and it passed this time without any error

Alright, so after disabling lots of the plugins, moving it to a larger space and rebuilding everything, I no longer have this error. Weird.

I would suggest anyone that has the same problem to try and move their output directory or at least make a ton of space in their output drive.

Thanks everyone!

3 Likes

我也碰到了相同的问题,后来发现这是因为我修改了项目最顶层文件夹的名称、并且命名不规范导致的(我使用了空格)。解决方法是,我将项目文件命中的空格去掉,就好了。

2 Likes

I got exit code 6 today and tried disabling plugins but it didn’t work actually. finally I realized it happened because I had changed the game icon. so I turned the default image back and it worked properly.

3 Likes

Look upper, or watch log, described in error, you just have some fatal errors. Even if you did compile code before. For example, i had fatal error: impossible to find some include header file.

for me was the lack of the parameter -archivedirectory=“E:\Package\5.0\coop\Server”

谢了 哥们 弄了我一整天

:smile:

Hello. I know it’s an old post but I ran into the same problem today and in my case Live Coding was enabled in Editor Preferences → Live Conding and I was trying to compile my code. Disabling LiveCoding everything went back to normal.

Hope it helps someone.

1 Like

In my case it was because I had simply disabled the plugin Steam VR. Re-enable it will correct the issue (for now).

Same error. Reinstalling Visual Studio didn’t solve the problem.

Thank you, this was THE ISSUE for me as well. It got auto enable the moment I changed source code access to Rider.

我将Intermediate文件夹下的build和Source文件夹删除后解决了这个问题,虚幻引擎会为你生成新的文件,如果还是无法解决的话,尝试将一起打包成功的工程文件中的build和Source文件夹进行替换,我在此之前更改了项目名称,导致了这个问题