Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xctest client proxy error with: Error: read ECONNRESET #928

Closed
xinxinga opened this issue May 29, 2019 · 67 comments
Closed

xctest client proxy error with: Error: read ECONNRESET #928

xinxinga opened this issue May 29, 2019 · 67 comments
Assignees

Comments

@xinxinga
Copy link

  • 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".

@paradite
Copy link
Collaborator

@xinxinga 改下desiredCapabilities 里面的bundleId 试试。

@macaca-bot
Copy link

This is the translated issue comment: @paradite


@xinxinga Try changing the bundleId inside desiredCapabilities .

@xinxinga
Copy link
Author

@xinxinga 改下desiredCapabilities 里面的bundleId 试试。
改成什么? bundleId 是测试app的正确显示,我只是在这里提issue用xxx.xxx代替了

@macaca-bot
Copy link

This is the translated issue comment: @xinxinga


@xinxinga Try changing the bundleId inside desiredCapabilities .
What changed? bundleId is the correct display of the test app, I just mentioned here that the issue is replaced with xxx.xxx

@xinxinga
Copy link
Author

错误应该不在bundleId,根据log显示,没安装-》就去安装,提示已安装-》就先uninstall,再install...这块都能正确处理。测试app 能够正确安装,并成功launch,但是之后log就报错了,case没办法运行
proxy.js:63:22 [master] pid:86802 xctest client proxy error with: Error: read ECONNRESET

@macaca-bot
Copy link

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

@paradite
Copy link
Collaborator

@xinxinga 你这个看不出错误啊,read ECONNRESET后面不是又有新的log了吗?还是中间你操作了?
有同学反映改bundleId就行了,随便什么都行,你试试。具体为什么我也不明白。我不是iOS开发。

@macaca-bot
Copy link

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.

@xinxinga
Copy link
Author

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

@macaca-bot
Copy link

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
Copy link
Author

@xinxinga 你这个看不出错误啊,read ECONNRESET后面不是又有新的log了吗?还是中间你操作了?
有同学反映改bundleId就行了,随便什么都行,你试试。具体为什么我也不明白。我不是iOS开发。

read ECONNRESET一直是这个错,retry 10次 就结束了,我中间没有做操作,测试完全没有执行。
bundleId 在哪儿改?

@macaca-bot
Copy link

This is the translated issue comment: @xinxinga


@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.

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?

@paradite
Copy link
Collaborator

@xinxinga 在配置driver的时候应该有设置的:
https://macacajs.github.io/guide/helpful-settings.html#desired-capabilities
你只跑了macaca server?还有个client在跑,给server提供这些参数。

@macaca-bot
Copy link

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.

@paradite
Copy link
Collaborator

你的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".
你具体是怎么执行的?是不是有别的脚本在跑?

@macaca-bot
Copy link

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
Copy link
Author

@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

@macaca-bot
Copy link

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

@xinxinga
Copy link
Author

xinxinga commented May 29, 2019

你的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,只不过错误和前面一样的。

@macaca-bot
Copy link

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 ECONNRESET
But your log is running, and finally
macaca-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

@xinxinga
Copy link
Author

@xinxinga 在配置driver的时候应该有设置的:
https://macacajs.github.io/guide/helpful-settings.html#desired-capabilities
你只跑了macaca server?还有个client在跑,给server提供这些参数。

回答上面的问题:
desired-capabilities 里面没有设置bundleId.
bundleId是在macaca-ios.js里面获取的, 代码如下:

