Xcode生成服务器失败。未找到为测试配置的设备
我们的Xcode构建服务器出现故障,不再执行任何测试。 版本8.3(8e162) 它只是不符合以下陈述: 构建服务问题 错误未找到为测试配置的设备 当我选择“修复它”时,只需在机器人的设置中重定向到“编辑机器人”->“设备”。有时,iOS设备列表现在的加载时间比以前长(约15秒)(立即) 因此,当设备最终显示(如果它们甚至显示)并被选中时,将出现以下错误提示: 更新Bot时出现内部错误,请再次尝试配置Bot 此处提供的解决方案对我来说没有问题,因为我已登录到bot: 有人找到了吗Xcode生成服务器失败。未找到为测试配置的设备,xcode,xcode8,xcode-bots,Xcode,Xcode8,Xcode Bots,我们的Xcode构建服务器出现故障,不再执行任何测试。 版本8.3(8e162) 它只是不符合以下陈述: 构建服务问题 错误未找到为测试配置的设备 当我选择“修复它”时,只需在机器人的设置中重定向到“编辑机器人”->“设备”。有时,iOS设备列表现在的加载时间比以前长(约15秒)(立即) 因此,当设备最终显示(如果它们甚至显示)并被选中时,将出现以下错误提示: 更新Bot时出现内部错误,请再次尝试配置Bot 此处提供的解决方案对我来说没有问题,因为我已登录到bot: 有人找到了吗 一个原因,
在我再次创建bot之前,我真的很想修复bot,保存构建的历史记录等。在github上找到了user@juce提供的解决方案 : 脚本副本:
--- 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
然后重新启动模拟器,并可能重新启动您的机器(这是我的情况)。然后通过以下方式检查它是否工作:
sudo xcrun xcscontrol——列出模拟器
非常感谢@juke,不管你是谁:)我的问题是我在早期版本的Xcode上安装了bot(只安装了11.2模拟器)
我在我用来运行机器人的机器上升级了Xcode版本,这台机器只安装了11.4模拟器。将模拟器更改为这些最新版本修复了此问题。我对以下版本有相同的问题:macOS服务器:5.3(16S4123),Xcode:8.3.2(8E2002)@TestAutomator我提供了一个到forums.developer.apple.com的链接,在那里有人在从8.3升级到8.3.2时遇到了问题-可能的降级可能至少可以解决您的问题吗?不幸的是,我的MacMini也有硬件问题,这可能是问题的根源。工作起来很有魅力。非常感谢。