Packaging for iOS fails with "Cannot create because a file with the same name already exists."
I recently have issues packaging for iOS (and tvOS) on Mac. I use UE4Editor/Mac/Development built from latest 4.11 branch to package my game for iOS/Development. All goes well except in the end I get a message that it Full log text below:
(comments are locked)
|
I already see the issue. So that we don't collide with the executable name, all content is put in cookeddata/gamename. However, the code to copy the NonUFS data is not taking that into account for iOS, so it is putting in the root which collides with the executable. I'll look into a fix today. -Pete So, the provisioning profile issue is that the Apple World Wide Authority certificate expired. Go to https://www.apple.com/certificateauthority/ and download the WWDR certificate that expires in 2023. Double click it and import it to the System keychain, if you haven't already. The old one expired last Sunday, so that is relatively recent development. As for the StageAsNonUFS, I'll have a look today. It's possible something has changed in the last few months since 4.11 and 4.10 were similar which is causing this error. -Pete Thanks Pete - so I did this, generated new certificates and provisioning profiles but also had to delete the old WWDR certificate from both System and Login keychain for the Keychain to be happy. Unfortunately, now I am getting an error that the bundle identifier "com.YourCompany.[PROJECT_NAME]" does not match my provision profile. Makes sense, so I fixed that in the project settings and set it to "com.agoglabs.[PROJECT_NAME]" which matches the "com.agoglabs.*" of the profile, and confirmed that it is correctly set in DefaultEngine.ini. However I keep getting the error despite fixing this. It continues to claim that my bundle identifier is "com.YourCompany.[PROJECT_NAME]" when it's not. Tried deleting cooked and staged data but still getting this. Any insight into this would be helpful. Is your game content-only? If so, there is a bug in Preview 5 that will be fixed in the next preview which is not properly pulling the ini files from the content-only project. Yes content-only. So the fix is checked into the 4.11 branch on GitHub? Ya, it will be two changes, look for something related to UE-24753. The actual bug was an iPhone 6s splash screen fix, but it also includes the fix for the content-only ini files. (change lists from P4 are 2863737 and 2863806). Ok, I've been looking into a fix for this, but I am not sure you really want to use the DirectoriesToAlwaysStageAsNonUFS for this. That particular ini is for files that will not be loaded by the Unreal File System and the intention there is they should be sitting at the root of the app. For instance, ue4commandline.txt is a NonUFS file and it sits in the payload root of the app next to the executable. There is a DirectoriesToAlwaysStageAsUFS which may be want you actually want here. However, the concern I have there is those directories will be placed in the pak file if you use pak for holding the content. How does the plugin attempt to access these scripts? Does it do an open directly or does it use the UE FileManager? -Pete Hmm this staging mechanism has been working just fine up until 4.10 and works fine on 4.11 for platforms other than iOS/tvOS, by placing the NonUFS folder inside the project content folder. There is nothing wrong with that IMO. NonUFS files like ue4commandline.txt that are handled internally by the build system can of course live anywhere they want as long as the path is known at runtime. Our plugin needs to store its data files separately from the pak file so we can update them. SkookumScript establishes a remote connection with the host system which allows downloading and installing of updated script data. Hi so any update on this issue? I got latest 4.11 from GitHub and it is still not resolved. The DirectoriesToAlwaysStageAsNonUFS mechanism has been working great. Can we just make it work on iOS/tvOS like it did in 4.10 and like it does in 4.11 on Windows/Android and call it a day? For users who may be experiencing the same problem, this bug has been recorded as JIRA [UE-27608] and is scheduled to be fixed for the UE4.11 official release. Thank you for your patience, cooperation, and communication in helping us identify and resolve this issue.
(comments are locked)
|
Follow this question
Once you sign in you will be able to subscribe for any updates here
Hi GreatGuru,
You cannot have a directory with the same name as the executable. Change the name of one and retry. Let me know if this does not work for you.
-Steve H.
Hmm both the folder and the executable name come from the build process as far as I know, presumably both reflecting the project name, SkookumDemo. I did not choose these names. How do you suggest I go about changing them? I could try renaming the project see if that helps I guess.
Using the project you sent, SkookumDemo 4.11 3, I was able to launch successfully to a folder on the Desktop called "TestPackage" for both Mac and iOS without issue. Please try this and/or renaming the project and let us know your results.
So - renaming the project file from toI take it back, renaming the project file does not fix the issue. I renamed the project to all sorts of names, and just get the same message just with the wordSkookumDemo.uproject
toSkookumDemo2.uproject
fixes the issue.SkookumDemo
replaced with the new project name. I am using UE4Editor on Mac and I "Package" for iOS.Ok this looks like a bug related to the staging of additional NonUFS files. Seems like the folder hierarchy of staged files was changed between 4.10 and 4.11. You are not seeing the issue because you probably don't have SkookumScript installed and never generated SkookumScript binary files that are packaged with the excutable, exposing this problem. Try to reproduce this (on Mac):
In the SkookumDemo project, verify that there is an entry in the
Config/DefaultGame.ini
fileNow, in the project's
Content
folder, create a subfolderskookumscript
, and inside that folder place a random file, e.g. a text filetest.txt
containing the string "Hello World".Try to package the project for iOS, see if you get my error. What should happen here is that the
skookumscript
folder with the test file will be placed in the staged package inside thecookeddata/content
folder. Instead it creates a folderSkookumDemo/content
right besidecookeddata
and places theskookumscript
folder there. This then causes the naming conflict with the executable.Thanks!
I cannot install SkookumScript... I get an error saying not compatible with this version of the Engine. I see the plugin is for UE4.11 preview 4, and everyone on the support team has updated to preview 5.
So do you have a preview 5 version of the plug-in available? If not, I may be able to find a workaround or someone who has not updated yet.
Have you tried the three steps above? They don't require SkookumScript and should still cause the error to occur. We will post a pre-built plugin for 4.11p5 soon as well.
After following the first 2 steps I cannot open the project to perform step 3. However, while researching I discovered a similar bug that started in Preview 4 and is fixed in Preview 5. Please download preview 5 and see if this issue persists.
I missed your note before about opening on a Mac and was trying to open the Windows version. After following your steps on a Mac, the issue did not occur for 4.11Preview5, resulting in a successful package "SkookumDemo.ipa"
Your test file resides in: ...SkookemDemo 4.11 3>Saved>StageBuilds>IOS>SkookumDemo>Content>skookumscript>test.rtf
If the folder
Saved/StagedBuilds/iOS
contains a folderSkookumDemo
that would collide with the executable also namedSkookumDemo
which would be packaged at the same folder level. Also the content folder being mounted by the runtime file system iscookeddata
and notSkookumDemo
sotest.rtf
would not be found. Two problems right there. The folder 'skookumscript` comes from the project'sContent
folder and has to end up in the package's content folder right beside thepaks
folder but obviously doesn't. Have you verified the ipa file that it contains in itsPayload/SkookumDemo.app
folder both yourtest.rtf
inSkookumDemo/Content/skookumscript
and the executableSkookumDemo
? If so that is a conflict constituting essentially a corrupt archive. Try extracting the archive - do you get an error message? If not, does the extracted data contain both the excutableSkookumDemo
andtest.rtf
?Hi Steve - any update on this? Were you able to reproduce it?
We are still looking at this and I should have more definitive information for you by noon tomorrow. In the meantime, have you tried updating to 4.11 preview 5?
Had some technical issues on the Mac that set me back. But following your steps from scratch, I came up with the exact same results as before: No packaging errors, successfully creating an ipa file. Wasn't the initial issue that you were not able to create an ipa file successfully because you were getting the error: "Cannot create because a file with the same name already exists?"
Have you tried updating to preview 5 and setting your output to a different directory as troubleshooting steps? Are you able to create an ipa at all or does packaging fail when you get the error message? Please provide this information.
Hi Steve - Yes my original issue was that packaging failed but the underlying problem is that folders specified using
+DirectoriesToAlwaysStageAsNonUFS=
will get archived incorrectly. This may or may not result in an error during packaging apparently. The folderskookumscript
has to end up in the same content folder as the Paks and it's not. Did you try unpacking the ipa as I suggested?I have updated to 4.11p5 long ago. I tried both packaging with 4.11p5 and with latest 4.11 built from source. Both report an error that all my provisioning profiles are not valid (which they are, and they are not expired, and I have used them many times before). If I proceed anyway, 4.11p5 will fail with a code signing error, and 4.11 built from source will again fail with the error I started this thread on (Cannot create /Volumes/Dev/UnrealEngine/4.11/Projects/SkookumDemo/Binaries/IOS/Payload/SkookumDemo.app/SkookumDemo because a file with the same name already exists.). The
Saved/StageBuilds
folder - again - contains the wrong folder structure as described many times. Can you please try to unpack your ipa? You will see that it is no good because either the executable or the test text file will be missing.Also please try packaging the same project for Win64 you'll see the folder structure is different = what it's supposed to be. The
skookumscript
folder ends up next to thePaks
folder where it belongs. Also works fine on Android btw. Just on iOS and tVOS it doesn't. That is a bug.