Open carmensmile opened 4 years ago
hi @carmensmile, which command did you start the XCTestWD
on port 8002? And why did you need to start on port 8002?
hi @carmensmile, which command did you start the
XCTestWD
on port 8002? And why did you need to start on port 8002?
Hi @paradite , is there any command to start the port of 'XCTestWD', I start macaca server by command "macaca server -p 3456 --verbose", I built and test the xctestwd project in XCODE at default port 8001. But from the macaca server log, I found it sometimes start on port 8002, sometimes start on port 8001 (I don't know when and why it started on port 8002 and cause the failure.)
@carmensmile 8002 port is most likely because you have port 8001 already open. You don't need to "build and test the xctestwd project in XCODE at default port 8001" after installing xctestwd to your iOS device. The test script will xctestwd on port 8001 for you automatically.
@paradite , So what can I do to avoid the xctestwd started on port 8002 automatically? I would like it could work stably
@carmensmile
xctestwd
once using xcode onto your iOS device@carmensmile
- install
xctestwd
once using xcode onto your iOS device- stop any tests in xcode and close xcode
- run your tests (tests should run in port 8001 by default)
- stop one test before you run another test to avoid another process running on port 8002
@paradite I called driver.quit() after each test to stop the test, but how could I make sure the port 8001 was not occupied on the iOS device maybe by the last test(is there any chances the port was still occupied even called driver.quit()?) or by any other reasons?
@xudafeng maybe you can help to answer this question?
重启系统试一下?确保是8001端口
This is the translated issue comment: @xudafeng
Reboot the system a try? Ensure that the port is 8001
重启系统试一下?确保是8001端口
@xudafeng But seems it is not a good idea for me to reboot the system when we running the automatic test cases? It may ran into port 8002 when setting up the XCTestWD for each case(I found XCTestWD will be uninstalled and reinstalled each time we setup the webdriver for each case. )
This is the translated issue comment: @carmensmile
Reboot the system a try? Ensure that the port is 8001
@xudafeng But seems it is not a good idea for me to reboot the system after each case? It may ran into port 8002 when setting up the XCTestWD (I found XCTestWD will be uninstalled and reinstalled each time we setup the webdriver for each case. )
Macaca Version: 2.2.0
Macaca Doctor Logs: macaca-doctor version: 2.0.18
Node.js checklist:
node env: /usr/local/bin/node node version: v12.8.0
iOS checklist:
macOS version: 10.14.6 Xcode Command Line Tools is ready, version: 2354. xcodebuild version: 10.3 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
12
JAVA_HOME is set to/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
ANDROID_HOME is set to/Users/carmen/Library/Android/sdk
Platforms is set to/Users/carmen/Library/Android/sdk/platforms/android-29
ADB tool is set to/Users/carmen/Library/Android/sdk/platform-tools/adb
Not accepted Android SDK license agreements gradle is installed, version: 5.6Installed driver list:
ios: 2.0.36 location: /usr/local/lib/node_modules/macaca-ios
Operate System: macOS version: 10.14.6
Programming Language: JAVA
error log from macaca sever:
Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:183:27)
Error: connect ECONNREFUSED 127.0.0.1:8002 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14)
Error: connect ECONNREFUSED 127.0.0.1:8002 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14)
Error: connect ECONNREFUSED 127.0.0.1:8002 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14)
Error: connect ECONNREFUSED 127.0.0.1:8002 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14)