赞
踩
提示出错误:xctest client exit with code: 65
>> xctest-client.js:181:14 [master] pid:33863 xctest client exit with code: 65, signal: null
>> xctest-client.js:145:16 [master] pid:33863 deviceconsole exit with code: null, signal: SIGKILL
>> xctest-client.js:255:14 [master] pid:33863 Fail to start xctest: undefined
>> app-inspector:66:44 [master] pid:33863 undefined
原因:WebDriverAgent app的证书出问题了。
解决方案
在xcode 中编译下:WebDriverAgentUSBClient
再删除手机上的WDA,重复启动下就好了。
Cannot find module 'macaca-electron'
错误最开始用npm来下载
$ npm install macaca-electron -g
但是没有成功
换成cnpm来下载
$ cnpm install macaca-electron -g
成功。
直接运行macaca
$ macaca run
报错:
Error: Cannot find test framework "mocha" in /Users/xiatian/node_modules
定位到/Users/yourname/sample-nodejs
cd /Users/xiatian/sample-nodejs
再运行macaca
sample-nodejs youname$ macaca run
成功运行。
Cannot find module 'webdriver-client'
$ npm i webdriver-client --save
参考:http://www.jianshu.com/p/774a629343d9
成功后:
打开网址:
1、首先关闭运行app-inspector的终端,重新打开新终端
ps -ef|grep macaca
是否有残留macaca进程占用,然后kill所有macaca的进程(kill -s 9 进程号)
2、操作了步骤1之后,重新启动还是不行的话,多试几次,有时候会有这个问题
(网上这么说,实际没什么用)
1、先删去模拟器上的驱动XCTestWD
2、用xcode重新签名XCTestWD:
/usr/local/lib/node_modules/app-inspector/node_modules/_xctestwd@1.0.42@xctestwd/XCTestWD/XCTestWD.xcodeproj
3、在终端运行app-inspector -u DFCC48FF-642F-4C32-9990-DB292EBB345E
如图,获取TEAM_ID
在安装过程中可以将 TEAM_ID 通过环境变量传入即可支持真机
$ DEVELOPMENT_TEAM_ID=TEAM_ID cnpm i macaca-ios -g
重新安装app-inspector
DEVELOPMENT_TEAM_ID=TEAM_ID cnpm i app-inspector -g
以前由于装过cocos2d,模拟器定位不知道环境哪里有问题还是什么原因,macaca一直打不开,而且删除cocos后还是报错:
先$ open -a Simulator
通过命令行打开模拟器,
然后再定位到工程根目录
$ macaca run --verbose -d ./macaca-test/mobile-app-sample.test.js
No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.facebook.xctweb-driver-agent” were found.
这个问题导致的原因主要是很多人共用一个帐户,然后,有人后来在证书下加了设备,而你本地这些证书没有更新到最新的,导致的这个报错;
如果签名下加了设备就需要在preferance–account中点击 view detail,然后,重新download下所有的数据到本地来就解决了
'No such module'Swifter''
解决方案:
先定位到XCTestWD的目录中
$ cd /usr/local/lib/node_modules/app-inspector/node_modules/_xctestwd@1.1.0@xctestwd
然后用Carthage下载依赖:
$ carthage update
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。