Jenkins或远程登录时出现Fastlane错误65

时间:2018-10-16 14:37:11

标签: ios fastlane

我知道这是一个已知问题,已经尝试了几次,但是这次我发现自己觉得很奇怪的情况。在对第一个Pod进行代码签名时,日志会告知可怕的错误65 errSecInternalComponent

  • 在Jenkins上运行时,我的构建失败
  • 在CI计算机上手动运行,通过SSH登录并执行bundle exec fastlane appstore时,它失败
  • 当我登录远程桌面或物理访问CI计算机时,构建 SUCCEEDS

在构建之前,我已经在外壳程序脚本中包含了security unlock-keychain命令。

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

我也尝试了其他伏都教徒,例如doing other magic with keychain

直接在CI服务器控制台上(或通过远程桌面)运行时,它可以完美运行,而不提示输入用户密码等。我想知道有什么区别吗?

快速通道版本为 2.106.0 (最新)。

在执行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

1 个答案:

答案 0 :(得分:0)

我的Jenkins服务器上有同样的问题。为了解决这个问题,我在比赛动作中使用了以下标志

keychain_password: "my_Mac_Password"

一旦我能够使它工作一次,便将其取出。

如果您不使用比赛,也可以尝试unlock_keychain操作。