xctest client proxy error with: Error: read ECONNRESET
-
Macaca Version: 2.1.12
-
Macaca Doctor Logs:
macaca-doctor version: 2.0.16
Node.js checklist:
node env: /usr/local/bin/node
node version: v10.15.3
iOS checklist:
Xcode Command Line Tools is ready, version: 2354.
xcodebuild version: 10.2
iproxy[usbmuxd] is installed at: `/usr/local/bin/iproxy`
ios_webkit_debug_proxy is installed at: `/usr/local/bin/ios_webkit_debug_proxy`
Android checklist:
JAVA version is `1.8`
JAVA_HOME is set to `/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home`
ANDROID_HOME is set to `/Users/XXX/Library/Android/sdk`
Platforms is set to `/Users/XXX/Library/Android/sdk/platforms/android-28`
ADB tool is set to `/Users/XXX/Library/Android/sdk/platform-tools/adb`
gradle is installed, version: 5.1
Installed driver list:
android: 2.1.0
location: /Users/XXX/npm-global/lib/node_modules/macaca-android
ios: 2.0.35
location: /Users/XXX/npm-global/lib/node_modules/macaca-ios
-
Operate System: MAC OS 10.14.5
-
Programming Language: Python
run macaca server --verbose
index.js:15:12 [master] pid:86802 webdriver server start with config: { port: 3456, verbose: true, always: true, ip: '7.0.xxx.41', host: '34363bc9e554.ant.xxx.xxx', loaded_time: '2019-05-29 16:31:01' } middlewares.js:17:10 [master] pid:86802 base middlewares attached router.js:132:10 [master] pid:86802 router set Macaca server started responseHandler.js:11:12 [master] pid:86802 Recieve HTTP Request from Client[2019-05-29 16:31:39]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"udid":"b29eee80cad2e09e78aa1d7b3b3b5948c7daeca0","deviceName":"iPhone","app":"/Users/XXX/Downloads/new-auto-cn-resigned.app","platformName":"ios","browserName":""}} session.js:58:10 [master] pid:86802 Creating session, sessionId: fd9019f8-5023-409b-a313-fae2601ca4cd. ios-deploy helper.js:207:14 [master] pid:86802 Using local app form /Users/XXX/Downloads/new-auto-cn-resigned.app CFBundleIdentifier is com.xxx.xxx Get bundleId com.xxx.xxx from plist /Users/XXX/Downloads/new-auto-cn-resigned.app/Info.plist macaca-ios.js:283:12 [master] pid:86802 App 'com.xxx.xxx' is not installed. macaca-ios.js:286:14 [master] pid:86802 Install app 'com.xxx.xxx' successfully. BundleId XCTestWD.XCTestWD does not exist. macaca-ios.js:162:10 [master] pid:86802 { "bundleId": "com.XXX.XXX”, "platformName": "ios" } xctest-client.js:56:14 [master] pid:86802 project path: /Users/XXX/npm-global/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj macaca-ios.js:171:12 [master] pid:86802 Trying to start xctestwd server... xctest-client.js:283:14 [master] pid:86802 xcode version: 10.2 XCTestWD version: 1.4.18 xctest-client.js:227:20 [master] pid:86802 hitted for default mode xctest-client.js:230:20 [master] pid:86802 please check project: /Users/XXX/npm-global/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj xctestwd start with port: 8001 proxy.js:55:14 [master] pid:86802 Proxy: /wd/hub/session:POST to http://127.0.0.1:8001/wd/hub/session:POST with body: {"desiredCapabilities":{"bundleId":"com.xxx.xxx","platformName":"ios"}} proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET xctest-client.js:230:20 [master] pid:86802 please check project: /Users/XXX/npm-global/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj xctest-client.js:230:20 [master] pid:86802 please check project: /Users/XXX/npm-global/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj xctest-client.js:230:20 [master] pid:86802 please check project: /Users/XXX/npm-global/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj xctest-client.js:230:20 [master] pid:86802 please check project: /Users/XXX/npm-global/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET proxy.js:85:20 [master] pid:86802 Got response with status 200: {"status":0,"value":{"capabilities":{"browserName":"xxx Debug","sdkVersion":"11.2.6","CFBundleIdentifier":"com.XXX.XXX”,”device":"iphone"},"sessionId":"BE799F8A-D574-4405-A13B-FEEAD1E06B... responseHandler.js:49:14 [master] pid:86802 Send HTTP Respone to Client[2019-05-29 16:32:56]: {"sessionId":"fd9019f8-5023-409b-a313-fae2601ca4cd","status":0,"value":"{"udid":"b29eee80cad2e09e78aa1d7b3b3b5948c7daeca0","deviceName":"iPhone","app":"/Users/XXX/Downloads/new-auto-cn-resigned.app","platformName":"ios","browserName":""}"} responseHandler.js:11:12 [master] pid:86802 Recieve HTTP Request from Client[2019-05-29 16:32:56]: method: POST url: /wd/hub/session, jsonBody: {"session_id":"fd9019f8-5023-409b-a313-fae2601ca4cd","desiredCapabilities":{"udid":"b29eee80cad2e09e78aa1d7b3b3b5948c7daeca0","deviceName":"iPhone","app":"/Users/XXX/Downloads/new-auto-cn-resigned.app","platformName":"ios","browserName":""}} session.js:58:10 [master] pid:86802 Creating session, sessionId: 5042aa5d-9434-418e-8fb6-0e3f3e28904e. helper.js:207:14 [master] pid:86802 Using local app form /Users/XXX/Downloads/new-auto-cn-resigned.app CFBundleIdentifier is com.XXX.XXX Get bundleId com.XXX.XXX from plist /Users/XXX/Downloads/new-auto-cn-resigned.app/Info.plist macaca-ios.js:250:12 [master] pid:86802 App "com.XXX.XXX" is already installed. macaca-ios.js:251:12 [master] pid:86802 Adopting app reuse strategy: 1. macaca-ios.js:258:18 [master] pid:86802 Uninstall app "com.XXX.XXX".
@xinxinga 改下desiredCapabilities 里面的bundleId 试试。
This is the translated issue comment: @paradite
@xinxinga Try changing the bundleId inside desiredCapabilities .
@xinxinga 改下
desiredCapabilities里面的bundleId试试。 改成什么? bundleId 是测试app的正确显示,我只是在这里提issue用xxx.xxx代替了
This is the translated issue comment: @xinxinga
@xinxinga Try changing the
bundleIdinsidedesiredCapabilities. What changed? bundleId is the correct display of the test app, I just mentioned here that the issue is replaced with xxx.xxx
错误应该不在bundleId,根据log显示,没安装-》就去安装,提示已安装-》就先uninstall,再install...这块都能正确处理。测试app 能够正确安装,并成功launch,但是之后log就报错了,case没办法运行 proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET
This is the translated issue comment: @xinxinga
The error should not be in the bundleId, according to the log display, not installed - "Go to the installation, the prompt has been installed -" first uninstall, then install... This block can be handled correctly. The test app can be installed correctly and successfully launched, but after the log is reported, the case can't run. Proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET
@xinxinga 你这个看不出错误啊,read ECONNRESET后面不是又有新的log了吗?还是中间你操作了?
有同学反映改bundleId就行了,随便什么都行,你试试。具体为什么我也不明白。我不是iOS开发。
This is the translated issue comment: @paradite
@xinxinga You can't see the error, read ECONNRESET isn't there a new log? Or are you operating in the middle?
Some students have reflected that changing bundleId will do. Anyway, you can try it. Why don't I understand why? I am not an iOS developer.
xcode 里运行也正常
2019-05-29 18:00:00.083082+0800 XCTestWDUITests-Runner[2508:144123] +[CATransaction synchronize] called within transaction
2019-05-29 18:00:00.147444+0800 XCTestWDUITests-Runner[2508:144123] Running tests...
2019-05-29 18:00:00.689441+0800 XCTestWDUITests-Runner[2508:144123] Continuing to run tests in the background with task ID 1
Test Suite 'Selected tests' started at 2019-05-29 18:00:01.330
Test Suite 'XCTestWDUITests.xctest' started at 2019-05-29 18:00:01.333
Test Suite 'XCTextWDRunner' started at 2019-05-29 18:00:01.333
Test Case '-[XCTestWDUITests.XCTextWDRunner testRunner]' started.
t = 0.00s Start Test at 2019-05-29 18:00:01.337
t = 0.20s Set Up
2019-05-29 18:00:01.621452+0800 XCTestWDUITests-Runner[2508:144123] initializing wd server
2019-05-29 18:00:01.631511+0800 XCTestWDUITests-Runner[2508:144123] check log dir @:["/var/mobile/Containers/Data/Application/2A2E5621-703E-4494-B07A-EABFABE8E4BA/Documents"]
2019-05-29 18:00:01:640 XCTestWDUITests-Runner[2508:144123] XCTestWD-Debug-Info:
setup debug log
2019-05-29 18:00:01.641814+0800 XCTestWDUITests-Runner[2508:144151] XCTestWD-Debug-Info:
setup debug log
2019-05-29 18:00:01.666210+0800 XCTestWDUITests-Runner[2508:144123] com.apple.test.XCTestWDUITests-Runner
2019-05-29 18:00:01.666445+0800 XCTestWDUITests-Runner[2508:144123] XCTestWDSetup->http://localhost:8001<-XCTestWDSetup
This is the translated issue comment: @xinxinga
Running in xcode is also normal
2019-05-29 18:00:00.083082+0800 XCTestWDUITests-Runner[2508:144123] +[CATransaction synchronize] called within transaction
2019-05-29 18:00:00.147444+0800 XCTestWDUITests-Runner[2508:144123] Running tests...
2019-05-29 18:00:00.689441+0800 XCTestWDUITests-Runner[2508:144123] Continuing to run tests in the background with task ID 1
Test Suite 'Selected tests' started at 2019-05-29 18:00:01.330
Test Suite 'XCTestWDUITests.xctest' started at 2019-05-29 18:00:01.333
Test Suite 'XCTextWDRunner' started at 2019-05-29 18:00:01.333
Test Case '-[XCTestWDUITests.XCTextWDRunner testRunner]' started.
t = 0.00s Start Test at 2019-05-29 18:00:01.337
t = 0.20s Set Up
2019-05-29 18:00:01.621452+0800 XCTestWDUITests-Runner[2508:144123] initializing wd server
2019-05-29 18:00:01.631511+0800 XCTestWDUITests-Runner[2508:144123] check log dir @:["/var/mobile/Containers/Data/Application/2A2E5621-703E-4494-B07A-EABFABE8E4BA/Documents" ]
2019-05-29 18:00:01:640 XCTestWDUITests-Runner[2508:144123] XCTestWD-Debug-Info:
Setup debug log
2019-05-29 18:00:01.641814+0800 XCTestWDUITests-Runner[2508:144151] XCTestWD-Debug-Info:
Setup debug log
2019-05-29 18:00:01.666210+0800 XCTestWDUITests-Runner[2508:144123] com.apple.test.XCTestWDUITests-Runner
2019-05-29 18:00:01.666445+0800 XCTestWDUITests-Runner[2508:144123] XCTestWDSetup->http://localhost:8001<-XCTestWDSetup
@xinxinga 你这个看不出错误啊,
read ECONNRESET后面不是又有新的log了吗?还是中间你操作了? 有同学反映改bundleId就行了,随便什么都行,你试试。具体为什么我也不明白。我不是iOS开发。
read ECONNRESET一直是这个错,retry 10次 就结束了,我中间没有做操作,测试完全没有执行。
bundleId 在哪儿改?
This is the translated issue comment: @xinxinga
@xinxinga You can't see the error,
read ECONNRESETisn't there a new log? Or are you operating in the middle? Some students have reflected that changingbundleIdwill do. Anyway, you can try it. Why don't I understand why? I am not an iOS developer.
read ECONNRESET has always been this fault, retry 10 times is over, I did not do the operation, the test is not executed at all.
Where is the bundleId changed?
@xinxinga 在配置driver的时候应该有设置的:
https://macacajs.github.io/guide/helpful-settings.html#desired-capabilities
你只跑了macaca server?还有个client在跑,给server提供这些参数。
This is the translated issue comment: @paradite
@xinxinga should be set when configuring the driver:
Https://macacajs.github.io/guide/helpful-settings.html#desired-capabilities
You only ran macaca server? There is also a client running, providing these parameters to the server.
你的log是完整的嘛?如果报错应该停在
proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET
但是你的log是接着跑的啊,最后是
macaca-ios.js:258:18 [master] pid:86802 Uninstall app "com.XXX.XXX".
你具体是怎么执行的?是不是有别的脚本在跑?
This is the translated issue comment: @paradite
Is your log complete? If the error should stop at
proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET
But your log is running, and finally
macaca-ios.js:258:18 [master] pid:86802 Uninstall app "com.XXX.XXX".
How do you specifically implement it? Is there another script running?
@xinxinga 在配置driver的时候应该有设置的: https://macacajs.github.io/guide/helpful-settings.html#desired-capabilities 你只跑了
macaca server?还有个client在跑,给server提供这些参数。
我是跑了client test 的,我前面说了,我执行测试,但是case完全跑不起来。 如果单纯macaca server, log 就只有:
>> index.js:15:12 [master] pid:6636 webdriver server start with config:
{ port: 3456,
verbose: true,
always: true,
ip: '192.168.0.103',
host: '34363bc9e554.ant.amazon.com',
loaded_time: '2019-05-29 19:44:20' }
>> middlewares.js:17:10 [master] pid:6636 base middlewares attached
>> router.js:132:10 [master] pid:6636 router set
>> Macaca server started
This is the translated issue comment: @xinxinga
@xinxinga should be set when configuring the driver: https://macacajs.github.io/guide/helpful-settings.html#desired-capabilities You just ran
macaca server? There is also a client running, providing these parameters to the server.
I ran the client test, I said before, I performed the test, but the case could not run completely. If you just use macaca server, log only has:
>> index.js:15:12 [master] pid:6636 webdriver server start with config:
{ port: 3456,
Verbose: true,
Always: true,
Ip: '192.168.0.103',
Host: '34363bc9e554.ant.amazon.com',
Loaded_time: '2019-05-29 19:44:20' }
>> middlewares.js:17:10 [master] pid:6636 base middlewares attached
>> router.js:132:10 [master] pid:6636 router set
>> Macaca server started
你的log是完整的嘛?如果报错应该停在
proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET但是你的log是接着跑的啊,最后是macaca-ios.js:258:18 [master] pid:86802 Uninstall app "com.XXX.XXX".你具体是怎么执行的?是不是有别的脚本在跑?
是的,我在跑测试case,只是一直跑不起来,提示read ECONNRESET
最后不是停留在macaca-ios.js:258:18 [master] pid:86802 Uninstall app "com.XXX.XXX".
因为我设置了retry 5次,所以后面就是循环retry,只不过错误和前面一样的。
This is the translated issue comment: @xinxinga
Is your log complete? If the error should stop at
proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESETBut your log is running, and finallymacaca-ios.js:258:18 [master] pid:86802 Uninstall app "com.XXX.XXX".How do you perform it specifically? Is there another script running?
Yes, I am running the test case, but I can't run it all the time, prompting read ECONNRESET