2015-11-03 52 views
7

我在另一臺計算機上設置了遠程Git存儲庫和Xcode服務器,然後在Xcode中創建了一個bot。 每次我嘗試做一個新的整合時,出現這樣的錯誤:打開導入文件模塊<framework>:權限被拒絕

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

如果我在這個文件發表評論的一切,機器人開始顯示了另一個框架(另有.swift文件),同樣的錯誤。它可以是Swift或Objective-C框架。

Search Paths這個項目是:$(PROJECT_DIR),並Always Search User Paths設置爲Yes

我使用的Xcode 7.2 Beta 2中,但我面臨的Xcode 7.1從App Store同樣的問題。我嘗試重新啓動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 
+0

同樣適用於我。你在使用迦太基還是Cocoapods? – beseder

+0

@beseder不,我沒有使用任何依賴管理器。 –

+0

如果您進入Library/Developer/Xcode Server中的Xcode Server文件夾,有一個Logs文件夾,您可以打開構建日誌並查看關於其具有 – bolnad

回答

2

我有同樣的錯誤,當我試圖建立和運行測試,爲自己的持續集成服務器(Xcode的服務機器人)的框架。將我的服務器應用程序升級到版本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

之後,它構建和測試運行成功。

從你的日誌中我看不出你是否使用靈活 - 如果你不這樣做,那就意味着問題在別的地方,而我剛剛經歷了它的另一個啓示。

我還是不明白爲什麼在整合過程中問題只發生在構建服務器上。即使我登錄到構建機器,請查看源代碼,並使用Xcode在那裏構建它 - 一切都很好。它僅在整合期間在機器人上失敗。該解決方案並非理想的另一個原因:Nimble必須在每次集成之前重建,並且不能只包含在源代碼中(如果發現這是更好的方法)。

如果我希望別人會找到實際的解決方案。我不會責怪敏捷 - 這是最確定的事情的組合。

我創建了一個示例項目,其中更詳細地描述了問題和解決方案。它可以在這裏找到:https://github.com/mczenko/NimbleCarthageProblem

相關問題