2017-04-27 64 views
14

我們的Xcode Build Server失敗,不再執行任何測試。 版本8.3(8e162)Xcode構建服務器失敗。未找到配置用於測試的設備

它只是失敗的聲明:

構建服務問題

錯誤配置了用於測試的設備都沒有發現。

enter image description here

當我選擇「修復」一個被簡單地重定向到「編輯博特」 - 在機器人的設置>「設備」。有時iOS設備列表現在加載的方式比以前(立即)更長(〜15秒)。

所以,當裝置終於出現(如果他們甚至顯示)和被選中,出現以下錯誤提示: 內部錯誤更新博特,請重新配置BOT

所提供的解決方案在這裏,對我來說沒有任何問題,因爲我是在BOT登錄: xcode bots edit failed

有沒有人發現

  1. 一個原因,WH y此錯誤接縫突然發生
  2. 解決方案爲此?不幸的是,降級到較舊的xCode版本並不適合我,如下所示:https://forums.developer.apple.com/thread/76453因爲我已經獲得了用戶降級的版本。

是什麼東西突然與共享方案或什麼東西或錯誤配置可能導致問題?

之前,我確實創造了一遍又一遍的機器人,我真的想修復機器人,以保持歷史的構建等

+2

我有以下版本的同一問題 sudo xcrun xcscontrol --list-simulators

非常感謝@juke: MacOS的服務器:然後檢查它的工作5.3(16S4123), Xcode中:8.3.2 (8E2002) – TestAutomator

+0

@TestAutomator我提供了一個到forums.developer.apple的鏈接。com從8.3升級到8.3.2時有人遇到問題 - 潛在降級可能會解決問題嗎? – Lepidopteron

+0

不幸的是,原來我的MacMini也存在硬件問題,這可能是問題的根源。 – TestAutomator

回答

5

發現用戶@juce在github上提供瞭解決方案。 Link to original response in Apple Developer Forum

Here' is a link to github post explained a details by @juke

腳本的副本:

--- deviceClass.js 2017-05-05 07:10:40.000000000 -0700 
+++ deviceClass.js.NEW 2017-05-05 07:13:36.000000000 -0700 
@@ -12,6 +12,7 @@ 
    dbCoreClass = require('./dbCoreClass.js'), 
    xcsutil = require('../util/xcsutil.js'), 
    logger = require('../util/logger.js'), 
+ fs = require('fs'), 
    redisClass = require('./redisClass.js'); 

/* XCSDeviceClass object */ 
@@ -141,12 +142,11 @@ 
     query.endkey = [unitTestUUID, {}]; 
    } 

- redisClass.getDynamicQuery(req, doc_type, function DEVListRedisGetDynamicQuery(err, docs) { 
-  if (err) { 
-   opFailed(err); 
-  } else if (docs) { 
+ var devicesFile = '/Library/Developer/XcodeServer/Logs/xcs_devices.json'; 
+ fs.readFile(devicesFile, 'utf8', function (err,docs) { 
+  if (docs) { 
      docs = JSON.parse(docs); 
-   log.info('Found', docs.length, 'devices in Redis.'); 
+   log.info('Found', docs.length, 'devices in file-system cache.'); 
      opSucceeded(docs); 
     } else { 
      log.debug('No devices found in Redis. Falling back to CouchDB.'); 
@@ -167,9 +167,12 @@ 
       } else { 
        log.info('Found', docs.length, 'devices in CouchDB.'); 

-     redisClass.setDynamicQuery(req, doc_type, JSON.stringify(docs), function DEVListRedisSetDynamicQuery(err, wasSaved) { 
-      if (wasSaved) { 
-       log.debug('Successfully cached devices to Redis.'); 
+     fs.writeFile(devicesFile, JSON.stringify(docs), 'utf8', function(err) { 
+      if (err) { 
+       log.debug('Problem saving devices into ' + devicesFile); 
+      } 
+      else { 
+       log.debug('Successfully cached devices to file.'); 
         } 
         // Even if there's an error (i.e. Redis suddenly went down), we can still continue since 
         // the next request would be redirected to CouchDB. 

如何申請。下載或複製此腳本,和路徑已經存在的文件是這樣的:

[sudo] cd /Library/Developer/XcodeServer/CurrentXcodeSymlink/Contents/Developer/usr/share/xcs/xcsd/classes 
    patch deviceClass.js /path/to/xcs-tweaks/xcs-devices-patch.diff 

然後,重新啓動模擬器,並可能重新啓動計算機(這是我的情況)。不管你是誰:)

+0

工程就像一個魅力。謝謝 –

相關問題