Closed zhechengmao closed 5 years ago
都无奈了,之前配置的都是运行好好的,从上次macaca-ios驱动更新出问题以后,我把macaca-ios驱动卸了,然后这个app-inspector也卸载了,全部重新安装,该签名的都签名了,该重新打包安装的也安装了,运行脚本的时候是没问题的,但是用到这个app-inspector获取界面元素就不行了,一脸懵逼,步骤完全没有错,还是说,版本更新以后有什么特殊的步骤,建议官方人员能不能把自己的环境清理一下,然后重新配置一下看看是不是有问题,写个脚本,大部分时间都是用在环境配置这上面也是醉了。。。
This is the translated issue comment: @zhechengmao
All helpless, the previous configuration is running well, after the last macaca-ios driver update problem, I uninstalled the macaca-ios driver, and then the app-inspector is also uninstalled, all re-installed, the signature All signed, the repackaged installation is also installed, running the script is no problem, but using the app-inspector to get the interface elements will not work, a face is too aggressive, the steps are completely wrong, or say, the version After the update, what are the special steps, it is recommended that the official staff can clean up their environment, and then re-configure to see if there is a problem, write a script, most of the time is used in the environment configuration is also drunk. . .
This is the translated issue comment: @paradite
Is the classmate a real machine? Real machine to see this? https://macacajs.github.io/en/guide/environment-setup.html#ios-%E7%9C%9F%E6%9C%BA%E7%8E%AF%E5%A2%83
有其他同学遇到这个问题成功解决了哦,你看看是不是哪一步遗漏了: https://github.com/alibaba/macaca/issues/899
This is the translated issue comment: @paradite
Some other students have successfully solved this problem. You can see if it is missing: Https://github.com/alibaba/macaca/issues/899
有其他同学遇到这个问题成功解决了哦,你看看是不是哪一步遗漏了: alibaba/macaca#899
真机调试运行脚本是可以的,不过我用app-inspector查看界面元素出问题了,涉及到的这个安装的步骤我罗列一下哈
1:DEVELOPMENT_TEAM_ID=** npm i app-inspector -g
2:全局安装完成后,我针对这个里面的XCTestWD进行签名,打包编译,然后安装到真机上,一路运行来下都是成功的
3:唯独运行app-inspector -u a6a2284c2c884cd22dba7412bf40a733b1c615d0 --verbose 这一步的时候,报上面的错误了,如下图:
因为之前macaca-ios驱动出问题,后来我全部卸载了重新安装的,然后编译macaca-ios里面的XCTestWD报错,说swift需要5.0版本,然后我又升级的系统到10.14.4,又把Xcode升级到10.2,最后ios真机调试是可以的了,结果app-inspector出问题了。。
This is the translated issue comment: @zhechengmao
Some other students have successfully solved this problem, you see if it is missing: [alibaba/macaca#899] (https://github.com/alibaba/macaca/issues/899)
The real machine debugging run script is fine, but I used the app-inspector to view the interface elements. I have listed the steps involved in this installation.
1: DEVELOPMENT_TEAM_ID = ** npm i app-inspector -g
2: After the global installation is completed, I will sign the XCTestWD in this package, package and compile it, and then install it on the real machine. All the way to run is successful.
3: Run app-inspector -u a6a2284c2c884cd22dba7412bf40a733b1c615d0 --verbose This step, the above error is reported, as shown below:
!
Because the macaca-ios driver problem, I later uninstalled the reinstall, and then compiled the XCTestWD inside macaca-ios error, saying that swift needs version 5.0, then I upgraded the system to 10.14.4, and upgraded Xcode to 10.2, the final ios real machine debugging is ok, and the result app-inspector has a problem. .
XCTestWD这个签名需要用/usr/local/lib/node_modules/app-inspector/node_modules/xctestwd 里面的XCTestWD
,你是不是用了macaca-ios里面的XCTestWD
?
This is the translated issue comment: @paradite
XCTestWD needs to use /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd Inside XCTestWD
, did you use XCTestWDin
macaca-ios?
或者试试用环境变量传XCTestWD
的位置:
$ MACACA_XCTESTWD_ROOT_PATH=/path/to/macaca_xctest app-inspector -u xxx --verbose
https://github.com/macacajs/XCTestWD#44 https://github.com/macacajs/XCTestWD/blob/master/lib/xctestwd.js#L5-L9
This is the translated issue comment: @paradite
Or try to pass the location of XCTestWD
with the environment variable:
$ MACACA_XCTESTWD_ROOT_PATH=/path/to/macaca_xctest app-inspector -u xxx --verbose
https://github.com/macacajs/XCTestWD#44 https://github.com/macacajs/XCTestWD/blob/master/lib/xctestwd.js#L5-L9
XCTestWD这个签名需要用
/usr/local/lib/node_modules/app-inspector/node_modules/xctestwd 里面的XCTestWD
,你是不是用了macaca-ios里面的XCTestWD
? 签名这个没问题的,如果真机运行脚本的话,我是安装的macaca-ios里面的,如果是通过网页查看获取界面元素,我会用app-inspector里面的,我试试你说的那个环境变量传XCTestWD位置哈
This is the translated issue comment: @zhechengmao
XCTestWD needs to use XCTestWD
in
/usr/local/lib/node_modules/app-inspector/node_modules/xctestwd. Do you use XCTestWDin
macaca-ios? Signature This is no problem, if the real machine runs the script, I installed macaca-ios inside, if it is through the web page to get the interface elements, I will use the app-inspector inside, I try the environment variable you said Pass XCTestWD location
另外还有一个可能性,是node.js的坑,安装macaca-ios
,app-inspector
之类的,不同的pacakge之间依赖会乱掉。
既然有人用app-inspector
单独成功了,你的脚本也运行成功了,那有可能是脚本和app-inspector
一起装的时候,node_modules
依赖乱掉了。
你把全局的包都卸了,只安装app-inspector
试试。
This is the translated issue comment: @paradite
There is also a possibility, the pit of node.js, install macaca-ios
, app-inspector
and the like, the dependencies between different pacakges will be messed up.
Since someone has succeeded with app-inspector
alone, your script has also run successfully. It is possible that the node_modules
dependency is messed up when the script is installed with app-inspector
.
You have unloaded the global package, just install app-inspector
.
另外还有一个可能性,是node.js的坑,安装
macaca-ios
,app-inspector
之类的,不同的pacakge之间依赖会乱掉。 既然有人用app-inspector
单独成功了,你的脚本也运行成功了,那有可能是脚本和app-inspector
一起装的时候,node_modules
依赖乱掉了。 你把全局的包都卸了,只安装app-inspector
试试。
目前两个都试了,还是不行T_T。。。。
我把macaca-ios卸载了,只留了app-inspector,然后试了一下不行
然后我用你说的那个环境变量的方法试了一下,也还是不行,有点懵了。。
This is the translated issue comment: @zhechengmao
There is another possibility, the pit of node.js, the installation of
macaca-ios
,app-inspector
and the like, the dependencies between different pacakges will be messed up. Since someone has successfully succeeded withapp-inspector
, your script has also run successfully. It is possible that thenode_modules
dependency is messed up when the script is installed withapp-inspector
. You have unloaded the global package, just installapp-inspector
.
Currently both have tried, or not T_T. . . .
I uninstalled macaca-ios, only left app-inspector, and then tried it.
Then I tried it with the method of the environment variable you said, and it still didn't work, it was a little embarrassing. .
!
有可能是新的XCode版本10.2的问题,看之前成功的是XCode 10.1。我们在看了。
This is the translated issue comment: @paradite
There may be a problem with the new XCode version 10.2, and the previous success was XCode 10.1. We are watching.
应该修复了,你重安下app-inspector,用Xcode重新跑下project应该就好了。
This is the translated issue comment: @paradite
It should be fixed, you should re-apply the app-inspector, and you should run the project again with Xcode.
应该修复了,你重安下app-inspector,用Xcode重新跑下project应该就好了。
卸载app-inspector,清理缓存后,重新安装,用xcode跑完,依然还有此问题
This is the translated issue comment: @zhechengmao
It should be fixed. You should re-apply the app-inspector. It should be fine to run the project again with Xcode.
Uninstall app-inspector, clean up the cache, re-install, run with xcode, still have this problem
!
看了下你的XCTestWD版本不对,安装正确的话应该是1.4.18。应该是安装的问题,你试试npm或者yarn。 看我的截图:
This is the translated issue comment: @paradite
Looked at your XCTestWD version is wrong, the installation should be 1.4.18. It should be an installation problem, you try npm or yarn. Look at my screenshot:
采用cnpm安装app-inspector,里面的XCTestWD版本为1.4.18,该问题得以解决。
This is the translated issue comment: @zhechengmao
Install the app-inspector with cnpm, the version of XCTestWD is 1.4.18, and the problem is solved.
@zhechengmao 我现在 macaca-iOS 遇到同样问题:
ENV: Mac OS 10.13.6 + Xcode 9.3, 因为公司限制无法升级到10.14
XCTestWD version: 1.4.18 xctest-client.js:227:20 [master] pid:1471 hitted for default mode xctest-client.js:230:20 [master] pid:1471 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:1471 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:1471 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001 proxy.js:63:22 [master] pid:1471 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:1471 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:1471 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:1471 xctest client proxy error with: Error: read ECONNRESET
This is the translated issue comment: @xinxinga
@zhechengmao I am having the same problem with macaca-iOS:
ENV: Mac OS 10.13.6 + Xcode 9.3, because the company limit cannot be upgraded to 10.14
XCTestWD version: 1.4.18 xctest-client.js:227:20 [master] pid:1471 hitted for default mode xctest-client.js:230:20 [master] pid:1471 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:1471 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:1471 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001 proxy.js:63:22 [master] pid:1471 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:1471 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:1471 xctest client proxy error with: Error: read ECONNRESET proxy.js:63:22 [master] pid:1471 xctest client proxy error with: Error: read ECONNRESET
@xinxinga 需要Xcode最新版的(10.2以上)
This is the translated issue comment: @paradite
@xinxinga needs the latest version of Xcode (10.2 or above)
@paradite 升级到了macos 10.14.4 + xcode 10.2.1 尝试了 npm i macaca-ios -g , 然后uninstall, 又 cnpm i macaca-ios -g 同样的问题。
This is the translated issue comment: @xinxinga
@paradite Upgraded to macos 10.14.4 + xcode 10.2.1 I tried npm i macaca-ios -g , then uninstall, and cnpm i macaca-ios -g the same problem.
This is the translated issue comment: @paradite
@xinxinga Are you running app-inspector or macaca? If it is an app-inspector, please open a new issue at [here] (https://github.com/alibaba/macaca/issues), provide information on how you run it, report the error log and macaca doctor log. If it is macaca, please open a new issue at [here] (https://github.com/alibaba/macaca/issues), provide information on how you run it, report the error, and macaca doctor log. This issue has been closed.
@paradite 升级到了macos 10.14.4 + xcode 10.2.1 尝试了 npm i macaca-ios -g , 然后uninstall, 又 cnpm i macaca-ios -g 同样的问题。
帮组内同学搭建环境遇到过你这个问题,把xcode换成10.2版本可以解决,10.2.1版本有问题, xcode下载地址:https://download.developer.apple.com/Developer_Tools/Xcode_10.2/Xcode_10.2.xip
This is the translated issue comment: @zhechengmao
@paradite Upgrade to macos 10.14.4 + xcode 10.2.1 I tried npm i macaca-ios -g , then uninstall, and cnpm i macaca-ios -g the same problem.
Helping the students in the group to build the environment encountered your problem, the xcode can be solved by the 10.2 version, the 10.2.1 version has problems, Xcode download address: https://download.developer.apple.com/Developer_Tools/Xcode_10.2/Xcode_10.2.xip
Environment check:
macaca doctor
macaca-doctor version: 2.0.16
Node.js checklist:
node env: /usr/local/bin/node node version: v11.0.0
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_31.jdk/Contents/Home
ANDROID_HOME is set to/Applications/android-sdk-macosx
Platforms is set to/Applications/android-sdk-macosx/platforms/android-26
ADB tool is set to/Applications/android-sdk-macosx/platform-tools/adb
gradle is installed, version: 5.2Installed driver list:
android: 2.1.0 location: /usr/local/lib/node_modules/macaca-android
ios: 2.0.35 location: /usr/local/lib/node_modules/macaca-ios
app inspector version / 版本号:2.0.24
os version / 系统:10.14.4
device information / 设备版本:11.3
terminal log / 终端输出信息:
Error: connect ECONNREFUSED 127.0.0.1:8001 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
<-- GET /
Error: connect ECONNREFUSED 127.0.0.1:8001 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)