Launching on iOS failed

I tried to launch an application which just have been created, but it failed.

LogPlayLevel: CommandUtils.Run: Run: mono "/Users/Shared/UnrealEngine/4.8/Engine/Binaries/DotNET/IOS/DeploymentServer.exe" Install -ipa "/Users/hirayama/Documents/Unreal Projects/MyProject3/Binaries/IOS/MyProject3.ipa" -device e766fe6e8f91f5360dc5b259690d8f0d213fc63a -additionalcommandline "-SessionId=4F549683D74ED672931D2596696F434B -SessionOwner=hirayama -SessionName='Play On Device' "
LogPlayLevel: mono: [deploy] Created deployment server.
LogPlayLevel: mono: [DD] Trying to connect to mobile device running iOS ...
LogPlayLevel: mono: Connect: Couldn't Start AFC service
LogPlayLevel: mono: [DD] Mobile Device '???????????????iPad' connected
LogPlayLevel: mono: Connect: Couldn't Start AFC service
LogPlayLevel: mono: Device '???????????????iPad' with id e766fe6e8f91f5360dc5b259690d8f0d213fc63a is being checked against e766fe6e8f91f5360dc5b259690d8f0d213fc63a.
LogPlayLevel: mono: [DD] Transferring IPA to device '???????????????iPad' ...
LogPlayLevel: mono: Connect: Couldn't Start AFC service
LogPlayLevel: mono: Directory (PublicStaging) doesn't exist!
LogPlayLevel: mono: CreateDirectory (PublicStaging) failed
LogPlayLevel: mono: Connect: Couldn't Start AFC service
LogPlayLevel: mono:
LogPlayLevel: mono: Unhandled Exception:
LogPlayLevel: mono: System.IO.IOException: AFCFileRefOpen (/PublicStaging/MyProject3.ipa) failed with error 7
LogPlayLevel: mono:   at Manzana.iPhoneFile.Open (Manzana.MobileDeviceInstance phone, System.String path, FileAccess openmode) [0x00000] in :0
LogPlayLevel: mono:   at Manzana.iPhoneFile.OpenWrite (Manzana.MobileDeviceInstance phone, System.String path) [0x00000] in :0
LogPlayLevel: mono:   at Manzana.MobileDeviceInstance.CopyFileToPhone (System.String PathOnPC, System.String PathOnPhone, Int32 ChunkSize) [0x00000] in :0
LogPlayLevel: mono:   at Manzana.MobileDeviceInstance.CopyFileToPhone (System.String PathOnPC, System.String PathOnPhone) [0x00000] in :0
LogPlayLevel: mono:   at Manzana.MobileDeviceInstance.CopyFileToPublicStaging (System.String SourceFile) [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.DeploymentImplementation+<>c__DisplayClass7.b__6 (Manzana.MobileDeviceInstance Device) [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.DeploymentImplementation.PerformActionOnAllDevices (UInt32 DelayEnumerationPeriodMS, DeploymentServer.PerformDeviceActionDelegate PerDeviceWork) [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.DeploymentImplementation.InstallIPAOnDevice (System.String IPAPath) [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.Program.RunCommand () [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.Program+<>c__DisplayClass1.b__0 () [0x00000] in :0
LogPlayLevel: mono:   at System.Threading.Thread.StartInternal () [0x00000] in :0
LogPlayLevel: mono: [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: AFCFileRefOpen (/PublicStaging/MyProject3.ipa) failed with error 7
LogPlayLevel: mono:   at Manzana.iPhoneFile.Open (Manzana.MobileDeviceInstance phone, System.String path, FileAccess openmode) [0x00000] in :0
LogPlayLevel: mono:   at Manzana.iPhoneFile.OpenWrite (Manzana.MobileDeviceInstance phone, System.String path) [0x00000] in :0
LogPlayLevel: mono:   at Manzana.MobileDeviceInstance.CopyFileToPhone (System.String PathOnPC, System.String PathOnPhone, Int32 ChunkSize) [0x00000] in :0
LogPlayLevel: mono:   at Manzana.MobileDeviceInstance.CopyFileToPhone (System.String PathOnPC, System.String PathOnPhone) [0x00000] in :0
LogPlayLevel: mono:   at Manzana.MobileDeviceInstance.CopyFileToPublicStaging (System.String SourceFile) [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.DeploymentImplementation+<>c__DisplayClass7.b__6 (Manzana.MobileDeviceInstance Device) [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.DeploymentImplementation.PerformActionOnAllDevices (UInt32 DelayEnumerationPeriodMS, DeploymentServer.PerformDeviceActionDelegate PerDeviceWork) [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.DeploymentImplementation.InstallIPAOnDevice (System.String IPAPath) [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.Program.RunCommand () [0x00000] in :0
LogPlayLevel: mono:   at DeploymentServer.Program+<>c__DisplayClass1.b__0 () [0x00000] in :0
LogPlayLevel: mono:   at System.Threading.Thread.StartInternal () [0x00000] in :0
LogPlayLevel: CommandUtils.Run: Run: Took 2.693284s to run mono, ExitCode=1
LogPlayLevel: ErrorReporter.Error: ERROR: AutomationTool error: Command failed (Result:1): /Users/Shared/UnrealEngine/4.8/Engine/Binaries/DotNET/IOS/DeploymentServer.exe Install -ipa "/Users/hirayama/Documents/Unreal Projects/MyProject3/Binaries/IOS/MyProject3.ipa" -device e766fe6e8f91f5360dc5b259690d8f0d213fc63a -additionalcommandline "-SessionId=4F549683D74ED672931D2596696F434B -SessionOwner=hirayama -SessionName='Play On Device' ". See logfile for details: 'DeploymentServer.10.txt'
LogPlayLevel: BuildCommand.Execute: ERROR: BUILD FAILED
LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception:
LogPlayLevel: Program.Main: ERROR: Exception in AutomationTool: Command failed (Result:1): /Users/Shared/UnrealEngine/4.8/Engine/Binaries/DotNET/IOS/DeploymentServer.exe Install -ipa "/Users/hirayama/Documents/Unreal Projects/MyProject3/Binaries/IOS/MyProject3.ipa" -device e766fe6e8f91f5360dc5b259690d8f0d213fc63a -additionalcommandline "-SessionId=4F549683D74ED672931D2596696F434B -SessionOwner=hirayama -SessionName='Play On Device' ". See logfile for details: 'DeploymentServer.10.txt'
LogPlayLevel: Stacktrace:   at AutomationTool.CommandUtils.RunAndLog (System.String App, System.String CommandLine, System.String Logfile, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in :0
LogPlayLevel:   at AutomationTool.CommandUtils.RunAndLog (AutomationTool.CommandEnvironment Env, System.String App, System.String CommandLine, System.String LogName, Int32 MaxSuccessCode, System.String Input, ERunOptions Options, System.Collections.Generic.Dictionary`2 EnvVars) [0x00000] in :0
LogPlayLevel:   at IOSPlatform.Deploy (AutomationTool.ProjectParams Params, DeploymentContext SC) [0x00000] in :0
LogPlayLevel:   at Project.Deploy (AutomationTool.ProjectParams Params) [0x00000] in :0
LogPlayLevel:   at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00000] in :0
LogPlayLevel:   at BuildCookRun.ExecuteBuild () [0x00000] in :0
LogPlayLevel:   at BuildCommand.Execute () [0x00000] in :0
LogPlayLevel: Program.Main: ERROR: Command failed (Result:1): /Users/Shared/UnrealEngine/4.8/Engine/Binaries/DotNET/IOS/DeploymentServer.exe Install -ipa "/Users/hirayama/Documents/Unreal Projects/MyProject3/Binaries/IOS/MyProject3.ipa" -device e766fe6e8f91f5360dc5b259690d8f0d213fc63a -additionalcommandline "-SessionId=4F549683D74ED672931D2596696F434B -SessionOwner=hirayama -SessionName='Play On Device' ". See logfile for details: 'DeploymentServer.10.txt'
LogPlayLevel: Program.Main: AutomationTool exiting with ExitCode=1
LogPlayLevel: Domain_ProcessExit
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 33.358636
LogPlayLevel: RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults:Error: Launch failed! Unknown Error

HI, i have the same question, have you finish this problem?

This message:

LogPlayLevel: mono: Connect: Couldn’t Start AFC service

Implies we can’t get the file service to start on the device. Could you give me some more information about the device? What iOS version is it running? What model is it (I’m assuming iPad, but what generation)? What Xcode do you have installed?

-Pete

Hi psauer, i built it in windows7 , the ue4 version is 4.7.6 and my ios version is ios8.3.

iOS 8.3, iPad Air 2, Xcode6.3.2

Hi Pete,

I’m a new user of your great engine, and I have the same problem with IOS8.3 iPhone6plus Xcode 6.3.2…
(LogPlayLevel: mono: Connect: Couldn’t Start AFC service in the log).

I’ve just install UE4 on a new MacBookPro with Yosemite 10.10.3, and I’m trying to play with the VehiculeExampleMap…

I have already install apps on the iPhone with Xcode without trouble.

  • Jerome

Has anyone had any luck on this? I’m getting the same thing today.

  • UE4 4.8.2
  • Xcode 6.4
  • OS X 10.10.3

The relevant error (I’m guessing) looks like this:
[snip]
LogPlayLevel: mono: Unhandled Exception:
LogPlayLevel: mono: System.IO.IOException: AFCFileRefOpen (/PublicStaging/jjf.ipa) failed with error 7
LogPlayLevel: mono: at Manzana.iPhoneFile.Open (Manzana.MobileDeviceInstance phone, System.String path, FileAccess openmode) [0x00000] in :0
LogPlayLevel: mono: at Manzana.iPhoneFile.OpenWrite (Manzana.MobileDeviceInstance phone, System.String path) [0x00000] in :0
LogPlayLevel: mono: at Manzana.MobileDeviceInstance.CopyFileToPhone (System.String PathOnPC, System.String PathOnPhone, Int32 ChunkSize) [0x00000] in :0
LogPlayLevel: mono: at Manzana.MobileDeviceInstance.CopyFileToPhone (System.String PathOnPC, System.String PathOnPhone) [0x00000] in :0
LogPlayLevel: mono: at Manzana.MobileDeviceInstance.CopyFileToPublicStaging (System.String SourceFile) [0x00000] in :0
LogPlayLevel: mono: at DeploymentServer.DeploymentImplementation+<>c__DisplayClass7.b__6 (Manzana.MobileDeviceInstance Device) [0x00000] in :0
LogPlayLevel: mono: at DeploymentServer.DeploymentImplementation.PerformActionOnAllDevices (UInt32 DelayEnumerationPeriodMS, DeploymentServer.PerformDeviceActionDelegate PerDeviceWork) [0x00000] in :0
LogPlayLevel: mono: at DeploymentServer.DeploymentImplementation.InstallIPAOnDevice (System.String IPAPath) [0x00000] in :0
LogPlayLevel: mono: at DeploymentServer.Program.RunCommand () [0x00000] in :0
LogPlayLevel: mono: at DeploymentServer.Program+<>c__DisplayClass1.b__0 () [0x00000] in :0
LogPlayLevel: mono: at System.Threading.Thread.StartInternal () [0x00000] in :0
[snip]

err, don’t know why it won’t allow code formatting in a comment. :-/

Check if you have pressed Trust (trust this computer) on your device.
It fixed that problem for me.

I don’t get anything on my device asking me to (re)trust the computer. It syncs just fine.

Any words from Epic? Same problem here.

In my case, the error went away when I manually deleted the Unity and UE4 versions of my app that I had installed previously. I did this on the phone itself by touching the apps until the little (x) circle appeared, hitting the x, and then pressing the home button to get back out of edit mode.

So this is an error some people are experiencing which we haven’t been able to reproduce at all. Can you post the model of the device you are deploying to, as well as your Mac OS?

-Pete

I have recurring problems launching to iOS devices from both Mac and PC. Yesterday, from the PC, a few launches to my iPad Air running iOS 8.4 were successful. Today the DeploymentServer keeps crashing. On some attempts the game icon appears on the iPad but trying to run it just results in a app freeze at the unreal splash screen.

I’ve been able to create a iOS package, double click in the .ipa, sync iTunes with the iPad - and get a functional game installed. Delete the game, try to launch to iOS from the editor on the PC, and the DeploymentServer crashes and an invalid .ipa might be installed. Or not.

A few observations and an output log from one of these unsuccessful launches follow:

  • The first SEVERAL attempts to launch from Mac always fail on any given day. The only way I’ve been successful is to freshly restart the iPad Air or my iPhone 6 Plus before attempting to launch. It also seems like the device needs several GB free space available even while the game ipa is ‘only’ 300MB.

  • Every launch attempt, successful or not, from Mac and PC generates messages about AFC not starting. Often in the middle of these connection retries - the iOS device is connected and transfer starts. Looks to me like multiple threads are launched and maybe orphaned in trying to start AFC.

  • Success rate for launch does seem higher if the game is first deleted from the iDevice.

  • Development machines: Win7 and OSX is the latest version. Unreal at 4.8.2. iOS at 8.4.

Regards,

link text

Ok, do you know how much space is available on the device? Trying to see if there is anything that would explain why it can’t find or make the PublicStaging directory.

Btw, we just retry several times which is why it looks like it might be multiple threads. I really wish I could reproduce this, but we have never seen it in the office, so it’s been very hard to track down.

-Pete

It is successful when installing from iTunes? What about using the Devices window in Xcode, does that work as well?

-Pete

Today the PublicStaging directory errors occurred when the iPad had 5 GB and later at 6.5 GB free. In days past, building from the Mac, the iPad was down to < 200 MB and choked until I deleted a few GB. Seemed like just deleting apps wasn’t enough - needed a reboot.

I’m saying that the AFC connection errors that continue after transfer starts hints at a process not realizing the connection is ok. But I’m guessing and haven’t looked at any code.

Yes if I build a development package on Win7 and install via iTunes on the PC I get a good app installed to the iPhone and iPad. No Xcode on this machine for obvious reasons.

Sure Pete .

Win7
Iphone 5S 64Gb - IOS 8.4

I could initially generate the certificates through the iPhonePackager.exe. and perform the Launch through the editor and run the app on my iphone the first time. So after I incrementei my code and I perform new tests could not longer.

I managed to fix the problem once, manually deleting the provisioning file on my PC, deleting also the same on the apple site and generating new provisioning files and keys.

But once again the Launch stopped working. In the options of IOS in the editor provisioning and certificate are green. But when trying to launch it displays an error screen stating problem in DeploymentServer. I can make a pack through the editor, but when trying to send it to the iPhone through the iPhonePackager.exe it features the same mistake. Another thing to comment on is that when trying to use the iPhonePackager.exe. to create the necessary keys on the command line screen displays a information that he did not find UE4Game-info.plist file.

Thank you for your attention and I am awaiting a return if possible.

This dind´t work on my side.

Just to give a “light” about the space, here a have over 40Gb of space on my Iphone, so that is not the problem i think.