macaca icon indicating copy to clipboard operation
macaca copied to clipboard

Error: no avd created! Please create one avd first

Open pepsicoffee opened this issue 8 years ago • 2 comments

  • Macaca Version: 2.1.3
  • Macaca Doctor Logs: macaca-doctor version: 2.0.14

Node.js checklist:

node env: C:\Java\node-v8.4.0\node.exe node version: v10.10.0

Android checklist:

JAVA version is 1.8 JAVA_HOME is set to C:\Java\jdk1.8.0_91 ANDROID_HOME is set to D:\DevSoft\android-sdk_r24.4.1 Platforms is set to D:\DevSoft\android-sdk_r24.4.1\platforms\android-23 ADB tool is set to D:\DevSoft\android-sdk_r24.4.1\platform-tools\adb.exe GRADLE_HOME is set to C:\Java\gradle-4.10

Installed driver list:

android: 2.0.48 chrome: 1.0.7 electron: 2.0.3

  • Operate System: windows7 64bit
  • Programming Language: node.js

macaca-test/mobile-app-sample.test.js

responseHandler.js:11:12 [master] pid:12524 Recieve HTTP Request from Client[ 2018-09-12 18:17:37]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapa bilities":{"platformName":"Android","autoAcceptAlerts":false,"isWaitActivity":tr ue,"app":"d:\macaca\sample-nodejs\node_modules\android-app-bootstrap\androi d_app_bootstrap\build\outputs\apk\android_app_bootstrap-debug.apk","browserN ame":"firefox","version":"","javascriptEnabled":true,"platform":"ANY"}} session.js:58:10 [master] pid:12524 Creating session, sessionId: 809a750c-fcd d-410e-9129-52afc9abd15b. helper.js:207:14 [master] pid:12524 Using local app form d:\macaca\sample-nod ejs\node_modules\android-app-bootstrap\android_app_bootstrap\build\outputs\apk\a ndroid_app_bootstrap-debug.apk macaca-adb.js:525:14 [master] pid:12524 adb devices data parse with error: Ty peError: Cannot read property '0' of null at data.map.device (C:\Java\node-v8.4.0\node_modules\macaca-android\node_mod ules\macaca-adb\lib\macaca-adb.js:521:55) at Array.map () at dataFilter (C:\Java\node-v8.4.0\node_modules\macaca-android\node_modules
macaca-adb\lib\macaca-adb.js:513:19) at _.exec.then.data (C:\Java\node-v8.4.0\node_modules\macaca-android\node_mo dules\macaca-adb\lib\macaca-adb.js:532:15) at process._tickCallback (internal/process/next_tick.js:68:7) no device, now create one from avd responseHandler.js:56:12 [master] pid:12524 Send Error Respone to Client: Err or: no avd created! Please create one avd first responseHandler.js:62:14 [master] pid:12524 Error: no avd created! Please cre ate one avd first at Android.initDevice (C:\Java\node-v8.4.0\node_modules\macaca-android\lib\m acaca-android.js:174:13) at Android.initDevice.next () at onFulfilled (C:\Java\node-v8.4.0\node_global\node_modules\macaca-cli\node [email protected]@co\index.js:65:19) at process._tickCallback (internal/process/next_tick.js:68:7)

Error: no avd created! Please create one avd first at Android.initDevice (C:\Java\node-v8.4.0\node_modules\macaca-android\lib \macaca-android.js:174:13) at Android.initDevice.next () at onFulfilled (C:\Java\node-v8.4.0\node_global\node_modules\macaca-cli\no [email protected]@co\index.js:65:19) at process._tickCallback (internal/process/next_tick.js:68:7)

1) "before all" hook

responseHandler.js:11:12 [master] pid:12524 Recieve HTTP Request from Client[ 2018-09-12 18:17:49]: method: DELETE url: /wd/hub/session, jsonBody: {} responseHandler.js:23:14 [master] pid:12524 Send HTTP Respone to Client[2018- 09-12 18:17:49]: 405 Method Not Allowed 2) "after all" hook

pepsicoffee avatar Sep 12 '18 10:09 pepsicoffee

u should get an android device before run the demo, run adb devices in cmd, and check the devices is connected. u can get the Quick Start from: https://macacajs.github.io/quick-start

quxiaozha avatar Sep 25 '18 07:09 quxiaozha

Setup Android SDK and create avd if you want to run on AVD. Or else Enable your android mobile to Developer mode and connect with your system. Then it will work.

dharmakrish6 avatar Oct 09 '18 02:10 dharmakrish6