ios - errSecInternalComponent 命令 CodeSign 失败,退出代码为 65

标签 ios xcode cordova code-signing cordova-ios

运行cordova build ios --device --release给我留下:

...

CodeSign /Users/birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-eihflkqaiafhhrgatfbnarfxvrlb/Build/Intermediates.noindex/ArchiveIntermediates/мојЧоек/InstallationBuildProductsLocation/Applications/мојЧоек.app (in target: мојЧоек)
    cd /Users/birowsky/Desktop/the-real-frontend/cordova/platforms/ios
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity:     "iPhone Developer: Daniel Popeski (29B4H8BSP5)"
Provisioning Profile: "iOS Team Provisioning Profile: com.gotaguydev"
                      (b127e78b-f124-4f9a-be66-2411c56b73b6)

    /usr/bin/codesign --force --sign 2DEE62DC0A8710012CE44EC751490177B7C2467D --entitlements /Users/birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-eihflkqaiafhhrgatfbnarfxvrlb/Build/Intermediates.noindex/ArchiveIntermediates/мојЧоек/IntermediateBuildFilesPath/мојЧоек.build/Release-iphoneos/мојЧоек.build/мојЧоек.app.xcent --timestamp=none /Users/birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-eihflkqaiafhhrgatfbnarfxvrlb/Build/Intermediates.noindex/ArchiveIntermediates/мојЧоек/InstallationBuildProductsLocation/Applications/мојЧоек.app
/Users/birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-eihflkqaiafhhrgatfbnarfxvrlb/Build/Intermediates.noindex/ArchiveIntermediates/мојЧоек/InstallationBuildProductsLocation/Applications/мојЧоек.app: errSecInternalComponent
Command CodeSign failed with a nonzero exit code

** ARCHIVE FAILED **


The following build commands failed:
    CodeSign /Users/birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-eihflkqaiafhhrgatfbnarfxvrlb/Build/Intermediates.noindex/ArchiveIntermediates/мојЧоек/InstallationBuildProductsLocation/Applications/мојЧоек.app
(1 failure)
xcodebuild: Command failed with exit code 65

这是我的build.json :
{
  "ios": {
    "debug": {
      "developmentTeam": "ABCDEFGHIJKL",
      "codeSignIdentity": "iPhone Developer",
      "packageType": "development",
      "automaticProvisioning": true,
      "buildFlag": [
        "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
        "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
        "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
      ]
    },
    "release": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "ABCDEFGHIJKL",
      "packageType": "app-store",
      "automaticProvisioning": true,
      "buildFlag": [
        "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
        "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
        "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
      ]
    }
  },
  "android": {
    "release": {
      "keystore": "./app-name-release-key.keystore",
      "storePassword": "Some password",
      "alias": "app-name",
      "password" : "Some other password"
    }
  }
}

同一项目在本地成功构建,但不在远程 Mac Mini 上。

我还应该指出,在构建过程的早期,这些东西会被打印出来:
...

Build settings from command line:
    ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
    CONFIGURATION_BUILD_DIR = /Users/birowsky/Desktop/the-real-frontend/cordova/platforms/ios/build/device
    EMBEDDED_CONTENT_CONTAINS_SWIFT =  YES
    LD_RUNPATH_SEARCH_PATHS =  "@executable_path/Frameworks"
    SHARED_PRECOMPS_DIR = /Users/birowsky/Desktop/the-real-frontend/cordova/platforms/ios/build/sharedpch

