Paper2d breaking launch to iPhone/iPad

Hello,

I have spent most of the day trying to following the documentation on https://docs.unrealengine.com/en-US/…art/index.html (I gotta say… this documentation is horrendous and very out of date…)

I am using Windows only, no Mac.

Whenever I try to do the Launch > iPhone I get the following error:



LogPlayLevel:    ... Finished copying to 'PublicStaging/MobileTest1.ipa' in 5.06 s
LogPlayLevel:   [DD] Installing IPA on device 'VekPhone' ...
LogPlayLevel:   [DD]  ... Install is 5% complete at phase 'CreatingStagingDirectory'
LogPlayLevel:   [DD]  ... Install is 15% complete at phase 'ExtractingPackage'
LogPlayLevel:   [DD]  ... Install is 20% complete at phase 'InspectingPackage'
LogPlayLevel:   [DD]  ... Install is 20% complete at phase 'TakingInstallLock'
LogPlayLevel:   [DD]  ... Install is 30% complete at phase 'PreflightingApplication'
LogPlayLevel:   [DD]  ... Install is 30% complete at phase 'InstallingEmbeddedProfile'
LogPlayLevel:   [DD]  ... Install is 40% complete at phase 'VerifyingApplication'
LogPlayLevel:   [DD]  ... Install is 50% complete at phase 'CreatingContainer'
LogPlayLevel:   [DD]  ... Install is 60% complete at phase 'InstallingApplication'
LogPlayLevel:   [DD]  ... Install is 70% complete at phase 'PostflightingApplication'
LogPlayLevel:   [DD]  ... Install is 80% complete at phase 'SandboxingApplication'
LogPlayLevel:   [DD]  ... Install is 90% complete at phase 'GeneratingApplicationMap'
LogPlayLevel:   Install \ Update of "MobileTest1.ipa" finished in 11.45 seconds
LogPlayLevel:   [DD]
LogPlayLevel: Took 20.4890077s to run DeploymentServer.exe, ExitCode=0
LogPlayLevel: Running: D:\UnrealEngine\UE_4.22\Engine\Binaries\DotNET\IOS\DeploymentServer.exe Deploy -manifest "D:\Games\MobileTest1\MobileTest1\Saved\StagedBuilds\IOS\Manifest_DeltaUFSFiles_x.txt" -device x -additionalcommandline "-SessionId=x -SessionOwner="Josh" -SessionName="Launch On Device"  " -bundle com.viion.MobileTest1
LogPlayLevel:   [DD] Trying to connect to mobile device running iOS ...
LogPlayLevel:   [DD]  ... Connected to bundle 'com.viion.MobileTest1'
LogPlayLevel:   [DD]  ... Copying 'D:\Games\MobileTest1\MobileTest1\Saved\StagedBuilds\IOS\cookeddata\engine\plugins\2d\paper2d\paper2d.uplugin' -> '/Library/Caches/engine/plugins/2d/paper2d/paper2d.uplugin' ...
LogPlayLevel:   Directory (/Library/Caches/engine/plugins/2d/paper2d) doesn't exist!
LogPlayLevel:   CreateDirectory (/Library/Caches/engine/plugins/2d/paper2d) failed
LogPlayLevel:   [DD]  ... Failed to transfer a file, extended error is 'AFCFileRefOpen (/Library/Caches/engine/plugins/2d/paper2d/paper2d.uplugin) failed with error 12'
LogPlayLevel:   [DD]
LogPlayLevel: Took 185.7692871s to run DeploymentServer.exe, ExitCode=1
LogPlayLevel: Error: ERROR: Command failed (Result:1): D:\UnrealEngine\UE_4.22\Engine\Binaries\DotNET\IOS\DeploymentServer.exe Deploy -manifest "D:\Games\MobileTest1\MobileTest1\Saved\StagedBuilds\IOS\Manifest_DeltaUFSFiles_x.txt" -device x -additionalcommandline "-SessionId=x-SessionOwner="Josh" -SessionName="Launch On Device"  " -bundle com.viion.MobileTest1. See logfile for details: 'DeploymentServer-2019.10.06-21.45.05.txt'
LogPlayLevel:        (see C:\Users\Josh\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UnrealEngine+UE_4.22\Log.txt for full exception trace)
LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 278.032544
LogPlayLevel: BUILD FAILED
PackagingResults: Error: Launch failed! Unknown Error


This is with a brand new blueprint only project: The Top Down Template. **Zero **changes.

I don’t understand this error:


Failed to transfer a file, extended error is 'AFCFileRefOpen (/Library/Caches/engine/plugins/2d/paper2d/paper2d.uplugin) failed with error 12'

I tried to disable the Paper2D plugin, but then it requires me to use remote server to compile…??? (why does turning off a plugin require this?)

Now the funny thing is, if I instead do: File > Package Project > IOS, and then copy over the ipa manually using the iPhonePackage.exe it works fine…

