Closed qileilove closed 6 years ago
确认下环境版本, 建议使用模拟器 android: 2.0.40 chrome: 1.0.6 ios: 2.0.27 puppeteer: 1.0.0
另外:192.168.59.101:5555 这个不是设备ID 请查看 adb devices
@SamuelZhaoY 依然同样的问题 我看下 package.json 里面的依赖如下
"macaca-android": "^2.0.40",
"macaca-chrome": "^1.0.6",
"macaca-cli": "^2.0.10",
"macaca-ios": "^2.0.27",
"puppeteer": "^0.11.0",
确定版本不会有问题 "puppeteer"的版本 你写错了吧, npm官网上才是 0.11.0, 另外192.168.59.101:5555 这个是我用 genymotion启动的模拟器和android emulator一样 我看下log 主要是这两行错 client
(node:53667) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): FetchError: invalid json response body at http://localhost:3456/wd/hub/session reason: Unexpected token S in JSON at position 0
(node:53667) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
server
>> responseHandler.js:63:12 [master] pid:3333 Send Error Respone to Client: Error: Server responded with status code 404:
Cannot find module "/android_app_bootstrap/build/outputs" in package android-app-bootstrap@1.0.7
>> responseHandler.js:69:14 [master] pid:3333 Error: Server responded with status code 404:
Cannot find module "/android_app_bootstrap/build/outputs" in package android-app-bootstrap@1.0.7
at Response.getBody (/usr/local/lib/node_modules/macaca-cli/node_modules/http-response-object/index.js:34:15)
at downloadWithCache (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/common/helper.js:156:20)
at Object._.configApp (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/common/helper.js:188:15)
at Object.createDevice (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/controllers/session.js:26:18)
at createDevice.next (<anonymous>)
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:54:5
at Promise (<anonymous>)
at Object.co (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:118:63)
我只是一个QA,懂一些开发 但是你们封装代码没人解释,我可能看不懂 抱歉 只能寻求你们帮助
@qileilove "puppeteer"的版本 你写错了吧, npm官网上才是 0.11.0" 关于版本的设定以及写法 请参考https://docs.npmjs.com/misc/semver
/android_app_bootstrap/build/outputs 这个属于驱动层的issue ,可以提在: https://github.com/alibaba/macaca/issues
运行环境:macbook pro node 版本 8.5.0 用的android模拟器
server端报错
客户端报错
crawler.config.yml配置