Upgrade from xCode 14.2 to 14.3 PhaseScriptExecution failed with a nonzero exit code

Hello,

I've upgraded from xcode 14.2 to xcode 14.3 beta, and now I can't archive anymore for Any iOS Device (arm64) with the following error :

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks

mkdir -p /Users/max/Library/Developer/Xcode/DerivedData/Max-dmwafkgdrzqavzcmbdjbjgmmuxby/Build/Intermediates.noindex/ArchiveIntermediates/Release_preprod/BuildProductsPath/Release_preprod-iphoneos/MaxApp.app/Frameworks

Symlinked...

rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ActionSheetPicker_3_0.framework" "/Users/max/Library/Developer/Xcode/DerivedData/Max-dmwafkgdrzqavzcmbdjbjgmmuxby/Build/Intermediates.noindex/ArchiveIntermediates/Release_preprod/InstallationBuildProductsLocation/Applications/MaxApp.app/Frameworks"

building file list ... rsync: link_stat "/Users/max/Workspace/MaxApp/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ActionSheetPicker_3_0.framework" failed: No such file or directory (2)

done



sent 29 bytes  received 20 bytes  98.00 bytes/sec

total size is 0  speedup is 0.00

rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]

Command PhaseScriptExecution failed with a nonzero exit code

Any idea why it works fine with xCode 14.2 and not with xCode 14.3 beta please ?

I tryed to delete the [CP] Embed Pods Frameworks script, but it has re-created it and get the same issue.

I tryed to build and debug in a simulator, and it works fine.

I tryed to delete "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; in the .pbxproj file

Answered by vadimwe in 749297022

Workaround is to update all the generated ...-frameworks.sh files to add the -f flag to the call to readlink. In other words, need to replace:

source="$(readlink "${source}")"

with

source="$(readlink -f "${source}")"

Seems this is CocoaPods issue...

Solution by @vadimwe worked for me. Thanks a lot!

Solution by @vadimwe worked for me. Thank you very much!!!

Having the same issue with Xcode 14.3

Unfortunately the same and solution by @vadimwe doesn't work.

This work for me, thank you @vadimwe !

thanks, it worked @vadimwe

Unfortunately the same and solution by @vadimwe doesn't work for me. So I get the old version, XCode 14.0.1, and it works fine.

Solution by @vadimwe it's work for me. For flutter app, i changed at 'Pods/Target Support Files/Pods-App/Pods-{App name}-frameworks.sh'.

Solution by @vadimwe work for me. But only after second try, when I disable cocoapods running command during build. At first time changes with current fix was overwritten and build failed.

Guys, if workaround do not work for you try this:

  1. Perform action one more time
  2. Pods deintegrate / integrate back
  3. Clear build folder via xCode
  4. Build again from scratch

My original workaround successfully tested on native iOS app, Flutter app, Capacitor app.

Thank you very much @vadimwe !

Fixed the same issue for me. @vadimwe Thanks a lot for the solution

Having the same issue with Ionic 6+ and Capacitor 4+ after updating iOS, MacOS and Xcode

Thanks to @vadimwe

Same issue.Solution by @vadimwe worked for me. Thanks a lot!

Upgrade from xCode 14.2 to 14.3 PhaseScriptExecution failed with a nonzero exit code
 
 
Q