[4.6][iOS] Failed to open descriptor file uproject

After update from 4.5.1 to 4.6.0 I’ve started to have problem with running a game on iOS.

After the game launch during the splash screen the message alert pop-up:

Failed to open descriptor file '../../../MyGame/MyGame.uproject'.
For troubleshooting, please go to https://docs.unrealengine.com/latest/INT/Platforms/IOS/GettingStarted/index.html

After that the game freeze.

I’m deploying the game on iPad3 (iOS 7.1.2) from Development Editor using Launch button. I’m building from PC (Windows 7) using Unreal Remote Tool.

The first strange thing is that I can see in logs transfer like:

... Transferred 57344 KB of 58232 KB
Finished copying to '/PublicStaging/MyGame.tmp.ipa' in 2,92 s

But the ipa file in Binaries\IOS has 107917 KB

Anyway, even when I install the game using iTunes and this bigger ipa the issue is still there.

Could I receive any clue what could happen?

The log from build/cook/deploy: link text

Howdy zompi2,

Thank you for reporting this issue. I am going to need a bit more information before i begin investigating this issue. Would you be able to attach your full build logs and your DXdiag to this post? Also, Is there a simple setup i can use to test out this issue or repro steps to test this issue locally?

Any additional information would be greatly appreciated.

Thanks and have a great day!

Sorry for delay, but I found that when I create a fresh new project everything works correct, so I had to make really deep debugging to find some more info.

And I think I found the reason of the error.

The FIOSPlatformFile class is trying to open a file from:

`MyGame.app/cookeddata/mygame/mygame.uproject`

But the game is actually in (hurray for JailBreak and root access!):

`MyGame.app/cookeddata/MyGame/mygame.uproject`

Unfortunatelly, the unix open method used in FIOSPlatformFile is case sensitive and it just can’t find a file.

The interesting part is that the new project I create has those paths correct (both with small letters).

I use the root access to manually change the folder name and the game run fine.

Temporarly removing ToLower() at the end of FIOSPlatformFile::ConvertToIOSPath isn’t helping because the uproject file case is bad…

Anyway, is there any way to determine the game name in cookeddata folder?

Edit:

Well, I made a little hack for now, but there are problems after that… I receive the Message:

Error: CDO Constructor: Failed to find CurveFloat'/Game/Characters/Boxer/Curves/StepFrontAttackCurve.StepFrontAttackCurve'

And there is probably the same problem, the actual path is:

characters/boxer/curves/stepfrontattackcurve.uasset

Cases in paths went crazy, what to do? :frowning:

Well, the problem is that the directory is not being moved to lower case during the staging portion of the build. The strange part is the engine directory is getting properly lower cased, so I’m not sure what the problem really is. I’ve looked over the code and it performs all of the ToLowerInvariant calls for both Engine and MyGame at the same time. The only I can think of right now is for you to delete the MyGame/Saved directory entirely. This will force it to recreate everything and hopefully fix the casing issues. If that doesn’t solve it, then I will have to see if we can get somebody here to reproduce it.

-Pete

Thanks for fast responses!

I tried to delete MyGame/Saved but the MyGame directory is created notoriously in the upper case.

The project was created in UE4.5. Then we updated engine to 4.6, build it and converted in place the project. This might be a long way to reproduce.

Can you point where is the part when staging directory is build exactly? Somewhere in cs files I suppose? I might track it down if I know where to look.

We made some changes in the Engine and merge them to the 4.6 too, but we didn’t make any changes in Unreal Build Tool though.

The disturbing thing is that even when content paths are in correct lower case form the game is trying to find them using the upper case… But this was a message from popup, I didn’t check the real paths in debugger. I’m gonna check it tomorrow when I get back to work.

In the worst scenario - we can create new project and imort our code and assets somehow. The project is in the early stage, but even now it might be painfull… So, better be sure if it can be fixed :wink:

I found it!

In my project I have one directory in “Additional Non-Asset Directories to Package” and “Additional Non-Asset Directories To Copy”.

This cause a copy:

InternalUtils.SafeCopyFile: SafeCopyFile C:\MyGame\Content\Certs\ca.pem C:\MyGame\Saved\StagedBuilds\IOS\cookeddata\MyGame\Content\Certs\ca.pem

So this looks like it changes the mygame directory to MyGame.

I removed this directory from Packaging Properties and now the game works! Anyway, this is still a bug because I need this directory in content. Any possible quick fix?

Edit:

I tried few options and it looks like the issue is only when I use “Additional Non-Asset Directories To Copy”, When I use “Additional Non-Asset Directories to Package” everything is fine :slight_smile:

Now I don’t know if it is a bug or just my wrong use…

Howdy zompi2,

Sorry about the lack of a response. Most of the Epic staff is out until next Monday. I will be sure to bring this issue back up and see if we can get you some more information to help you along with this error when everyone has returned.

Thanks and have a great day!

I think it was a false alarm, caused by my lack of knowledge.

I was using “Additional Non-Asset Directories To Copy” option in package settings and it looks like it changed the path to the actual content path.

Howdy zompi2,

I am glad to hear that you figured out what was causing your issue. Feel free to reopen this issue if you run into this error again.

Have a great day!

So I was having the same issue as zompi2, except I am running version 4.7.5 of the engine.

The actual issue is that “DirectoriesToAlwaysStageAsNonUFS” gets staged before the iOS assets do, however it doesn’t call ToLowerInvariant() on the paths it copies to.

So as this is the first copy, it creates the entire required directory structure with capitals and all.

The CORRECT fix for this (Instead of not using this feature) is the following between the UG_CHANGE comments in CopyBuildToStagingDirectory.Automation.cs:

List<string> ExtraNonUFSDirs;
				if (PlatformGameConfig.GetArray("/Script/UnrealEd.ProjectPackagingSettings", "DirectoriesToAlwaysStageAsNonUFS", out ExtraNonUFSDirs))
				{
					// Each string has the format '(Path="TheDirToStage")'
					foreach (var PathStr in ExtraNonUFSDirs)
					{
						var PathParts = PathStr.Split('"');
						if (PathParts.Length == 3)
						{
							var RelativePath = PathParts[1];
// UG_CHANGE: EVAN: Making copied directories become lowercase on iOS
							if (SC.StageTargetPlatform.PlatformType == UnrealTargetPlatform.IOS)
								SC.StageFiles(StagedFileType.NonUFS, CombinePaths(ProjectContentRoot, RelativePath), "*", true, null, CombinePaths(Params.ShortProjectName.ToLowerInvariant(), "content", RelativePath.ToLowerInvariant()));
							else
// END UG_CHANGE: Evan
								SC.StageFiles(StagedFileType.NonUFS, CombinePaths(ProjectContentRoot, RelativePath));
						}
					}
				}

This makes sure the path is copied correctly.
Do note however this will not change the filenames to lowercase. (This is the behaviour I want however)