Can't package in unreal 5.3.2 on mac - Could not find a part of the path '.../Packaged/Mac/Engine/Binaries/Mac/'

Hello I am trying to package the game using legacy XCODE on mac but it always fails and the error doesn’t help much. Error: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘…/Packaged/Mac/Engine/Binaries/Mac/UE4.app’.
UATHelper: Packaging (Mac): at System.IO.Directory.Move(String sourceDirName, String destDirName)…

Any help would be appreciated.

Greetings @Fobal

Welcome back to the Unreal Engine Forums! The error is stating that the file or path does not exist. I’d check the location it’s specifying and also ensure proper permissions are set for that location as well. One of those should be the issue. I hope that helps!

Hello FrostyJas! Thanks for the message, I tried moving the project files and made sure the permissions are ok. But I get the same error… Also why it mentions UE4.app when I am using UE5, pretty strange.

Is there any text prior to the ‘Error: System.IO.DirectoryNotFoundException:’ part? Such as commands etc?

Fobal, I’m seeing a similar error here with an M1 Mac, Xcode 15.2, UE 5.3.2. In my case the template project packages fine for IOS device, and for Android, but fails with the error you described when I attempt to package for Mac. I’ve tried creating new projects from the third person template on different drives and each time it works for iOS and android, not for Mac.

the packaging process creates the folders as far as
/Users/sbenoit/Documents/MyJanProject/Mac/Engine/Binaries/
and that folder contains a folder ThirdParty so script seems to have access and permissions here
it just doesn’t seem to create the Mac folder
manually creating the Mac folder did not help , failure appears to be the same

Previously this Mac packaged all 3 env with Xcode 15.1, Ventura, and ue 5.2.1 (and Android Dev Studio). And it will still package for Mac using this Xcode 15.2 but using UE5.2.1.

I have a second Mac running Sonoma and Xcode 15.1 that packages for all 3 fine using UE5.3.

As this is a corporate M1 I do not have access to downgrade Xcode 15.2 to 15.1

Anyone have any thoughts on how to fix this?

end of the error log is posted below.

System.IO.DirectoryNotFoundException: Could not find a part of the path ‘/Users/sbenoit/Documents/MyJanProject/Mac/Engine/Binaries/Mac/UE4.app’.
UATHelper: Packaging (Mac): at System.IO.Directory.Move(String sourceDirName, String destDirName)
UATHelper: Packaging (Mac): at AutomationTool.InternalUtils.SafeRenameDirectory(String OldName, String NewName, Boolean bQuiet, Boolean bRetry, Boolean bThrow) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/AutomationUtils/Utils.cs:line 289
UATHelper: Packaging (Mac): at MacPlatform.ProcessArchivedProject(ProjectParams Params, DeploymentContext SC) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/Mac/MacPlatform.Automation.cs:line 455
UATHelper: Packaging (Mac): at AutomationScripts.Project.Archive(ProjectParams Params) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/Scripts/ArchiveCommand.Automation.cs:line 69
UATHelper: Packaging (Mac): at BuildCookRun.DoBuildCookRun(ProjectParams Params) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/Scripts/BuildCookRun.Automation.cs:line 238
UATHelper: Packaging (Mac): at BuildCookRun.ExecuteBuild() in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/Scripts/BuildCookRun.Automation.cs:line 43
UATHelper: Packaging (Mac): at AutomationTool.BuildCommand.Execute() in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/AutomationUtils/BuildCommand.cs:line 345
UATHelper: Packaging (Mac): at AutomationTool.BuildCommand.ExecuteAsync() in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/AutomationUtils/BuildCommand.cs:line 354
UATHelper: Packaging (Mac): at AutomationTool.Automation.ExecuteAsync(List1 CommandsToExecute, Dictionary2 Commands) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/AutomationUtils/Automation.cs:line 265
UATHelper: Packaging (Mac): at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/AutomationTool/AutomationUtils/Automation.cs:line 164

I had this issue as well on 5.3.2 on Mac. I was able to fix it by enabling ModernXCode:

Either in the DefaultEngine.ini, or enabling it through the ProjectSettings under “XCode Projects”

[/Script/MacTargetPlatform.XcodeProjectSettings]
bUseModernXcode=True
1 Like