Anyone ran into this or might know ways to fix it?

You can’t compile for iOS on Windows, it is an absolute barrier. That’s why it’s looking for a remote server. Something is causing that.

Are you running any marketplace or third party plugins? If anything you’re using wasn’t pre-built for iOS and distributed with a binary then it’s going to need to compile it. This shouldn’t happen for built-in plugins though.

The other thing to do is to find the actual external build log file and read that. It often has more information than the normal output. I forget where it is on Windows but there’s probably several you can check. See if the output mentions it by name.

Edit: one of yours is at:
C:\Users\Josh\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UnrealEngine+UE_4.22\Log.txt

Hi Antidamage,

I’ve updated the full log with some more, it does build and I get the file: MobileTest1.ipa, if I copy this over *manually *using IPhonePackage.exe it works fine, i can open my game and all fine and dandy, it just doesn’t work via the Launch > Iphone.

Looking at the log it installs, then tries to run DeploymentServer.exe which tries to copy over 2d\paper2d\paper2d.uplugin ? I don’t know what this is, it’s a built-in plugin.

When I try run the installed ipa (via Launch > Iphone) i get “Failed to open descriptor file”, but I do not get this error if I go via File > Package > IOS

I have no custom plugins enabled.

This is either a bug in UE4 or *maybe *removing the plugin causes some kind of hash verification difference that makes UE4 think it needs to compile again. If i load up the default third-person project I can build. If I **disable **the built in Paper2D it then wants to compile everything and errors.

Launching was always a bit flaky and I don’t think it copies the entire cooked build over, just the current map and hard references. To test I do full builds and deploy to the device like you just did.

I read your original error a bit more and this is key:


Directory (/Library/Caches/engine/plugins/2d/paper2d) doesn't exist!

That is a Mac OS specific path. It can’t copy anything to there because it doesn’t exist. Sounds like a bug to me and you should be starting on 4.23 anyway.

Do yourself a favour and set up Project Launcher builds instead of going FIle -> Package -> iOS. They will do full builds and should be able to deploy to the device (as well as being able to make DLC later on down the track).

Hi Antidamage,

Now that I think about it, you might be right. I thought that was a path on my iPhone.

I could try setup a custom project launcher build, but wouldn’t I run into the same issue? Although if i can get it to just upload the full build and stop, that should be okay.

I will test tomorrow on 4.23 to see if anything has been fixed.

Doubtful, Project Launcher builds (it’s a specific dev tool under the Window menu) are like Packaging but with specific groups of settings. Using the launch button on the toolbar is the worst option.

Maybe that should be on the documentation!

Looking into the custom project launcher builds, it seems a much more effecient and easier way to go about this so I may just stick to that.

So, I’ve tested this in 4.23 and it still bugs out.

Also the line:


 
 LogPlayLevel:   [DD]  ... Copying 'D:\Games\MobileTest1\MobileTest1\Saved\StagedBuilds\IOS\cookeddata\engine\plugins\2d\paper2d\paper2d.uplugin' -> '/Library/Caches/engine/plugins/2d/paper2d/paper2d.uplugin' ... LogPlayLevel:   Directory (/Library/Caches/engine/plugins/2d/paper2d) doesn't exist 

This is it failing to find the directory on the phone, not my PC. It fails because it doesn’t copy, see error:


 LogPlayLevel:   CreateDirectory (/Library/Caches/engine/plugins/2d/paper2d) failed LogPlayLevel:   [DD]  ... Failed to transfer a file, extended error is 'AFCFileRefOpen (/Library/Caches/engine/plugins/2d/paper2d/paper2d.uplugin) failed with error 12' 

At this point, I’m fairly certain this is 100% bugged.

I’m about to do a build on 4.23 today of my project, I’ll let you know if I run into it. But in the meantime I’d start over with a blank project and see if somewhere along the process you deviated from the right procedure. As painful as it feels a blank project always resolves whatever is stopping me.

I’m running into a different error, but it’s probably my fault. Working through to resolve it now, but has anyone else encountered this one as a new issue in 4.23?


UATHelper: Packaging (iOS):   ERROR: Missing precompiled manifest for 'EditorWidgets'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in EditorWidgets.build.cs to override.
PackagingResults: Error: Missing precompiled manifest for 'EditorWidgets'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in EditorWidgets.build.cs to override. 

Edit: got it resolved, was an UnrealEd module entry hidden away in the .uproject file. I’ll let you know if I’m able to deploy tomorrow morning.

I reported my issue with full log to EU4 Bug Report Issues and they confirmed it a bug, its a bug with **iOS 13 **specifically.

Commit: https://github.com/EpicGames/UnrealE…d85d7696589d56

So that is good news.

Odd. That issue seems to be just for launching. I can confirm that deploying a packaged game with a development profile using the XCode Devices and Simulators window works fine still, and presumably TestFlight is OK too.

