iOS Deployment Failed (Exit Code=5)

Hello,
I just recently got into iOS, and I followed the steps provided on the documentation to set it up. However, whenever I try to deploy a level onto my iOS device, the deployment always fails with an exit code 5.

Here’s the end part of the log:

LogPlayLevel: Completed Launch On Stage: Cooking in the editor, Time: 8.914839
LogPlayLevel: Running AutomationTool...
LogPlayLevel: Automation.ParseCommandLine: Parsing command line: -ScriptsForProject="C:/Users//Documents/Unreal Projects/Gridz 4.15/Gridz.uproject" BuildCookRun -project="C:/Users//Documents/Unreal Projects/Gridz 4.15/Gridz.uproject" -noP4 -clientconfig=Development -serverconfig=Development -nocompile -nocompileeditor -installed -ue4exe=UE4Editor
-Cmd.exe -utf8output -platform=IOS -build -map=/Game/Levels/Menu_1 -skipcook -CookInEditor -iterativecooking -compressed -iterativedeploy -stage -deploy -cmdline="/Game/Levels/Menu_1 -Messaging" -device=IOS@All_iOS_On_LENOVO -addcmdline="-SessionId=A9266D62408F7280FF74FFBE6A4A7620 -SessionOwner='' -SessionName='Launch On Device' " -run
LogPlayLevel: Automation.Process: Setting up command environment.
LogPlayLevel: BuildCookRun.SetupParams: Setting up ProjectParams for C:\Users\\Documents\Unreal Projects\Gridz 4.15\Gridz.uproject
LogPlayLevel: Project.Build: ********** BUILD COMMAND STARTED **********
LogPlayLevel: Completed Launch On Stage: Build Task, Time: 1.505582
LogPlayLevel: CommandUtils.Run: Run: C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe Gridz IOS Development -Project="C:\Users\\Documents\Unreal Projects\Gridz 4.15\Gridz.uproject"  "C:\Users\\Documents\Unreal Projects\Gridz 4.15\Gridz.uproject"  -remoteini="C:\Users\\Documents\Unreal Projects\Gridz 4.15" -noxg
e -generatemanifest -NoHotReload
LogPlayLevel: UnrealBuildTool: Picking the default remote server
LogPlayLevel: UnrealBuildTool: Remote compiling requires a server name. Use the editor (Project Settings, IOS) to set up your remote compilation settings.
LogPlayLevel: UnrealBuildTool: Doing xcode-select --print-path
LogPlayLevel: UnrealBuildTool: ERROR: Failed to start local process for action ("Cannot start process because a file name has not been provided."):  -o BatchMode=yes  ${CURRENT_USER}@ "cd \"/\" && xcode-select --print-path"
LogPlayLevel: CommandUtils.Run: Run: Took 1.0192244s to run UnrealBuildTool.exe, ExitCode=5
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe Gridz IOS Development -Project="C:\Users\\Documents\Unreal Projects\Gridz 4.15\Gridz.uproject"  "C:\Users\\Docume
nts\Unreal Projects\Gridz 4.15\Gridz.uproject"  -remoteini="C:\Users\\Documents\Unreal Projects\Gridz 4.15" -noxge -generatemanifest -NoHotReload. See logfile for details: 'UnrealBuildTool-2017.02.22-00.31.57.txt'
LogPlayLevel:    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
LogPlayLevel:    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
LogPlayLevel:    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
LogPlayLevel:    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars)
LogPlayLevel:    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
LogPlayLevel:    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictionary`2 InTargetToManifest)
LogPlayLevel:    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
LogPlayLevel:    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
LogPlayLevel:    at BuildCookRun.ExecuteBuild()
LogPlayLevel:    at AutomationTool.BuildCommand.Execute()
LogPlayLevel:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
LogPlayLevel:    at AutomationTool.Automation.Process(String[] Arguments)
LogPlayLevel:    at AutomationTool.Program.MainProc(Object Param)
LogPlayLevel:    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
LogPlayLevel:    at AutomationTool.Program.Main()
LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=5 (5)
LogPlayLevel: Completed Launch On Stage: Build Task, Time: 0.500850
LogPlayLevel: BUILD FAILED
PackagingResults:Error: Error Deployment failed! Unknown Error

What did I do wrong?

Thanks.

Hi ,

Please cut and paste the entire output log into a text document and add as an attachment. When the automation tool fails, the cause is typically somewhere in the body of the log.

Thanks,

.

Hello .,
Thank you very much for replying. Here’s my output file. Thanks.

link text

The error in your log is “ERROR: Failed to start local process for action (“Cannot start process because a file name has not been provided.”)” This typically occurs if you are on a Windows machine and your project has a C++ element, typically a plugin that you were not aware was enabled, like “Substance,” for instance.

Make sure you have not included any C++ elements in your project and that no plugins are enabled. Let me know if this does not resolve your issue.

.

Hello ,
I do have a plugin that I use in my project that I imported in, it’s kind of important. Is there any way that I can turn this around? If I somehow get my hands on a mac, then will I be able to use the plugin and export to iOS?

Yes, you have a couple of options. You can remote build from your PC through the Mac or you could move the project to a Mac. However, moving your project to a Mac will require the project be converted to a C++ project in order for XCode to compile both the plugin and the project simultaneously.

I believe you can do this by simply adding an Blank C++ actor to your current project. Then move the (now C++) project to a Mac, click on the .uproject to generate XCode files, compile and from there, deploy to iOS, plugin and all.

*The “I believe” part is about simply adding a C++ element. I know this can be done from a project started as C++ from the outset.

Ok. If I do a remote build from my PC to a Mac, then does the Mac have to have Unreal Engine 4 installed on it? Also, is there documentation on how to remote build? I don’t have a Mac myself, and if I pull a favor from someone I know, I don’t want to go through the process of installing UE4 on their computer just to uninstall it later.

Remote Sync is somewhat complicated. Check out this guide a user created:

Windows → iOS Rsync/Remote Build Guide (4.8)

as well as our documentation here:

Building for iOS on Windows

I know one requirement is that you have to set up the certs and provisions on the Mac first via XCode then copy those to the PC (not the other way around.)

If it were me, since you have to install a version of the Editor on the Mac anyways, I’d copy my C++ project to the Mac, generate X Code files from the .uproject, compile the plugin and game code together, and launch from the editor, like you would on a PC. (You have to set up your Certs & Provisions here, too, but you don’t have to copy them back to the PC)

Unfortunately, neither way is simple, but the second way is easier IMO.

Hello , I got my hands on a mac finally. But of course, I got another exit code = 5. Here’s the log:link text

Sorry for the delay in responding… Whenever you see that the Automation Tool has failed, search (Ctrl + F) in the log for the word “Error” to locate the “Warning/Error Summary.” Then systematically correct each issue as listed in order under that heading (Typically the first warning is what is causing the Automation Tool to fail but not always.)

In your case, the first warning under your Warning/Error Summary is “No filename provided for module OnlineSubsystemGooglePlay.” Searching the AnswerHub for this phrase, I found the following post with a resolution:

4.13 OnlineSubSystemSteam not found

Please review the posted answer and see if this does not resolve your issue. If it still fails to package, follow the steps above to see if it is the same error or if there is a new error to be addressed. If it is not the same error, search the Answer Hub for (or simply Google) the error. Repeat, line by line, as necessary.