Error Packaging for iOS

I am getting the following error when I try to launch my project to an iOS device.


IPhonePackager:  ... Packaging 'Payload/UE4Game.app/'
LogPlayLevel:Display: IPhonePackager: IPP ERROR: Application exception: Ionic..ZipException: The archive requires a ZIP64 Central Directory. Consider setting the ZipFile.UseZip64WhenSaving property.
LogPlayLevel:Display: IPhonePackager:    at Ionic..ZipOutput.WriteCentralDirectoryStructure(Stream s, ICollection`1 entries, UInt32 numSegments, Zip64Option zip64, String comment, ZipContainer container)
LogPlayLevel:Display: IPhonePackager:    at Ionic..ZipFile.Save()
LogPlayLevel:Display: IPhonePackager:    at iPhonePackager.FileOperations.ZipFileSystem.Close() in d:\BuildFarm\buildmachine_++depot+UE4-QA\Engine\Source\Programs\IOS\iPhonePackager\FileOperations.cs:line 805
LogPlayLevel:Display: IPhonePackager:    at iPhonePackager.CookTime.RepackageIPAFromStub() in d:\BuildFarm\buildmachine_++depot+UE4-QA\Engine\Source\Programs\IOS\iPhonePackager\CookTime.cs:line 365
LogPlayLevel:Display: IPhonePackager:    at iPhonePackager.Program.Main(String] args) in d:\BuildFarm\buildmachine_++depot+UE4-QA\Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.cs:line 668
LogPlayLevel:Display: CommandUtils.Run: Run: Took 1029.9595648s to run IPhonePackager.exe, ExitCode=1
LogPlayLevel:Display: ErrorReporter.Error: ERROR: AutomationTool error: Command failed (Result:1): E:\MCoE_DUID\Software\ThirdParty\UnrealEngine_4.6\Engine\Binaries\DotNET\IOS\IPhonePackager.exe RepackageFromStage "Engine" -config Development -sign -stagedir "E:\MCoE_DUID\Projects\MCoE 4.6\Saved\StagedBuilds\IOS" -project "E:\MCoE_DUID\Projects\MCoE 4.6\MyProject.uproject". See logfile for details: 'IPhonePackager.txt'
LogPlayLevel:Display: BuildCommand.Execute: ERROR: BUILD FAILED
LogPlayLevel:Display: Program.Main: ERROR: AutomationTool terminated with exception:
LogPlayLevel:Display: Program.Main: ERROR: Exception in AutomationTool: Command failed (Result:1): E:\MCoE_DUID\Software\ThirdParty\UnrealEngine_4.6\Engine\Binaries\DotNET\IOS\IPhonePackager.exe RepackageFromStage "Engine" -config Development -sign -stagedir "E:\MCoE_DUID\Projects\MCoE 4.6\Saved\StagedBuilds\IOS" -project "E:\MCoE_DUID\Projects\MCoE 4.6\MyProject.uproject". See logfile for details: 'IPhonePackager.txt'
LogPlayLevel:Display: Stacktrace:    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options)
LogPlayLevel:Display:    at IOSPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
LogPlayLevel:Display:    at Project.Package(ProjectParams Params, Int32 WorkingCL)
LogPlayLevel:Display:    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
LogPlayLevel:Display:    at BuildCommand.Execute()
LogPlayLevel:Display:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
LogPlayLevel:Display:    at AutomationTool.Automation.Process(String] CommandLine)
LogPlayLevel:Display:    at AutomationTool.Program.MainProc(Object Param)
LogPlayLevel:Display:    at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
LogPlayLevel:Display:    at AutomationTool.Program.Main()
LogPlayLevel:Display: Program.Main: ERROR: Command failed (Result:1): E:\MCoE_DUID\Software\ThirdParty\UnrealEngine_4.6\Engine\Binaries\DotNET\IOS\IPhonePackager.exe RepackageFromStage "Engine" -config Development -sign -stagedir "E:\MCoE_DUID\Projects\MCoE 4.6\Saved\StagedBuilds\IOS" -project "E:\MCoE_DUID\Projects\MCoE 4.6\MyProject.uproject". See logfile for details: 'IPhonePackager.txt'
LogPlayLevel:Display: ProcessManager.KillAll: Trying to kill 0 spawned processes.
LogPlayLevel:Display: Program.Main: AutomationTool exiting with ExitCode=1
LogPlayLevel:Display: Domain_ProcessExit
LogPlayLevel:Display: ProcessManager.KillAll: Trying to kill 0 spawned processes.
LogPlayLevel:Display: AutomationToolLauncher exiting with ExitCode=1
LogPlayLevel:Display: copying UAT log files...
LogPlayLevel:Display: RunUAT.bat ERROR: AutomationTool was unable to run successfully.
LogPlayLevel:Display: BUILD FAILED
PackagingResults:Error: Error Deployment failed! Unknown Error

The project builds for windows with no issues. All the content cooks for iOS without an error until we get to the end where the Automation Tool comes in and I get this error. I have no idea what it means. Any help someone could give me would be greatly appreciated. Thanks!

Hi XI584,

Do you have the provisions for iOS set up? You can find information for iOS installation on our quickstart guide here: Setting Up an Unreal Engine Project for iOS | Unreal Engine 5.1 Documentation

Yes the provisions are set up. I actually got this to work because I noticed that even though it failed through the launch button, it would still create an IPA in the binaries folder. I was then able to load that IPA via IPP onto the device. When it would not work at all, we were able to narrow down the error as being due to a very large terrain in the project. If we would reduce or eliminate the terrain altogether, we would get better results, to the point where it would even work via the launch button now.

Hi X1584,

I just want to confirm that you found the problem to be specific to a terrain in your project that, after reducing the size or removing it allowed the project to work as intended. Is this correct or are you still experiencing an error while attempting to package the project?

That is mostly correct. The original error went away with the reduction and/or removal of the terrain. However the project still does not deploy to the device correctly from the launch button in editor. Using the in-editor launch button however, does manage to produce an IPA that is stored in the binaries file under IOS for the project. That IPA is then installed to the device using iPhone Packager, and not the editor. The error we get now when using the in-editor launch is the following (for what it’s worth, we are getting the same error on two separate, different mobile projects.):


[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager: IPP ERROR: Error while executing command: System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager: Server stack trace:
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at System.Runtime.Remoting.Channels.Ipc.IpcPort.Connect(String portName, Boolean secure, TokenImpersonationLevel impersonationLevel, Int32 timeout)
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at System.Runtime.Remoting.Channels.Ipc.ConnectionCache.GetConnection(String portName, Boolean secure, TokenImpersonationLevel level, Int32 timeout)
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager: Exception rethrown at [0]:
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at iPhonePackager.DeploymentInterface.SetReportingInterface(DeployTimeReportingInterface InReporter)
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at iPhonePackager.DeploymentHelper.Get() in d:\BuildFarm\buildmachine_++depot+UE4-QA\Engine\Source\Programs\IOS\iPhonePackager\DeployTime.cs:line 246
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at iPhonePackager.DeploymentHelper.ExecuteDeployCommand(String Command, String GamePath, String RPCCommand) in d:\BuildFarm\buildmachine_++depot+UE4-QA\Engine\Source\Programs\IOS\iPhonePackager\DeployTime.cs:line 201
[2015.01.27-15.22.01:312] 16]LogPlayLevel:Display: IPhonePackager:    at iPhonePackager.Program.ExecuteCommand(String Command, String RPCCommand) in d:\BuildFarm\buildmachine_++depot+UE4-QA\Engine\Source\Programs\IOS\iPhonePackager\iPhonePackager.cs:line 365
[2015.01.27-15.22.01:958] 75]LogPlayLevel:Display: IPhonePackager:
[2015.01.27-15.22.01:958] 75]LogPlayLevel:Display: CommandUtils.Run: Run: Took 10.884s to run IPhonePackager.exe, ExitCode=1
[2015.01.27-15.22.01:958] 75]LogPlayLevel:Display: ErrorReporter.Error: ERROR: AutomationTool error: Command failed (Result:1): C:\Users\laira\Perforce\laira_MCoE\MCoE_DUID\Software\ThirdParty\UnrealEngine_4.6\Engine\Binaries\DotNET\IOS\IPhonePackager.exe Deploy "C:\Users\laira\Documents\Unreal Projects\Product_3_RTS\Binaries\IOS\Product_3_RTS.ipa" -device All_iOS_On_USALS-DE68601 -additionalcommandline "-SessionId=FFD405FE44FA59549638B3BF10DBB32B -SessionOwner=laira -SessionName='Play On Device' ". See logfile for details: 'IPhonePackager.1.txt'
[2015.01.27-15.22.01:958] 75]LogPlayLevel:Display: BuildCommand.Execute: ERROR: BUILD FAILED
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display: Program.Main: ERROR: AutomationTool terminated with exception:
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display: Program.Main: ERROR: Exception in AutomationTool: Command failed (Result:1): C:\Users\laira\Perforce\laira_MCoE\MCoE_DUID\Software\ThirdParty\UnrealEngine_4.6\Engine\Binaries\DotNET\IOS\IPhonePackager.exe Deploy "C:\Users\laira\Documents\Unreal Projects\Product_3_RTS\Binaries\IOS\Product_3_RTS.ipa" -device All_iOS_On_USALS-DE68601 -additionalcommandline "-SessionId=FFD405FE44FA59549638B3BF10DBB32B -SessionOwner=laira -SessionName='Play On Device' ". See logfile for details: 'IPhonePackager.1.txt'
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display: Stacktrace:    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options)
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display:    at IOSPlatform.Deploy(ProjectParams Params, DeploymentContext SC)
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display:    at Project.Deploy(ProjectParams Params)
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display:    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display:    at BuildCommand.Execute()
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display:    at AutomationTool.Automation.Process(String] CommandLine)
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display:    at AutomationTool.Program.MainProc(Object Param)
[2015.01.27-15.22.02:033] 82]LogPlayLevel:Display:    at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
[2015.01.27-15.22.02:044] 83]LogPlayLevel:Display:    at AutomationTool.Program.Main()
[2015.01.27-15.22.02:044] 83]LogPlayLevel:Display: Program.Main: ERROR: Command failed (Result:1): C:\Users\laira\Perforce\laira_MCoE\MCoE_DUID\Software\ThirdParty\UnrealEngine_4.6\Engine\Binaries\DotNET\IOS\IPhonePackager.exe Deploy "C:\Users\laira\Documents\Unreal Projects\Product_3_RTS\Binaries\IOS\Product_3_RTS.ipa" -device All_iOS_On_USALS-DE68601 -additionalcommandline "-SessionId=FFD405FE44FA59549638B3BF10DBB32B -SessionOwner=laira -SessionName='Play On Device' ". See logfile for details: 'IPhonePackager.1.txt'
[2015.01.27-15.22.02:044] 83]LogPlayLevel:Display: ProcessManager.KillAll: Trying to kill 0 spawned processes.
[2015.01.27-15.22.02:247][102]LogPlayLevel:Display: Program.Main: AutomationTool exiting with ExitCode=1
[2015.01.27-15.22.02:247][102]LogPlayLevel:Display: Domain_ProcessExit
[2015.01.27-15.22.02:300][107]LogPlayLevel:Display: ProcessManager.KillAll: Trying to kill 0 spawned processes.
[2015.01.27-15.22.02:312][108]LogPlayLevel:Display: AutomationToolLauncher exiting with ExitCode=1
[2015.01.27-15.22.02:312][108]LogPlayLevel:Display: copying UAT log files...
[2015.01.27-15.22.02:312][108]LogPlayLevel:Display: RunUAT.bat ERROR: AutomationTool was unable to run successfully.
[2015.01.27-15.22.02:458][122]LogPlayLevel:Display: BUILD FAILED

Howdy XI584,

Thank you for reporting this issue here on the forums. Would you able to create a post about this issue on our AnswerHub? This will provide better organization as to what may be occurring for you. In the post, If you could be sure to include log files, version of UE4, Binary or Source, and any additional information that help to decipher this issue, it would be greatly appreciated.

If you could also link that questions page here, I will be sure to look into it.

Thanks and have a great day!