Cannot deploy to iOS

Since 4.7.0 (and now 4.7.1), I can no longer deploy anything to an iOS device. Tonight, to test the problem, I tried deploying the starter Puzzle project using 4.6.1 and 4.7.1.

4.6.1 worked fine. 4.7.1 failed.

Interestingly, the app is installed on the device, but hangs at the splash screen. Here is the iOS crash log.

I am an UE4 noob, so I don’t really know where to start tackling this problem. Any help would be greatly appreciated. I will supply any information that I have missed as needed.

Here are my build logs:

4.7.1 fail

4.6.1 success

Branch: Binary build, from Epic Launcher

Developer Machine: Mac OS X Yosemite 10.10.2, Mac Pro 3.7 GHz Xeon, 12GB RAM

iOS Device: iPhone 5S 16GB

It looks like both of those logs failed actually. Let’s focus on 4.7.1. For Launch On in 4.7.1, we now push over the IPA with the executable and a couple of bits to get it on the device as quickly as possible. Then in another pass, we send over the data. It looks like this failed after sending the IPA(executable), but before sending the data which explains the crash on the device.

What is really strange is that it looks like it tried to deploy the IPA twice to your device and on the second attempt is when it failed to deploy with an error we have seen in the past and thought was eradicated.

You didn’t happen to have two devices attached at all, did you? (just checking as that has been a problem in the past). I’ll take a look over the code again to see if there is something I can find which would cause it to try to deploy twice.

-Pete

Just found a report from another user with the exact same error. What iOS version is on the iPhone?

-Pete

The failure on the second attempt wasn’t to deploy the IPA again, but it was trying to deploy the content. I’m still trying to figure out why that might have occurred and so far have been unsuccessful in reproducing the problem. I am now on OS X 10.10.2 as well and iTunes 12.1. I am still on Xcode 6.1.1, are you also on that version?

My phone is a iPhone 5S, with iOS 8.1.3. I have 3.1GB free on the device, and I did not include the starter content in the project.

iTunes 12.1.0.50, Xcode 6.1.1, OS X 10.10.2

I only have one iOS device attached. Thanks for looking into this for me.

Ok, I’ve been looking at this off and on today. I haven’t been able to reproduce it. However, looking at your log again and at the deployment code, I think you have a found interesting timing bug in the deployment code. Do you have this problem with say Tappy Chicken or Black Jack. Smaller games that may deploy faster and avoid the issue. If this works, then that will confirm my theory. If they don’t work, then I’ll have to keep digging.

-Pete

Hey Pete,

I have spent the morning trying out Tappy Chicken and Black Jack and here are my results:

Both fail to deploy to my iPhone with iOS 8.1.3 - build-tappychicken-4.7.1-fail.txt & build-black-jack-4.7.1-fail…txt

Both succeeded deploying on my iPad Mini with Retina with iOS 8.1 - build-blackjack-4.7.1-success-iPad…txt (sorry didn’t capture Tappy)

I cleared the apps then upgraded the iPad to iOS 8.1.3 to see if this was the issue. Afterwards, both Tappy and Black Jack deployed fine but did not launch, a different bug I assume. Apps work fine if I launch them myself by tapping icon. *-deploy-but-no-launch-iPad-8.1.3.txt

I also tried building for my iPhone from a different Mac, all same software versions - *-fail-macbook-pro.txt

So the issue seems to be with my phone. I cleared 5GB of space on this device. As you said, it seems to consistently fail at copying content. I end up with an app that will hang at the splash screen.

OK, so I have played around with this some more and have made some progress.

For all of my earlier efforts, I was selecting my device from the Launch menu which started the whole process. The failures are all documented above.

I tried to use the ‘Project Launcher’ from the Launch menu, which I believe may be a new feature of UE4.7. I have never used it before. In the Project Launcher, if select ‘Advanced’ and change my data build to ‘By the book’, then I can get Tappy, Blackjack and my own project to deploy and launch on my iPhone 5s. Pretty happy with that. The default ‘On the fly’ setting results in the same errors I was having before.

In the list of operations ‘Verify profile settings’, ‘Launching UAT…’, the Launching on “IOS@…” and “UAT post launch cleanup” operations never complete. However the game deploys to the device and runs.

I was also testing successfully on an iPhone 4. When I have both devices connected, and attempt to launch on the 5S, I get the following message:

env: 2015-03-03 12:33:26.457 instruments[29393:3864114] Failed to start Instruments daemon on ‘Clint???s iPhone 4 (7.0.6)’ (The service is invalid.)

The game started, but it appears that the UE4 editor was trying to run Instruments on the other device. An unrelated bug I am sure.

Ok, sounds like your making progress. The operations list never completing is a known of the Project Launcher and content-only projects. Looking at the failure logs, I have seen that instruments error before and I believe that occurs if you have never opened Xcode and selected the device for development. When you do that, Xcode adds some debug libraries and daemons to the device which then allows it to be used with development apps like Instruments. Have you done that for all of your devices?

As for the failures from Launch On, I looked over the logs again and it does look like it is trying to deploy the IPA a second time to the same device. This could be the timing issue I was talking about, but your success from the Project Launcher puts that theory in question as from the Project Launcher the IPA being deployed includes all of the cooked content (that’s why it works even if Instruments fails), so it should take even longer to deploy and make it more likely that it would run in to this timing bug.

The instruments bug with two devices attached definitely seems to be different. I’ll see if I can reproduce that one here. I still haven’t been able to get the double deploy attempt to happen here, but I will keep looking in to it.

-Pete

Thanks for this discussion. I’m having similar launch issue with my iPad. Interestingly, my iPhone has no issue with launch process at all. I’m not sure the error I’m having is exactly the same issue. Here’s a failure log: http://d.pr/n/10sr7.

mindblender, you are having the same issue as this thread:

They are similar issues, but not quite the same. For clintonf, the issue seems to stem from it trying to install the IPA a second time, for vbf and you it is failing from the get go. Looking at them both at the same time.

mindblender and clintonf, do you have a version of mono installed? If so, what version?

-Pete

you can get the mono version by typing

mono --version

in a terminal window.

Hey Pete, I have never installed Mono on this particular machine:

> which mono

> mono --version

-bash: mono: command not found

Ok, that tells me you are using our bundled version which is fine. I’ve been focusing on a possible problem on the Mac, but I am now leaning more towards something with the device. Refresh me on it’s specs and OS version. Do you have WiFi sync turned on? Is it connected to the Mac when you get this error (i.e. deploying over USB)?

I may have to ask you to try an updated deployment executable with more logging if we can’t narrow anything down. At least it is working for you from the Project Launcher which is what confuses me the most.

-Pete

When I went to start UE4 this morning the launcher did an update. Both Tappy and Black Jack now deploy and launch to my iPhone from the Launch menu directly with no errors (not using the Project Launcher). Coincidence?

I am using an iPhone 5S, with iOS 8.1.3 using a USB cable. Wi-Fi sync is not turned on in iTunes.

That’s bizarre, but glad it is now working without a hitch for you. Could you post an updated log from a run? I am curious if anything changed as far version numbers are concerned.

-Pete

Here is Tappy with Wi-Fi on my iPhone disabled (in case that was the issue). I built it with Wi-Fi on, and also Black Jack and my own project with no issues this morning after the latest launcher update.