else if (app) {
    this.bundleId = yield iOSUtils.getBundleId(app);

同时,log 显示:

>> macaca-ios.js:250:12 [master] pid:6636 App "com.xxx.XXX" is already installed.
>> macaca-ios.js:251:12 [master] pid:6636 Adopting app reuse strategy: 1.
>> macaca-ios.js:258:18 [master] pid:6636 Uninstall app "com.xxx.XXX"".
>> macaca-ios.js:260:18 [master] pid:6636 Install app 'com.xxx.XXX"' successfully.

也可以看一下我的测试代码:

        for item in recd_file_content:
            if 0 == item.find("client_devicename"):    
                desired_caps["deviceName"] = item.split(":")[-1]
      
            if 0 == item.find("client_platformname"):
                # due to Macaca limit of supported platforms [android, chrome, electron, ios, puppeteer]
                # no matter what the input platform is, change it to android or ios
                # no consideration of mobile browser here
                pattern_list = []
                pattern_list = re.findall(r'[Aa][Nn][Dd][Rr][Oo][Ii][Dd]|[Ii][Oo][Ss]', item.split(":")[-1])
                desired_caps["platformName"] = pattern_list[0].lower()
            
            if 0 == item.find("client_deviceid"):
                desired_caps["udid"] = item.split(":")[-1]

            if 0 == item.find("client_browsername"):
                desired_caps["browserName"] = item.split(":")[-1]
 
            if 0 == item.find("client_app"):
                desired_caps["app"] = item.split(":")[-1]

        return desired_caps            

@macaca-bot
Copy link

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.

Answer the above question:
There is no bundleId set in desired-capabilities.
bundleId is obtained in macaca-ios.js, the code is as follows:

Else if (app) {
    this.bundleId = yield iOSUtils.getBundleId(app);

At the same time, the log shows:

>> macaca-ios.js:250:12 [master] pid:6636 App "com.xxx.XXX" is already installed.
>> macaca-ios.js:251:12 [master] pid:6636 Adopting app reuse strategy: 1.
>> macaca-ios.js:258:18 [master] pid:6636 Uninstall app "com.xxx.XXX"".
>> macaca-ios.js:260:18 [master] pid:6636 Install app 'com.xxx.XXX"' successfully.

Also take a look at my test code:

        For item in recd_file_content:
            If 0 == item.find("client_devicename"):
                Desired_caps["deviceName"] = item.split(":")[-1]
      
            If 0 == item.find("client_platformname"):
                # due to Macaca limit of supported platforms [android, chrome, electron, ios, puppeteer]
                # no matter what the input platform is, change it to android or ios
                # no consideration of mobile browser here
                Pattern_list = []
                Pattern_list = re.findall(r'[Aa][Nn][Dd][Rr][Oo][Ii][Dd]|[Ii][Oo][Ss]', item.split(":")[ -1])
                Desired_caps["platformName"] = pattern_list[0].lower()
            
            If 0 == item.find("client_deviceid"):
                Desired_caps["udid"] = item.split(":")[-1]

            If 0 == item.find("client_browsername"):
                Desired_caps["browserName"] = item.split(":")[-1]
 
            If 0 == item.find("client_app"):
                Desired_caps["app"] = item.split(":")[-1]

        Return desired_caps

@paradite
Copy link
Collaborator

光这么看也看不出哪里的问题,如果能有最小的复现问题的例子我可以试试看哪里的问题。
建议1:试试虚拟机,看看是不是同样有问题。有可能是真机证书问题。
建议2:试试自己加入bundleId ,看看问题是不是还有。有同学同样问题加了这个就好了。

@macaca-bot
Copy link

This is the translated issue comment: @paradite


I can't see where the problem is from light. If there is an example of a minimal recurring problem, I can try to see where it is.
Recommendation 1: Try the virtual machine and see if it is the same problem. There may be a real machine certificate issue.
Recommendation 2: Try adding bundleId yourself to see if the problem is there. Some students have added this problem to the same problem.

@xinxinga
Copy link
Author

光这么看也看不出哪里的问题,如果能有最小的复现问题的例子我可以试试看哪里的问题。
建议1:试试虚拟机,看看是不是同样有问题。有可能是真机证书问题。
建议2:试试自己加入bundleId ,看看问题是不是还有。有同学同样问题加了这个就好了。

(1)
首先我确认不是证书问题。最近一直在做测试,每天都在跑测试的。只是这个问题原来没这么严重,比如10次有3次跑不起来。但是昨天到今天大概就是99%跑不起来。。。所以搞不明白是什么原因,

我的环境最大的改动,就是mac os 从10.14.4 升级到10.14.5, 另外这个问题卡住以后,我尝试了npm i macaca-ios -g, cnpm i macaca-ios -g, 都不行。
但同时 app-inspector 是好使的。

(2)
刚刚尝试加了bundleId ,不解决问题😔

@macaca-bot
Copy link

This is the translated issue comment: @xinxinga


I can't see where the problem is from light. If there is an example of a minimal recurring problem, I can try to see where it is.
Recommendation 1: Try the virtual machine and see if it is the same problem. There may be a real machine certificate issue.
Suggestion 2: Try adding bundleId yourself to see if the problem is there. Some students have added this problem to the same problem.

(1)
First of all, I confirm that it is not a certificate issue. I have been testing recently and I am running tests every day. It’s just that this problem was not so serious. For example, there are 3 times that you can’t run 3 times. But yesterday, today it is probably 99% can't run. . . So I don’t understand why.

The biggest change in my environment is that mac os has been upgraded from 10.14.4 to 10.14.5. After this problem is stuck, I tried npm i macaca-ios -g, cnpm i macaca-ios -g, no.
But at the same time app-inspector is good.

(2)
Just tried adding bundleId, not solving the problem😔

@paradite
Copy link
Collaborator

那大概率是新的macOS的问题了。我们这面最近都没有更新代码。我让负责iOS的同学看看哈。

@macaca-bot
Copy link

This is the translated issue comment: @paradite


That big probability is a problem with the new macOS. We haven't updated the code recently. I let the students in charge of iOS look at Kazakhstan.

@xinxinga
Copy link
Author

那大概率是新的macOS的问题了。我们这面最近都没有更新代码。我让负责iOS的同学看看哈。

谢谢,这个问题卡住,影响了最近的测试。
希望能尽快找到解决办法。

@macaca-bot
Copy link

This is the translated issue comment: @xinxinga


That big probability is a problem with the new macOS. We haven't updated the code recently. I let the students in charge of iOS look at Kazakhstan.

Thanks, this problem is stuck, affecting the most recent test.
I hope to find a solution as soon as possible.

@paradite
Copy link
Collaborator

@xinxinga @XinxingAn 你们的问题只是iOS真机吗?我这面测试Xcode 10.2 + macOS 10.14.5,用iOS模拟器是可以的。

@macaca-bot
Copy link

This is the translated issue comment: @paradite


@xinxinga @XinxingAn Is your question just an iOS real machine? I tested Xcode 10.2 + macOS 10.14.5 on this side, and it is ok with the iOS simulator.

@paradite paradite unpinned this issue May 31, 2019
@XinxingAn
Copy link

@xinxinga @XinxingAn 你们的问题只是iOS真机吗?我这面测试Xcode 10.2 + macOS 10.14.5,用iOS模拟器是可以的。

是的,我在真机上测试的,因为我们有些测试需要和第三方交互。模拟器没办法

@macaca-bot
Copy link

This is the translated issue comment: @XinxingAn


@xinxinga @XinxingAn Is your question just an iOS real machine? I tested Xcode 10.2 + macOS 10.14.5 on this side, and it is ok with the iOS simulator.

Yes, I tested it on a real machine because some of our tests need to interact with third parties. The simulator has no way

@XinxingAn
Copy link

Update:

  1. 我尝试了sample test, 中间也出现这个error,但是过一会 就好了,可以继续跑测试。
    而我跑自己的测试case,就hang在那里,一直是error
macaca server --verbose
>> index.js:15:12 [master] pid:25406 webdriver server start with config:
 { port: 3456,
  verbose: true,
  always: true,
  ip: '192.168.13.164',
  host: '34363bc9e554.ant.xxx.com',
  loaded_time: '2019-06-05 13:35:20' }
>> middlewares.js:17:10 [master] pid:25406 base middlewares attached
>> router.js:132:10 [master] pid:25406 router set
>> Macaca server started
>> responseHandler.js:11:12 [master] pid:25406 Recieve HTTP Request from Client[2019-06-05 13:35:26]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"deviceName":"iPhone 6s","app":"https://npmcdn.com/ios-app-bootstrap@latest/build/ios-app-bootstrap.zip","platformName":"iOS"}}
>> session.js:58:10 [master] pid:25406 Creating session, sessionId: 59900ece-81dc-43ea-bc0a-79f835bab14b.
/Users/xinxinga/npm-global/lib/node_modules/macaca-ios/node_modules/[email protected]@ios-device/node_modules/ios-deploy/build/Release/ios-deploy
>> get /Users/xinxinga/.macaca-temp/ios-app-bootstrap.zip from cache
>> sha:d2e65bba467659ef610b369f2ee599c1
>> helper.js:193:14 [master] pid:25406 Unzipping local app form /Users/xinxinga/.macaca-temp/ios-app-bootstrap.zip
>> macaca-ios.js:223:10 [master] pid:25406 Get available devices [{"name":"iPhone 5s","udid":"D292981B-C6A6-4C05-8035-A942CA1044D8","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone 6","udid":"3477AC99-84E1-4BB7-ADD4-C192B5113A07","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone 6 Plus","udid":"C5397801-A991-4494-97B5-151FA9E8109C","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone 6s","udid":"8BCE6BCC-76B8-4BD9-A368-C7EF3B7A4955","state":"Booted","available":true,"runtime":"iOS 12.2"},{"name":"iPhone 6s Plus","udid":"2B0FBC88-BF5A-457C-B143-09B06E1742FC","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone 7","udid":"73350A28-5860-4EE3-9010-1ACE7B6CFAC7","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone 7 Plus","udid":"4D63870D-76FB-4A5B-8104-9A9BFC44D9AA","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone 8","udid":"9B0FF811-C3E4-4780-BD27-69D06485278A","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone 8 Plus","udid":"549DA0F2-6199-4F0C-80B2-B54B33B5CB43","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone SE","udid":"A17A3169-BFC4-441C-9884-D3A26540A0AC","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone X","udid":"7A47C7C8-80C0-4012-96FF-60207FBEDB6E","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone Xs","udid":"6BA653E7-2C2E-4C6C-AE20-D28E0F29A45B","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone Xs Max","udid":"12A6A86E-D6DC-4DF2-A4FC-32B2FCF88C8C","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPhone Xʀ","udid":"18245142-90AE-4C99-9A4A-491E3064090E","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPad Air","udid":"30FDAF92-3B19-4038-818E-0DC4740EDD37","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"iPad Air 2","udid":"09A51F9A-ACCA-4331-BE0A-F45EC681A0F6","state":"Shutdown","available":true,"runtime":"iOS 12.2"},{"name":"Apple TV","udid":"4C083B0D-94E4-45A6-8DFF-3FBD68499461","state":"Shutdown","available":true,"runtime":"tvOS 12.2"},{"name":"Apple TV 4K","udid":"3B733BB9-E54C-4EE7-89A7-0B49285315D3","state":"Shutdown","available":true,"runtime":"tvOS 12.2"},{"name":"Apple Watch Series 2 - 38mm","udid":"1E30DB30-114C-4A3E-9AB4-F43E952323BC","state":"Shutdown","available":true,"runtime":"watchOS 5.2"},{"name":"Apple Watch Series 2 - 42mm","udid":"5378F2DC-5196-4D90-A1DF-C31F3164BC1B","state":"Shutdown","available":true,"runtime":"watchOS 5.2"},{"name":"Apple Watch Series 3 - 38mm","udid":"532CEA4D-3D0F-4E1C-9019-5BD8AFF1EC81","state":"Shutdown","available":true,"runtime":"watchOS 5.2"},{"name":"Apple Watch Series 3 - 42mm","udid":"AEAC86E5-5468-45AA-9E83-5A52FB216340","state":"Shutdown","available":true,"runtime":"watchOS 5.2"},{"name":"Apple Watch Series 4 - 40mm","udid":"0FF27D48-F91D-4337-BAA3-9F5DD922C9E7","state":"Shutdown","available":true,"runtime":"watchOS 5.2"},{"name":"Apple Watch Series 4 - 44mm","udid":"00888560-3C99-4BDD-855B-D2EB2482A1EB","state":"Shutdown","available":true,"runtime":"watchOS 5.2"}]
CFBundleIdentifier is xudafeng.ios-app-bootstrap
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/gl/xnl6szq165q_yw__4sdb7bzxygppcv/T/ios-app-bootstrap.app/Info.plist
>> macaca-ios.js:163:10 [master] pid:25406 {
	"bundleId": "xudafeng.ios-app-bootstrap",
	"app": "/var/folders/gl/xnl6szq165q_yw__4sdb7bzxygppcv/T/ios-app-bootstrap.app/",
	"platformName": "iOS"
}
>> xctest-client.js:56:14 [master] pid:25406 project path: /Users/xinxinga/npm-global/lib/node_modules/macaca-ios/node_modules/[email protected]@xctestwd/XCTestWD/XCTestWD.xcodeproj
>> macaca-ios.js:172:12 [master] pid:25406 Trying to start xctestwd server...
>> xctest-client.js:283:14 [master] pid:25406 xcode version: 10.2.1
>> XCTestWD version: 1.4.18
>> xctest-client.js:227:20 [master] pid:25406 hitted for default mode
>> xctestwd start with port: 8001
>> proxy.js:55:14 [master] pid:25406 Proxy: /wd/hub/session:POST to http://127.0.0.1:8001/wd/hub/session:POST with body: {"desiredCapabilities":{"bundleId":"xudafeng.ios-app-bootstrap","app":"/var/folders/gl/xnl6szq165q_yw__4sdb7bzxygppcv/T/ios-app-bootstrap.app/","platformName":"iOS"}}
>> xctest-client.js:230:20 [master] pid:25406 please check project: /Users/xinxinga/npm-global/lib/node_modules/macaca-ios/node_modules/[email protected]@xctestwd/XCTestWD/XCTestWD.xcodeproj
>> proxy.js:63:22 [master] pid:25406 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001
>> xctest-client.js:230:20 [master] pid:25406 please check project: /Users/xinxinga/npm-global/lib/node_modules/macaca-ios/node_modules/[email protected]@xctestwd/XCTestWD/XCTestWD.xcodeproj
>> proxy.js:85:20 [master] pid:25406 Got response with status 200: {"sessionId":null,"value":{"sessionId":"9E97F92F-7438-4938-A6F5-2C316026FEBF","capabilities":{"device":"iphone","browserName":"Bootstrap","sdkVersion":"12.2","CFBundleIdentifier":"xudafeng.ios-app-...
>> responseHandler.js:49:14 [master] pid:25406 Send HTTP Respone to Client[2019-06-05 13:36:39]: {"sessionId":"59900ece-81dc-43ea-bc0a-79f835bab14b","status":0,"value":"{\"deviceName\":\"iPhone 6s\",\"app\":\"/var/folders/gl/xnl6szq165q_yw__4sdb7bzxygppcv/T/ios-app-bootstrap.app/\",\"platformName\":\"iOS\"}"}
>> responseHandler.js:11:12 [master] pid:25406 Recieve HTTP Request from Client[2019-06-05 13:36:39]: method: POST url: /wd/hub/session/59900ece-81dc-43ea-bc0a-79f835bab14b/element, jsonBody: {"using":"xpath","value":"//XCUIElementTypeTextField[1]"}
>> proxy.js:55:14 [master] pid:25406 Proxy: /wd/hub/session/59900ece-81dc-43ea-bc0a-79f835bab14b/element:POST to http://127.0.0.1:8001/wd/hub/session/9E97F92F-7438-4938-A6F5-2C316026FEBF/element:POST with body: {"using":"xpath","value":"//XCUIElementTypeTextField[1]"}
>> proxy.js:85:20 [master] pid:25406 Got response with status 200: {"status":0,"value":{"type":"XCUIElementTypeTextField","ELEMENT":"4A4146B8-B02D-4500-9A18-C131D9B88245","label":""},"sessionId":""}
>> session.js:120:14 [master] pid:25406 Send HTTP Respone to Client[2019-06-05 13:36:39]: {"status":0,"value":"{\"type\":\"XCUIElementTypeTextField\",\"ELEMENT\":\"4A4146B8-B02D-4500-9A18-C131D9B88245\",\"label\":\"\"}","sessionId":""}
>> responseHandler.js:11:12 [master] pid:25406 Recieve HTTP Request from Client[2019-06-05 13:36:39]: method: POST url: /wd/hub/session/59900ece-81dc-43ea-bc0a-79f835bab14b/element/4A4146B8-B02D-4500-9A18-C131D9B88245/value, jsonBody: {"value":["中文+Test+12345678"]}
>> proxy.js:55:14 [master] pid:25406 Proxy: /wd/hub/session/59900ece-81dc-43ea-bc0a-79f835bab14b/element/4A4146B8-B02D-4500-9A18-C131D9B88245/value:POST to http://127.0.0.1:8001/wd/hub/session/9E97F92F-7438-4938-A6F5-2C316026FEBF/element/4A4146B8-B02D-4500-9A18-C131D9B88245/value:POST with body: {"value":["中文+Test+12345678"]}
>> proxy.js:85:20 [master] pid:25406 Got response with status 200: {"status":0,"value":"","sessionId":""}
>> session.js:120:14 [master] pid:25406 Send HTTP Respone to Client[2019-06-05 13:36:41]: {"status":0,"value":"","sessionId":""}
>> responseHandler.js:11:12 [master] pid:25406 Recieve HTTP Request from Client[2019-06-05 13:36:41]: method: POST url: /wd/hub/session/59900ece-81dc-43ea-bc0a-79f835bab14b/element, jsonBody: {"using":"xpath","value":"//XCUIElementTypeSecureTextField[1]"}
>> proxy.js:55:14 [master] pid:25406 Proxy: /wd/hub/session/59900ece-81dc-43ea-bc0a-79f835bab14b/element:POST to http://127.0.0.1:8001/wd/hub/session/9E97F92F-7438-4938-A6F5-2C316026FEBF/element:POST with body: {"using":"xpath","value":"//XCUIElementTypeSecureTextField[1]"}
>> proxy.js:85:20 [master] pid:25406 Got response with status 200: {"status":0,"value":{"ELEMENT":"10F5069B-F316-492C-88BF-73814F0D0F69","type":"XCUIElementTypeSecureTextField","label":""},"sessionId":""}
>> session.js:120:14 [master] pid:25406 Send HTTP Respone to Client[2019-06-05 13:36:41]: {"sta

@XinxingAn
Copy link

xctestwd start with port: 8001
proxy.js:55:14 [master] pid:25406 Proxy: /wd/hub/session:POST to http://127.0.0.1:8001/wd/hub/session:POST with body: {"desiredCapabilities":{"bundleId":"xudafeng.ios-app-bootstrap","app":"/var/folders/gl/xnl6szq165q_yw__4sdb7bzxygppcv/T/ios-app-bootstrap.app/","platformName":"iOS"}}
xctest-client.js:230:20 [master] pid:25406 please check project: /Users/xinxinga/npm-global/lib/node_modules/macaca-ios/node_modules/_xctestwd@1.4.18@xctestwd/XCTestWD/XCTestWD.xcodeproj
proxy.js:63:22 [master] pid:25406 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001
xctest-client.js:230:20 [master] pid:25406 please check project: /Users/xinxinga/npm-global/lib/node_modules/macaca-ios/node_modules/_xctestwd@1.4.18@xctestwd/XCTestWD/XCTestWD.xcodeproj
proxy.js:85:20

@XinxingAn
Copy link

在模拟器上跑了sample test, 虽然有同样的error,但是还是可以继续跑测试case。
在模拟器和真机上,尝试自己的测试case,就卡了,一直报error.
测试机的现象就是,被测试app安装,launch,然后被卸载。。

@macaca-bot
Copy link

This is the translated issue comment: @XinxingAn


Run the sample test on the simulator, although there is the same error, but you can continue to run the test case.
On the simulator and the real machine, try your own test case, it will be stuck, and always report error.
The phenomenon of the test machine is that the tested app is installed, launched, and then uninstalled. .

@XinxingAn
Copy link

有人帮忙跟踪处理吗?

@macaca-bot
Copy link

This is the translated issue comment: @XinxingAn


Does anyone help with tracking?

@paradite
Copy link
Collaborator

paradite commented Jun 10, 2019

在跟进,耐心等待一下。sample可以跑的话,你的test不能跑的话,需要看看你的test有什么问题。我们只能修复到sample可以跑起来。

@macaca-bot
Copy link

This is the translated issue comment: @paradite


Follow up and wait patiently. If the sample can run, if your teat can't run, you need to see what's wrong with your test. We can only fix the sample to run.

@XinxingAn
Copy link

XinxingAn commented Jun 11, 2019

sample test 可以跑,能看到同样的error:
proxy.js:63:22 [master] pid:25406 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001
xctest-client.js:230:20 [master] pid:25406 please check project: /Users/xinxinga/npm-global/lib/node_modules/macaca-ios/node_modules/_xctestwd@1.4.18@xctestwd/XCTestWD/XCTestWD.xcodeproj
proxy.js:85:20

我自己的测试原来也是这样的现象,等待一会就可以跑测试,但是从某一天(大概是5.29左右)开始,就hang在这里了。。 和@fifi0526 comments一样

@macaca-bot
Copy link

This is the translated issue comment: @XinxingAn


Sample test can run, can see the same error:
Proxy.js:63:22 [master] pid:25406 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001
Xctest-client.js:230:20 [master] pid:25406 please check project: /Users/xinxinga/npm-global/lib/node_modules/macaca-ios/node_modules/_xctestwd@1.4.18@xctestwd/XCTestWD/XCTestWD. Xcodeproj
Proxy.js:85:20

My own test turned out to be the same phenomenon, waiting for a while to run the test, but from a certain day, it is here. .

@mahalo777
Copy link

mahalo777 commented Oct 9, 2019

same error 请问最近有解决吗?

@paradite
Copy link
Collaborator

在最新的xcode 11下修复了,大家试一下。 @xinxinga @mahalo777

@macaca-bot
Copy link

This is the translated issue comment: @paradite


Fixed in the latest xcode 11, we try. @xinxinga @ mahalo777

@mahalo777
Copy link

mahalo777 commented Oct 18, 2019

@paradite
你好,请问我只需要更新xcode11吗?我这边更新后,报错:Module compiled with Swift 5.0 cannot be imported by the Swift 5.1 compiler: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/Carthage/Build/iOS/Swifter.framework/Modules/Swifter.swiftmodule/arm64.swiftmodule

@macaca-bot
Copy link

This is the translated issue comment: @mahalo777


Fixed in the latest xcode 11, we try. @xinxinga @ mahalo777

Hello, I just need to update xcode11 it? After updating my side, error: Module compiled with Swift 5.0 can not be imported by the Swift 5.1 compiler: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/Carthage/Build/iOS/Swifter.framework/Modules /Swifter.swiftmodule/arm64.swiftmodule

@paradite
Copy link
Collaborator

@paradite
你好,请问我只需要更新xcode11吗?我这边更新后,报错:Module compiled with Swift 5.0 cannot be imported by the Swift 5.1 compiler: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/Carthage/Build/iOS/Swifter.framework/Modules/Swifter.swiftmodule/arm64.swiftmodule

这应该是因为之前老的全局安装没有更新,可以手动删除,重新安装

npm uninstall -g macaca-ios
npm uninstall -g ...

npm i -g macaca-ios
npm i -g ...

@macaca-bot
Copy link

This is the translated issue comment: @paradite


@paradite
Hello, I just need to update xcode11 it? After updating my side, error: Module compiled with Swift 5.0 can not be imported by the Swift 5.1 compiler: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/Carthage/Build/iOS/Swifter.framework/Modules /Swifter.swiftmodule/arm64.swiftmodule

This should be because of the global installed before the old is not updated, you can manually delete and re-install
`` `
npm uninstall -g macaca-ios
npm uninstall -g ...

npm i -g macaca-ios
npm i -g ...
`` `

@mahalo777
Copy link

mahalo777 commented Oct 18, 2019

@paradite 你好。

  1. 我重新安装后macaca-ios报错和之前一样:
    Fail to start xctest: Error: read ECONNRESET
    xctest client proxy error with: Error: read ECONNRESET`
    我的应用可以被打开,但是会一直卡在第一个页面。然后重复安装,停止。我检查了签名应该没问题。
  2. 我怀疑是使用scheme 为release的包,换包后,会报错。
    xctest-client.js:242:16 [master] pid:9088 xctest client exit with code: 65, signal: null
    xctest-client.js:272:14 [master] pid:9088 iproxy exit with code: null, signal: SIGKILL 应用页面报错No bundle url present`
    您看有什么建议吗?

@macaca-bot
Copy link

This is the translated issue comment: @mahalo777


Hello there.

  1. I re-install macaca-ios error as before:
    Fail to start xctest: Error: read ECONNRESET xctest client proxy error with: Error: read ECONNRESET
    My application can be opened, but will always be stuck in the first page. Then repeat the installation stopped. I checked the signature should be no problem.
  2. I suspect that use scheme for the release of the package, after changing the package, will complain.
    `Xctest-client.js: 242: 16 [master] pid: 9088 xctest client exit with code: 65, signal: null

xctest-client.js: 272: 14 [master] pid: 9088 iproxy exit with code: null, signal: SIGKILLApplication page errorNo bundle url present`
You see what you want to offer? Hard to help me see, thank you 🙏

@paradite
Copy link
Collaborator

@mahalo777 我这面试了一下真机是可以的:
环境:

  • iOS 12.3.1 真机
  • macOS 10.14.6
  • Xcode 11.1

看一下这里我汇总了一些排查思路:#948
有问题的话在那面回复。这个issue太长了我关掉了。

@macaca-bot
Copy link

This is the translated issue comment: @paradite


@ Mahalo777 my interview about the real machine is possible:
surroundings:

  • iOS 12.3.1 real machine
  • macOS 10.14.6
  • Xcode 11.1

Here I look at a summary of some of the troubleshooting ideas: https: //github.com//issues/948
There are problems in reply to that side. This issue is too long I turned off.

@LongXiangGuo
Copy link

请问npm uninstall -g ... 后面 ...代表了哪些依赖?

@macaca-bot
Copy link

This is the translated issue comment: @LongXiangGuo


I would like to ask the npm uninstall -g ... behind ... represents what dependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants