gpt4 book ai didi

xcode - 打开模块 : Permission denied 的导入文件

转载 作者:行者123 更新时间:2023-12-02 02:16:42 25 4
gpt4 key购买 nike

我在另一台计算机上设置了远程 Git 存储库和 Xcode 服务器,然后在 Xcode 中创建了一个机器人。每次我尝试进行新的集成时,都会失败并出现如下错误:

Assertion: Opening import file for module 'Accelerate': Permission denied
File: <filename>.swift:9

如果我评论此文件中的所有内容,机器人就会开始显示另一个框架(和另一个 .swift 文件)的相同错误。它可以是 Swift 或 Objective-C 框架。

此项目的

搜索路径为:$(PROJECT_DIR),并且始终搜索用户路径设置为

我使用的是 Xcode 7.2 beta 2,但我在 App Store 中的 Xcode 7.1 上遇到了同样的问题。我尝试重新启动 Xcode 以及服务器和开发 Mac,但没有帮助。该项目在我的开发机器上编译并成功运行。

服务器日志:(xcsbuildd.log)

[BuildService] Previous integration is needed but not loaded yet, fetching.
[BuildService] Previous integration loaded successfully.
[BuildService] Completed integration step XCSCheckoutIntegrationStep without error
[BuildService, Info] Asset packs will be hosted at <server url here>
[BuildService] Current server devices are needed but not loaded yet, fetching.
[BuildService] Devices loaded successfully.
[BuildService, Info] Current server platforms are needed but not loaded yet, fetching.
[BuildService, Info] Platforms loaded successfully.
[BuildService] Creating arguments list for integrate
[BuildService] Integration will not perform analyze action
[BuildService] Integration will perform test action
[BuildService] Integration use scheme-level code coverage enabled setting
[BuildService] Additional build arguments are "(
)"
[BuildService, Info] Creating test device destination arguments for device testing
[BuildService, Info] Create test device destination arguments from device specification
[BuildService, Info] Including device iPhone 6 Plus (A3E8ED2D-4D13-420E-8CE1-6D484E65CD03)
[BuildService, Info] Destination arguments are (
"-skipUnsupportedDestinations",
"-destination-timeout",
30,
"-DVTDeviceLogLevel=3",
"-DVTDeviceSearchLogLevel=3",
"-iPhoneSimulatorLogLevel=3",
"-iPhoneConnectLogLevel=3",
"-destination",
"id=A3E8ED2D-4D13-420E-8CE1-6D484E65CD03"
)
[BuildService] Integrate arguments list is (
"/usr/bin/xcrun",
xcodebuild,
test,
"-IDETestOperationsObserverDebugLogLevel=3",
"-IDEBuildOperationMaxPercentageOfConcurrentCompileTasks=80",
"-IDEBuildOperationQueueSetResourceManagementLogLevel=2",
"-DTDKSupportWirelessDevices=NO",
"-IDEPostProgressNotifications=YES",
"-DVTAllowServerCertificates=YES",
"-DVTSigningCertificateSourceLogLevel=3",
"-DVTSigningCertificateManagerLogLevel=3",
"-DTDKProvisioningProfileExtraSearchPaths=/Library/Developer/XcodeServer/ProvisioningProfiles",
"-DTDKDisableSymbolCopying=YES",
"-scheme",
Newsfeeder,
"-skipUnavailableActions",
"-project",
"/Library/Developer/XcodeServer/Integrations/Caches/1770e1afb8f775d8c92855beba002640/Source/Newsfeeder/Newsfeeder.xcodeproj",
"-derivedDataPath",
"/Library/Developer/XcodeServer/Integrations/Caches/1770e1afb8f775d8c92855beba002640/DerivedData",
"-skipUnsupportedDestinations",
"-destination-timeout",
30,
"-DVTDeviceLogLevel=3",
"-DVTDeviceSearchLogLevel=3",
"-iPhoneSimulatorLogLevel=3",
"-iPhoneConnectLogLevel=3",
"-destination",
"id=A3E8ED2D-4D13-420E-8CE1-6D484E65CD03",
"-DVTSuppressExternalDeviceLocation=NO",
"-resultBundlePath",
"/Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/xcodebuild_result.bundle"
)

[BuildService] NSTask environment: {
"DEVELOPER_DIR" = "/Library/Developer/XcodeServer/CurrentXcodeSymlink/Contents/Developer";
PATH = "/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin";
XCS = 1;
"XCS_BOT_ID" = 1770e1afb8f775d8c92855beba002640;
"XCS_BOT_NAME" = "Newsfeeder Bot";
"XCS_BOT_TINY_ID" = 8466E19;
"XCS_DERIVED_DATA_DIR" = "/Library/Developer/XcodeServer/Integrations/Caches/1770e1afb8f775d8c92855beba002640/DerivedData";
"XCS_INTEGRATION_ID" = 1770e1afb8f775d8c92855beba008e0d;
"XCS_INTEGRATION_NUMBER" = 2;
"XCS_INTEGRATION_RESULT" = unknown;
"XCS_INTEGRATION_TINY_ID" = B989BD8;
"XCS_OUTPUT_DIR" = "/Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d";
"XCS_SOURCE_DIR" = "/Library/Developer/XcodeServer/Integrations/Caches/1770e1afb8f775d8c92855beba002640/Source";
"XCS_XCODEBUILD_LOG" = "/Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/xcodebuild.log";
}

[BuildService] Running task /usr/bin/nice /usr/bin/xcrun xcodebuild test -IDETestOperationsObserverDebugLogLevel=3 -IDEBuildOperationMaxPercentageOfConcurrentCompileTasks=80 -IDEBuildOperationQueueSetResourceManagementLogLevel=2 -DTDKSupportWirelessDevices=NO -IDEPostProgressNotifications=YES -DVTAllowServerCertificates=YES -DVTSigningCertificateSourceLogLevel=3 -DVTSigningCertificateManagerLogLevel=3 -DTDKProvisioningProfileExtraSearchPaths=/Library/Developer/XcodeServer/ProvisioningProfiles -DTDKDisableSymbolCopying=YES -scheme Newsfeeder -skipUnavailableActions -project /Library/Developer/XcodeServer/Integrations/Caches/1770e1afb8f775d8c92855beba002640/Source/Newsfeeder/Newsfeeder.xcodeproj -derivedDataPath /Library/Developer/XcodeServer/Integrations/Caches/1770e1afb8f775d8c92855beba002640/DerivedData -skipUnsupportedDestinations -destination-timeout 30 -DVTDeviceLogLevel=3 -DVTDeviceSearchLogLevel=3 -iPhoneSimulatorLogLevel=3 -iPhoneConnectLogLevel=3 -destination id=A3E8ED2D-4D13-420E-8CE1-6D484E65CD03 -DVTSuppressExternalDeviceLocation=NO -resultBundlePath /Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/xcodebuild_result.bundle

[BuildService, Info] Monitoring /Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/xcodebuild.log for activity.

[BuildService, Info] Done monitoring xcodebuild.log for activity.
[BuildService] Scheme actions record is needed but not loaded yet, fetching.
[BuildService] Scheme actions record loaded successfully.
[BuildService] Completed integration step XCSBuildIntegrationStep without error
[BuildService] Last integration with build results is needed but not loaded yet, fetching.
[BuildService] Last integration with build results loaded successfully.
[BuildService] Build results summary: {
analyzerWarningChange = 0;
analyzerWarningCount = 0;
codeCoveragePercentage = 0;
codeCoveragePercentageDelta = 0;
errorChange = 0;
errorCount = 1;
improvedPerfTestCount = 0;
regressedPerfTestCount = 0;
testFailureChange = 0;
testFailureCount = 0;
testsChange = 0;
testsCount = 0;
warningChange = 0;
warningCount = 0;
}

[BuildService] Integration commit history are needed but not loaded yet, fetching.
[BuildService] Integration commits loaded successfully.
[BuildService] Completed integration step XCSProcessBuildResultsIntegrationStep without error
[BuildService] Matched device <XCSDevice 0x7fc77e82eaf0>
{"modelUTI":"com.apple.iphone-6-plus-b4b5b9","connected":"YES","modelCode":"iPhone7,1","simulator":"YES","osVersion":"9.2","modelName":"iPhone 6 Plus","supported":"YES","deviceUDID":"A3E8ED2D-4D13-420E-8CE1-6D484E65CD03","identifier":"A3E8ED2D-4D13-420E-8CE1-6D484E65CD03","enabledForDevelopment":"YES","architecture":"x86_64","isServer":"NO","tinyID":"A3E8ED2","doc_type":"device","trusted":"YES","platformIdentifier":"com.apple.platform.iphonesimulator","name":"iPhone 6 Plus","retina":"YES"} to server device <XCSDevice 0x7fc77e398d70>
{"osVersion":"9.2","connected":"YES","simulator":"YES","modelCode":"iPhone7,1","deviceType":"com.apple.iphone-simulator","modelName":"iPhone 6 Plus","revision":"6-71966f4a54eb01b83604036d5b31c53c","modelUTI":"com.apple.iphone-6-plus-b4b5b9","doc_type":"device","trusted":"YES","name":"iPhone 6 Plus","supported":"YES","identifier":"A3E8ED2D-4D13-420E-8CE1-6D484E65CD03","enabledForDevelopment":"YES","platformIdentifier":"com.apple.platform.iphonesimulator","ID":"11f2b4085b58a3769cd320245b004ab9","architecture":"x86_64","retina":"NO","isServer":"NO","tinyID":"37889F2"}