2019-03-07 20:48:00.501 xcodebuild[30466:1537327]  DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7ff8de7c4510; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
2019-03-07 20:48:00.502 xcodebuild[30466:1537327]  DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired.  Please log in." UserInfo={payload=<CFBasicHash 0x7ff8de58ff70 [0x7fff968df8f0]>{type = mutable dict, count = 9,
entries =>
    0 : responseId = <CFString 0x7ff8de590e60 [0x7fff968df8f0]>{contents = "fcc5bc1e-b847-4eac-af05-b531e2a363ac"}
    2 : <CFString 0x7fff9693fc58 [0x7fff968df8f0]>{contents = "protocolVersion"} = QH65B2
    3 : <CFString 0x7ff8de590d40 [0x7fff968df8f0]>{contents = "requestUrl"} = <CFString 0x7ff8de590d80 [0x7fff968df8f0]>{contents = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"}
    6 : <CFString 0x7ff8de58b7c0 [0x7fff968df8f0]>{contents = "userLocale"} = en_US
    8 : resultCode = <CFNumber 0x1d87d3e108e998c3 [0x7fff968df8f0]>{value = +1100, type = kCFNumberSInt64Type}
    9 : userString = <CFString 0x7ff8de570bf0 [0x7fff968df8f0]>{contents = "Your session has expired.  Please log in."}
    10 : <CFString 0x7ff8de58c780 [0x7fff968df8f0]>{contents = "resultString"} = <CFString 0x7ff8de58b840 [0x7fff968df8f0]>{contents = "authentication.failed"}
    11 : httpCode = <CFNumber 0x1d87d3e108ed1cc3 [0x7fff968df8f0]>{value = +200, type = kCFNumberSInt64Type}
    12 : <CFString 0x7ff8de58b790 [0x7fff968df8f0]>{contents = "creationTimestamp"} = <CFString 0x7ff8de58ec20 [0x7fff968df8f0]>{contents = "2019-03-07T20:48:00Z"}
}
, NSLocalizedDescription=Your session has expired.  Please log in.}
2019-03-07 20:48:01.432 xcodebuild[30466:1537327]  DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7ff8e10416b0; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
2019-03-07 20:48:01.432 xcodebuild[30466:1537327]  DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired.  Please log in." UserInfo={payload=<CFBasicHash 0x7ff8de7cbb70 [0x7fff968df8f0]>{type = mutable dict, count = 9,
entries =>
    0 : responseId = <CFString 0x7ff8de796b40 [0x7fff968df8f0]>{contents = "7327ecd9-8984-4c14-bc79-86c9908073e7"}
    2 : <CFString 0x7fff9693fc58 [0x7fff968df8f0]>{contents = "protocolVersion"} = QH65B2
    3 : <CFString 0x7ff8de780b80 [0x7fff968df8f0]>{contents = "requestUrl"} = <CFString 0x7ff8de78e740 [0x7fff968df8f0]>{contents = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"}
    6 : <CFString 0x7ff8de7c3c10 [0x7fff968df8f0]>{contents = "userLocale"} = en_US
    8 : resultCode = <CFNumber 0x1d87d3e108e998c3 [0x7fff968df8f0]>{value = +1100, type = kCFNumberSInt64Type}
    9 : userString = <CFString 0x7ff8de779120 [0x7fff968df8f0]>{contents = "Your session has expired.  Please log in."}
    10 : <CFString 0x7ff8de7bf760 [0x7fff968df8f0]>{contents = "resultString"} = <CFString 0x7ff8de7a2240 [0x7fff968df8f0]>{contents = "authentication.failed"}
    11 : httpCode = <CFNumber 0x1d87d3e108ed1cc3 [0x7fff968df8f0]>{value = +200, type = kCFNumberSInt64Type}
    12 : <CFString 0x7ff8de788470 [0x7fff968df8f0]>{contents = "creationTimestamp"} = <CFString 0x7ff8de78fc60 [0x7fff968df8f0]>{contents = "2019-03-07T20:48:01Z"}
}
, NSLocalizedDescription=Your session has expired.  Please log in.}
note: Using new build system
note: Planning build
note: Constructing build description
CreateBuildDirectory /Users/birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-eihflkqaiafhhrgatfbnarfxvrlb/Build/Intermediates.noindex/ArchiveIntermediates/мојЧоек/IntermediateBuildFilesPath (in target: CordovaLib)
    cd /Users/birowsky/Desktop/the-real-frontend/cordova/platforms/ios/CordovaLib
    builtin-create-build-directory /Users/birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-eihflkqaiafhhrgatfbnarfxvrlb/Build/Intermediates.noindex/ArchiveIntermediates/мојЧоек/IntermediateBuildFilesPath

...


我还尝试使用以下命令清理平台:cordova clean ios ,这就是我得到的:
Running command: xcodebuild -project мојЧоек.xcodeproj -configuration Debug -alltargets clean
note: Using new build system
error: Could not delete `/Users/birowsky/Desktop/the-real-frontend/cordova/platforms/ios/build` because it was not created by the build system.

** CLEAN FAILED **

xcodebuild: Command failed with exit code 65

最佳答案

原始问题中没有提到 ssh 连接。很高兴我们能够弄清楚!

来自 Apple 的“ 使用 Xcode 进行测试 ”指南:
Using ssh with xcodebuild

Invoking xcodebuild from a remote login with ssh (or from a launch demon) fails unless the correct session environment is created on the host.

An “Aqua session” environment is created when you interactively log into your macOS system as a user. Aqua sessions initialize the infrastructure of the macOS interactive environment; they are required in order to be able to run macOS apps. To be more specific, code using UI frameworks (AppKit or UIKit) needs to run in an Aqua session. Because of this requirement, testing on macOS (and also testing on the Simulator, itself a macOS app) requires an Aqua session



有三个选项:
  • 将 Xcode 服务器与 Xcode Bot 一起使用 - Apple 支持和推荐的选项
  • 使用与 CI 服务器的 Aqua session
  • 使用 security unlock-keychain 解锁钥匙串(keychain)并跌跌撞撞直到下一期。
  • 关于ios - errSecInternalComponent 命令 CodeSign 失败,退出代码为 65,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55052775/

    相关文章:

    objective-c - Xcode 的 LLDB 调试器中的 "p"和 "po"有什么区别?

    iphone - 如何在iPhone上临时保存数据?

    javascript - phonegap 中的数据库 View

    javascript - onsen-ui 实​​现不同页面不同的滑动菜单

    ios - swift 中的 alertControllers

    ios - 如何定义可以从两个不同的类初始化的变量?

    ios - 如何停止触摸Ended : withEvent: propogate from subView to ViewController?

    ios - 如何以编程方式折叠 UIView?

    iphone - 雪豹和 XCode 3.1

    android - 视频标签本地文件下载 Cordova Android