Command PhaseScriptExecution failed with a nonzero exit code

An app I've been working on for weeks suddenly started giving me this error when I try to archive it:

"Command PhaseScriptExecution failed with a nonzero exit code"

I tried cleaning the build folder, restarting Xcode, and restarting the computer. The app compiles and runs, it just won't archive.

I deleted the entire project folder and re-cloned it, that didn't fix the problem either.

My coworker is able to archive the same project on his computer without any problem. The only difference we can find is that my computer has Xcode 14.3 and he has 14.2

Unfortunately I have no idea what the error message means. I think it might have something to do with Pods, but I didn't install the pods, and don't really understand how Pods work.

Is this a new bug in Xcode 14.3? What's the fix?

Thanks

I was never able to fix this, but I was able to determine that the error was coming from a build script associated with 'Cocoapods'. I decided to remove all of the Cocoapods stuff from the project and replace it with Swift packages, which fixed the problem.

A have the same problem

I have the same problem and I am seeing other related issues in different forums. Moving away from cocoapods is not viable for me right now. Can I still do archive releases from the 14.2 xcode if I download it from the developer portal, I know in the past sometimes you cannot release from those versions and this is holding up getting out updates. Anyone else come up with other fixes for this? It looks to be a symlink issue fo some sort. Maybe removing intermediates or something. I will update back here if I figure anything out.

I have move to an M2 sillicon, downgraded to 14.2 but since i have had 14.3 or maybe a version to recent of ventura i ti is not working ... i ve been stuck for 3 weeks this is really hurting my business we can deploy since. any one has alternative idea ?

Command PhaseScriptExecution failed with a nonzero exit code
 
 
Q