5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Xcode Cloudのアーカイブで`Command exited with non-zero exit-code`が出るようになった(解決済み)

Last updated at Posted at 2023-03-28

結論

Cocoapodsを利用しており、Xcode 14.3でアーカイブするとアーカイブエラーとなる。
Cocoapods1.12.1を利用すれば解決する。

背景

Xcode Cloudでビルド・アーカイブを実行したところ、ビルドは通りますが、アーカイブでエラーが出るようになっていました。

Command exited with non-zero exit-code
ログを追いかけてみると、怪しそうな記述が。

Run custom shell script '[CP] Embed Pods Frameworks'

0秒
mkdir -p /Volumes/workspace/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/LiveDevelop/BuildProductsPath/Develop-iphoneos/live.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/Sentry.framework" "/Volumes/workspace/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/LiveDevelop/InstallationBuildProductsLocation/Applications/live.app/Frameworks"

building file list ... rsync: link_stat "/Volumes/workspace/repository/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Sentry.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/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]

エラー
Command PhaseScriptExecution failed with a nonzero exit code

Command PhaseScriptExecution failed with a nonzero exit code

可能性

普段はXcode Cloudのビルド環境にLatest Releaseを指定しているので、タイミング的にXcode Cloudが14.3 RC2 (14E222b)となったことが可能性としてありそう。

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

解決

Xcode Cloudのビルド環境を`Xcode 14.2(14C18)とすることでアーカイブが通るようになりました。
image.png

所感

類似の記事を見る感じ、原因はCocoapodsとXcode14.3の問題っぽい?

解決(確認日:2023/04/21)

CocoaPods 1.12.1で確認したところ、Xcode14.3のアーカイブで問題なく通るようになりました。
https://github.com/CocoaPods/CocoaPods/releases/tag/1.12.1

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?