[BuildService] Processing device: <XCSDevice 0x7fc77e398d70>
{"osVersion":"9.2","connected":"YES","simulator":"YES","modelCode":"iPhone7,1","deviceType":"com.apple.iphone-simulator","modelName":"iPhone 6 Plus","revision":"6-71966f4a54eb01b83604036d5b31c53c","modelUTI":"com.apple.iphone-6-plus-b4b5b9","doc_type":"device","trusted":"YES","name":"iPhone 6 Plus","supported":"YES","identifier":"A3E8ED2D-4D13-420E-8CE1-6D484E65CD03","enabledForDevelopment":"YES","platformIdentifier":"com.apple.platform.iphonesimulator","ID":"11f2b4085b58a3769cd320245b004ab9","architecture":"x86_64","retina":"NO","isServer":"NO","tinyID":"37889F2"}
[BuildService] Completed integration step XCSProcessTestResultsIntegrationStep without error
adding: xcodebuild_result.bundle/ (stored 0%)
adding: xcodebuild_result.bundle/1_Test/ (stored 0%)
adding: xcodebuild_result.bundle/1_Test/action.xcactivitylog (stored 0%)
adding: xcodebuild_result.bundle/1_Test/build.xcactivitylog (deflated 1%)
adding: xcodebuild_result.bundle/Info.plist (deflated 79%)
[BuildService] Uploading file /Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/xcodebuild_result.bundle.zip
[BuildService] Uploading file /Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/buildService.log
[BuildService] Uploading file /Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/xcodebuild.log
[BuildService] Uploading file /Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/sourceControl.log
[BuildService] Uploading file /Library/Developer/XcodeServer/Integrations/Integration-1770e1afb8f775d8c92855beba008e0d/Session-2015-11-04_16:54:03-zpFYIF.log to relative path (null)
[BuildService] Completed integration step XCSUploadFilesIntegrationStep without error
[BuildService] Integration executor is finished. Exiting.
[BuildService] Registering build service socket listeners
[BuildService] Done registering build service socket listeners

最佳答案

当我尝试在持续集成服务器(Xcode Service Bots)上为我自己的框架构建和运行测试时,我遇到了同样的错误。将我的服务器应用程序升级到版本 5.1 (15S5127) 并将 Xcode 升级到版本 7.3 (7D175) 后首次发现该问题。

就我而言,解决方案非常令人惊讶。我花了很多时间才意识到这个问题只有在我使用 Nimble 框架时才会出现。当我从测试中删除 import Nimble 并使用标准 XCTest 断言时,问题就消失了。

对我的案例有帮助的是确保在集成之前重建 Nimble 框架。我正在使用Nimble with Carthage ,所以我只需在集成触发器之前添加以下命令:

cd NimbleCarthageProblem && /usr/local/bin/carthage bootstrap --platform iOS

另请参阅屏幕截图:

BeforeTrigger

之后,它会成功构建并测试运行。

从你的日志中我看不出你是否使用 Nimble - 如果你不使用,则意味着问题出在其他地方,而我刚刚经历了另一个启示。

我仍然不明白为什么问题只发生在集成过程中的构建服务器上。即使我登录到构建机器,查看源代码,并使用 Xcode 构建它 - 一切都很好。它仅在集成期间在机器人上失败。该解决方案并不理想的另一个原因是:Nimble 必须在每次集成之前重新构建,并且不能仅仅包含在源代码中(如果有人发现这是一种更好的方法)。

如果我希望其他人能找到实际的解决方案。我不责怪 Nimble - 这是最确定的事情的结合。

我创建了一个示例项目,其中更详细地描述了问题和解决方案。可以在这里找到:https://github.com/mczenko/NimbleCarthageProblem .

关于xcode - 打开模块 <framework> : Permission denied 的导入文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33498659/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com