I am aware this is known issue, and answers were attempted couple of times, but this time I found conditions which I feel are strange. The logs tell the dreaded Error 65 and errSecInternalComponent
when code-signing first Pod.
bundle exec fastlane appstore
, it FAILS
I have security unlock-keychain
command included in shell script to right before building.
bundle update export FASTLANE_DISABLE_COLORS=1 export APP_IDENTIFIER=com.example.MyApp security unlock-keychain -p topsecret ~/Library/Keychains/codesign.keychain && bundle exec fastlane appstore
I also tried other voodoo, like doing other magic with keychain
When ran directly on CI server console (or via remote desktop) it runs flawlessly, not prompting for user passwords etc. I wonder what makes the difference?
Fastlane version is 2.106.0 (up to date).
The build fails like for other users, when executing Embed Pods Frameworks:
▸ Running script '[CP] Embed Pods Frameworks' ** ARCHIVE FAILED ** The following build commands failed: PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build/Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/IntermediateBuildFilesPath/BackOffice.build/Release-iphoneos/BackOffice.build/Script-7E4F6707694226143D2E7E0B.sh (1 failure) [15:59:39]: Exit status: 65 +---------------+-------------------------+ | Build environment | +---------------+-------------------------+ | xcode_path | /Applications/Xcode.app | | gym_version | 2.106.2 | | export_method | app-store | | sdk | iPhoneOS11.4.sdk | +---------------+-------------------------+ [15:59:39]: ▸ total size is 481485 speedup is 1.00 [15:59:39]: ▸ Code Signing /Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build/Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/InstallationBuildProductsLocation/Applications//BackOffice.app/Frameworks/ACEExpandableTextCell.framework with Identity iPhone Distribution: MyCompany Inc. (XXXXXXXXXX) [15:59:39]: ▸ /usr/bin/codesign --force --sign CB480CDBA0169C56DA9597D6941095F254D89B3B --preserve-metadata=identifier,entitlements '/Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build/Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/InstallationBuildProductsLocation/Applications//BackOffice.app/Frameworks/ACEExpandableTextCell.framework' [15:59:39]: ▸ /Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build/Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/InstallationBuildProductsLocation/Applications//BackOffice.app/Frameworks/ACEExpandableTextCell.framework: errSecInternalComponent [15:59:39]: ▸ Command /bin/sh failed with exit code 1
I had the same issue on my Jenkins server. To fix it I used the following flag in my match action
keychain_password: "my_Mac_Password"
I took it out once I was able to make it work once.
You can also try the unlock_keychain action if you are not using match.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With