🚚

[Codemagic]Asset validation failed Invalid sdk value.でPublishできない

2024/11/19に公開

エラー内容

Upload "/Users/builder/clone/app/build/ios/ipa/xxxxx.ipa" to App Store Connect
Running altool at path '/Applications/Xcode-16.2.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Frameworks/AppStoreService.framework/Support/altool'...
Running altool at path '/Applications/Xcode-16.2.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Frameworks/AppStoreService.framework/Support/altool'...
2024-11-19 01:09:18.908 *** Error: [ContentDelivery.Uploader.xxxxxxxxxxxx] Asset validation failed (90512) Invalid sdk value. The value provided for the sdk portion of LC_BUILD_VERSION in Runner.app/Frameworks/App.framework/App is 18.2 which is greater than the maximum allowed value of 18.1. (ID: xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx)
2024-11-19 01:09:19.064 [ContentDelivery.Uploader.xxxxxxxxxxxx]
=============
UPLOAD FAILED with 1 error.
=============
{"tool-version":"8.003.16003","tool-path":"/Applications/Xcode-16.2.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework","os-version":"15.1.0","product-errors":[{"message":"Asset validation failed","userInfo":{"NSUnderlyingError":"Error Domain=IrisAPI Code=-19241 "Asset validation failed" UserInfo={status=409, detail=Invalid sdk value. The value provided for the sdk portion of LC_BUILD_VERSION in Runner.app/Frameworks/App.framework/App is 18.2 which is greater than the maximum allowed value of 18.1., id=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx,
code=STATE_ERROR.VALIDATION_ERROR.90512, title=Asset validation failed, NSLocalizedFailureReason=Invalid sdk value. The value provided for the sdk portion of LC_BUILD_VERSION in Runner.app/Frameworks/App.framework/App is 18.2 which is greater than the maximum allowed value of 18.1., NSLocalizedDescription=Asset validation failed}","NSLocalizedDescription":"Asset validation failed","iris-code":"STATE_ERROR.VALIDATION_ERROR.90512","NSLocalizedFailureReason":"Invalid sdk value. The value provided for the sdk portion of LC_BUILD_VERSION in Runner.app/Frameworks/App.framework/App is 18.2 which is greater than the maximum allowed value of 18.1. (ID: xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx)"},"code":90512}]}

11/12時点では下記環境でビルドできていたが、11/18にビルドが通らなくなった。
もうすぐiOS18.2の正式リリースされることが影響受けてる?

Codemagic環境

No user-defined environment variables were set

== Use Xcode 16.2 ==
> sudo xcode-select --switch /Applications/Xcode-16.2.app/Contents/Developer
Xcode 16.2
Build version 16C5013f

== Use CocoaPods version 1.16.2 ==
> gem uninstall cocoapods --executables --all
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-1.15.2

> gem install cocoapods --version 1.16.2
Successfully installed cocoapods-core-1.16.2
Successfully installed cocoapods-1.16.2
Parsing documentation for cocoapods-core-1.16.2
Installing ri documentation for cocoapods-core-1.16.2
Parsing documentation for cocoapods-1.16.2
Installing ri documentation for cocoapods-1.16.2
Done installing documentation for cocoapods-core, cocoapods after 1 seconds
2 gems installed

> gem list '^cocoapods$' --no-verbose
cocoapods (1.16.2)

== Use Java version 17 ==
> java -version
openjdk version "17.0.13" 2024-10-15 LTS
OpenJDK Runtime Environment Zulu17.54+21-CA (build 17.0.13+11-LTS)
OpenJDK 64-Bit Server VM Zulu17.54+21-CA (build 17.0.13+11-LTS, mixed mode, sharing)

== Codemagic CLI tools ==
> codemagic-cli-tools version
codemagic-cli-tools 0.54.4
Flutter 3.24.5 • Dart 3.5.4

解決方法

XCodeを16.2から16.1へ変更したらPublishでけた :)

(11/22追記)
CodemagicのQ&Aで問い合わせして自己解決してCloseしたら他にも同じタイミングでエラーになってる人いた
https://github.com/orgs/codemagic-ci-cd/discussions/2839#discussioncomment-11336011

Discussion