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

  • Thanks to @vadimwe

  • how to fix the same with fastlane builds?

Add a Comment

Accepted Reply

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...

  • Had the same issue. Solution by @vadimwe worked for me. Thanks a lot!

  • Solution by @vadimwe worked for me! 👍

    in APPNAME/ios/App/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh replaced source="$(readlink "${source}")" with source="$(readlink -f "${source}")"

  • Nice to help you guys 🫡

Replies

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

  • Sorry, changed to reply above

Add a Comment

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

Having the same issue with Xcode 14.3

Add a Comment

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

  • Please provide list of your *-frameworks.sh files. You need to make changes in all files

  • It doesn't work for me either. Made the change in all the -frameworks.sh files (I have only one).

  • Try to clear build folder via xCode

Add a Comment

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'.

Add a Comment

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.

  • Clear build folder should help after update source

Add a Comment

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.

  • Thanks @vadimwe, your last comment almost fixed the issue. So:

    Try to archive $ pod deintegrate $ pod install Clear build folder via xCode Archive

    After that, this error appeared:

    "File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a"

    This answer helped to solve this issue: https://stackoverflow.com/a/75924853/69349

Add a Comment

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

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

Thanks @vadimwe! Life saver and time saver! worked for me too... I am a newbie to developing, but will we need to change it back to source="$(readlink "${source}")" at a later update to xcode? What does the code change do out of curiosity ? Thanks again for your help!

  • Nice to help you. Welcome!

  • You do not need to change it back. Fix and forget about it.

Add a Comment