For a couple of days, without changing any details on the project, I've been receiving this error during the Xcode publishing phase. I have also shared my code with other developers, and on their computer publishing is not a problem.
Below is the error log:
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/[USER_NAME]/Library/Developer/Xcode/DerivedData/App-faqqbffxhfofrrewfezzfuhlylqt/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Release-iphoneos/App.build/Script-9592DBEFFC6D2A0C8D5DEB22.sh (in target 'App' from project 'App')
cd /Users/[USER_NAME]/Desktop/Workspace/[APP_NAME]/ios/App
/bin/sh -c /Users/[USER_NAME]/Library/Developer/Xcode/DerivedData/App-faqqbffxhfofrrewfezzfuhlylqt/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Release-iphoneos/App.build/Script-9592DBEFFC6D2A0C8D5DEB22.sh
mkdir -p /Users/[USER_NAME]/Library/Developer/Xcode/DerivedData/App-faqqbffxhfofrrewfezzfuhlylqt/Build/Intermediates.noindex/ArchiveIntermediates/App/BuildProductsPath/Release-iphoneos/App.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/Capacitor.framework" "/Users/[USER_NAME]/Library/Developer/Xcode/DerivedData/App-faqqbffxhfofrrewfezzfuhlylqt/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.app/Frameworks"
building file list ... rsync: link_stat "/Users/[USER_NAME]/Desktop/Workspace/[APP_NAME]/ios/App/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Capacitor.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
Tried to reinstall Capacitor, rebuild the pods, the entire ios folder and project. Also uninstalled and reinstalled Xcode. I'm always stuck at the same point.