IMO you want to get used to that method of development as Launch only puts the currently open map on the device.

That would require getting a Mac for XCode, while I have one for work it’s not really an option so I would just use it when I get to a state of requiring C++ builds.

On Windows, it is fine doing File > Package > IOS as this is quick enough to do some testing. I would mostly just use ES2 Mobile Preview for fine tuning shadows/lighting and such since I know the scene limitations from pre-tests as well as mainly testing on an Android. Level testing is fine since my project is mostly small levels, which is what Launch > IOS would be suitable for. I have setup a custom build too which is useful.

Project Launcher doesn’t require a mac, it’s the same build path as everything else that works on Windows. There’s even options for getting on TestFlight, but as everyone and myself has said before, don’t release without MacOS available to debug issues.

I’ve been meaning to add this to the stickied thread but now it’s been too long and I can’t edit the post: use a VM. By all accounts on a good PC they’re faster than your standard iMac.

I’m in the process of trying to set one up now and working through the issues, I’ll let you know if it’s viable.

FIXED: I have the same problem currently. Everything worked before updating to iOS 13 but ever since I did I get the same error. I am using Paper2d for my UI elements so I’m not able to just disable the plugin. I tried deleted the app before launching to my iPhone 10 XS Max as well as deleting the EditorCooked and StagedBuilds folders and retrying but it didn’t work. If I do disable Paper2d, I get an error when trying to launch that says “Remote compiling requires a server name. Please specify one in the Remote Server Name settings field.” which is actually the same error my partner has been getting when trying to launch the phone at all from his computer after getting the project from github.

This is the error when launching with Paper2d enabled:


LogPlayLevel:   [DD]  ... Copying 'C:\Users\leutn\Documents\Entangled\entanglement\Entangled\Saved\StagedBuilds\IOS\cookeddata\engine\plugins\2d\paper2d\paper2d.uplugin' -> '/Library/Caches/engine/plugins/2d/paper2d/paper2d.uplugin' ...
LogPlayLevel:   Directory (/Library/Caches/engine/plugins/2d/paper2d) doesn't exist!
LogPlayLevel:   CreateDirectory (/Library/Caches/engine/plugins/2d/paper2d) failed
LogPlayLevel:   [DD]  ... Failed to transfer a file, extended error is 'AFCFileRefOpen (/Library/Caches/engine/plugins/2d/paper2d/paper2d.uplugin) failed with error 12'
LogPlayLevel:   [DD]
LogPlayLevel: Took 185.6644601s to run DeploymentServer.exe, ExitCode=1
LogPlayLevel: Error: ERROR: Command failed (Result:1): C:\Program Files\Epic Games\UE_4.22\Engine\Binaries\DotNET\IOS\DeploymentServer.exe Deploy -manifest "C:\Users\leutn\Documents\Entangled\entanglement\Entangled\Saved\StagedBuilds\IOS\Manifest_DeltaUFSFiles_00008020001E3C501484003A.txt" -device 00008020-001E3C501484003A -additionalcommandline "-SessionId=
F2403F5E4B63A6989FC1A0ACAC38AE7F -SessionOwner="leutn" -SessionName="Launch On Device"  " -bundle com.Zovi.Entangled. See logfile for details: 'DeploymentServer-2019.11.06-14.59.50.txt'
LogPlayLevel:        (see C:\Users\leutn\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.22\Log.txt for full exception trace)
LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 222.013976
LogPlayLevel: BUILD FAILED
PackagingResults: Error: Launch failed! Unknown Error

Edit: After updating to 4.23.1 everything worked without a hitch!

If anyone is still having issues launching your iOS game on your device, you can try the following:

  1. Use the “IPhonePackager.exe” only to generate the “Certificate Signing Request” (It seems that after UE4.5 Epic deprecated its usage)
  • If you really want to use “IPhonePackager.exe”, you have to download a file called “UE4Game-Info.plist” from the 4.6 branch of UE4 in github and place it in your UE4 installation directory under: “UnrealEngine/Engine/Build/IOS/”. If you don’t do so, you will get errors on the IPhonePackager console.
  1. Remove all obsolete provisioning profiles from your project - Remove obsolete mobileprovision profiles
  2. Remove all your certificates from your project (not quite sure how I did that, because it was a while ago)
  3. Reboot your PC and verify that you don’t have any provisioning profiles or certificates in your iOS settings of your UE4 project
  4. Go to your apple developer console and remove all Certificates, Identifiers and Profiles
  5. Follow the official iOS provisioning guide from Epic
  • Important information about the identifiers step:

    My **identifier** in the apple console is using a wildcard and it is: **com.mycompany.***
    The **bundle identifier** in iOS project settings is: **com.mycompany.mygame**
    
  1. My certificate did not work right away. I had to wait for a few hours
  2. I was not able to launch the game on my iOS device, so I had to first package it and upload the .IPA file to my iPhone via “IPhonePackager.exe” Advanced Tools Tab.