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

Same issue with Flutter and xcode 14.3, 14.2 not affected

Hello,

Tested again with xCode 14.3 beta 2, and still have the same issue :(

Any idea please ?

Any solution for this issue?

Seeing same with Xcode Version 14.3 beta 2 (14E5207e)

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/***/Library/Developer/Xcode/DerivedData/***/Build/Intermediates.noindex/ArchiveIntermediates/Staging/IntermediateBuildFilesPath/**.build/Release-iphoneos/*.build/Script-887C37B6C54D972D35131B16.sh (in target '**' from project '**')

    

    /bin/sh -c /Users/***/Library/Developer/Xcode/DerivedData/......./Script-887C37B6C54D972D35131B16.sh



Symlinked...

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

building file list ... rsync: link_stat "/Users/***/***App/iOSRelease/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.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





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



building file list ... rsync: link_stat "/Users/***/***App/iOSRelease/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.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


For the archive issue with Xcode beta, raised an issue at https://github.com/CocoaPods/CocoaPods/issues/11808

Is this an Xcode beta issue with CocoaPods or the CocoaPods need an update using Xcode beta?

Same issue here with Xcode 14.3 Beta 3

Hi, we are seeing the same problem with Xcode betas 14E5197f, 14E5207e and 14E5215g. When using 14C18 there is no error. As part of our diagnosis, we went through the laborious task of creating each 'missing' folder in ../../../IntermediateBuildFilesPath, even though obviously there should be no folders written there during build. Eventually you can get a build to run, but the app will not start successfully.

Same issue here

Same here with Xcode 14.3 RC

I have a similar issue, it seems to be related to cocoa pods, there is a ticket about the problem here: https://github.com/CocoaPods/CocoaPods/issues/11808#issuecomment-1481244508

a pull request with a potential fix has already been submited by a github user: https://github.com/CocoaPods/CocoaPods/pull/11828

if you scroll down you will find a comment by another github user with a temporary solution which is to downgrade to xcode build tools from 14.3 to 14.2 for builds (works for both builds in the IDE and below is a screenshot for builds in the xcode cloud): https://github.com/CocoaPods/CocoaPods/issues/11808#issuecomment-1481244508

I wasn't expecting a fix with this, but just adding Xcode 14.3 RC2 still has same issue.

And now we have this bug in public update 14.3. How to fix this issue?

Build success but archive failed.

I have also experienced this issue, any workaround?

Accepted Answer

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

248

I had the same issue. Solution by @vadimwe worked for me. Thanks a lot!

Always nice to help you guys 🫡

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