UiAutomator意外退出,代码为0,信号为空 会反复开关app

来源:1-3 Appium环境搭建

慕UI5404103

2019-08-15

The server is running
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages io.appium.unlock’
[ADB] App is installed
[ADB] Getting package info for ‘io.appium.unlock’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys package io.appium.unlock’
[ADB] The installed ‘io.appium.unlock’ package does not require upgrade (‘2.0.0’ >= ‘2.0.0’)
[ADB] Getting device platform version
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.build.version.release’
[ADB] Current device property ‘ro.build.version.release’: 4.4.4
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell wm size’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.product.model’
[ADB] Current device property ‘ro.product.model’: PRO 6 Plus
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.product.manufacturer’
[ADB] Current device property ‘ro.product.manufacturer’: Meizu
[AndroidDriver] Parsing package and activity from app manifest
[ADB] Using the alternative activity name detection method because of: Could not find apkanalyzer.bat in D:\Android\appium\sdk\platform-tools\apkanalyzer.bat,D:\Android\appium\sdk\emulator\apkanalyzer.bat,D:\Android\appium\sdk\tools\apkanalyzer.bat,D:\Android\appium\sdk\tools\bin\apkanalyzer.bat,D:\Android\appium\sdk\build-tools\android-4.3\apkanalyzer.bat. Do you have the Android SDK installed at ‘D:\Android\appium\sdk’?
[ADB] Extracting package and launch activity from manifest
[ADB] Package name: ‘cn.com.open.mooc’
[ADB] Main activity name: ‘cn.com.open.mooc.index.splash.MCSplashActivity’
[AndroidDriver] Parsed package and activity are: cn.com.open.mooc/cn.com.open.mooc.index.splash.MCSplashActivity
[ADB] Getting install status for cn.com.open.mooc
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages cn.com.open.mooc’
[ADB] App is installed
[ADB] Getting install status for cn.com.open.mooc
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages cn.com.open.mooc’
[ADB] App is installed
[ADB] Getting package info for ‘cn.com.open.mooc’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys package cn.com.open.mooc’
[ADB] The installed ‘cn.com.open.mooc’ package does not require upgrade (‘5.1.2’ >= ‘5.1.2’)
[AndroidDriver] Performing fast reset on ‘cn.com.open.mooc’
[ADB] Getting install status for cn.com.open.mooc
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages cn.com.open.mooc’
[ADB] App is installed
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop cn.com.open.mooc’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm clear cn.com.open.mooc’
[AndroidDriver] Performed fast reset on the installed ‘cn.com.open.mooc’ application (stop and clear)
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell rm -rf /data/local/tmp/strings.json’
[AndroidDriver] Extracting strings from apk
[AndroidDriver] D:\Android\appiumheji-1\mukewang.apk
[AndroidDriver] undefined
[AndroidDriver] C:\Users\10944\AppData\Local\Temp\cn.com.open.mooc
[ADB] Extracting strings for language: default
[ADB] Successfully extracted 926 strings from ‘D:\Android\appiumheji-1\mukewang.apk’ resources for ‘(default)’ configuration
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 push C:\Users\10944\AppData\Local\Temp\cn.com.open.mooc\strings.json /data/local/tmp’
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 forward tcp:4724 tcp:4724’
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state ‘starting’
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: ‘AppiumBootstrap.jar’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 push C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\bootstrap\bin\AppiumBootstrap.jar /data/local/tmp/’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell ps’
[ADB] Attempting to kill process 3779
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill -0 3779’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill 3779’
[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
[UiAutomator] Moving to state ‘stopped’
[AndroidDriver] Shutting down Android driver
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop cn.com.open.mooc’
[Appium] Closing session, cause was ‘UiAUtomator shut down unexpectedly’
[Appium] Removing session e1edb565-bcdf-4c7f-bbe4-e600c63a7f4c from our master session list
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill 3779’
[ADB] Pressing the HOME button
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell input keyevent 3’
[AndroidBootstrap] Cannot shut down Android bootstrap; it has already shut down
[Logcat] Stopping logcat capture
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop io.appium.unlock’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill 3779’
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill 3779’
[ADB] Cannot kill process 3779 in 1000 ms. Trying to force kill…
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill -9 3779’
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s",“127.0.0.1:21503”,“shell”,“uiautomator”,“runtest”,“AppiumBootstrap.jar”,"-c",“io.appium.android.bootstrap.Bootstrap”,"-e",“pkg”,“cn.com.open.mooc”,"-e",“disableAndroidWatchers”,false,"-e",“acceptSslCerts”,false]
[UiAutomator] Moving to state ‘online’
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys window’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Device API level: 19
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am start -W -n cn.com.open.mooc/cn.com.open.mooc.index.splash.MCSplashActivity -S’
[ADB] Waiting up to 20000ms for activity matching pkg: ‘cn.com.open.mooc’ and activity: ‘cn.com.open.mooc.index.splash.MCSplashActivity’ to be focused
[ADB] Possible activities, to be checked: ‘cn.com.open.mooc.index.splash.MCSplashActivity’, ‘cn.com.open.mooc.cn.com.open.mooc.index.splash.MCSplashActivity’
[ADB] Getting focused package and activity
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys window windows’
[ADB] Found package: ‘cn.com.open.mooc’ and fully qualified activity name : ‘cn.com.open.mooc.index.splash.MCSplashActivity’
[Appium] New AndroidDriver session created successfully, session f4bad43c-9a4e-4ef8-9cac-871fca52dcb8 added to master session list
[BaseDriver] Event ‘newSessionStarted’ logged at 1565798096598 (23:54:56 GMT+0800 (中国标准时间))
[W3C] Cached the protocol value ‘W3C’ for the new session f4bad43c-9a4e-4ef8-9cac-871fca52dcb8
[W3C] Responding to client with driver.createSession() result: {“capabilities”:{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“deviceName”:“127.0.0.1:21503”,“app”:“D:\Android\appiumheji-1\mukewang.apk”},“platformName”:“Android”,“deviceName”:“127.0.0.1:21503”,“app”:“D:\Android\appiumheji-1\mukewang.apk”,“deviceUDID”:“127.0.0.1:21503”,“platformVersion”:“4.4.4”,“deviceScreenSize”:“720x1280”,“deviceModel”:“PRO 6 Plus”,“deviceManufacturer”:“Meizu”,“appPackage”:“cn.com.open.mooc”,“appWaitPackage”:“cn.com.open.mooc”,“appActivity”:“cn.com.open.mooc.index.splash.MCSplashActivity”,“appWaitActivity”:“cn.com.open.mooc.index.splash.MCSplashActivity”}}
[HTTP] <-- POST /wd/hub/session 200 8011 ms - 834
[HTTP]
[HTTP] --> GET /wd/hub/session/f4bad43c-9a4e-4ef8-9cac-871fca52dcb8/window/rect
[HTTP] {}
[W3C] Calling AppiumDriver.getWindowRect() with args: [“f4bad43c-9a4e-4ef8-9cac-871fca52dcb8”]
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“value”:{“width”:720,“height”:1280},“status”:0}
[W3C] Responding to client with driver.getWindowRect() result: {“width”:720,“height”:1280,“x”:0,“y”:0}
[HTTP] <-- GET /wd/hub/session/f4bad43c-9a4e-4ef8-9cac-871fca52dcb8/window/rect 200 5 ms - 49
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {“capabilities”:{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“127.0.0.1:21503”,“appium:app”:“D:\Android\appiumheji-1\mukewang.apk”}]},“desiredCapabilities”:{“platformName”:“Android”,“deviceName”:“127.0.0.1:21503”,“app”:“D:\Android\appiumheji-1\mukewang.apk”}}
[W3C] Calling AppiumDriver.createSession() with args: [{“platformName”:“Android”,“deviceName”:“127.0.0.1:21503”,“app”:“D:\Android\appiumheji-1\mukewang.apk”},null,{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“127.0.0.1:21503”,“appium:app”:“D:\Android\appiumheji-1\mukewang.apk”}]}]
[BaseDriver] Event ‘newSessionRequested’ logged at 1565798096627 (23:54:56 GMT+0800 (中国标准时间))
[Appium] Creating new AndroidDriver (v4.1.1) session
[Appium] Capabilities:
[Appium] platformName: Android
[Appium] deviceName: 127.0.0.1:21503
[Appium] app: D:\Android\appiumheji-1\mukewang.apk
[BaseDriver] W3C capabilities {“alwaysMatch”:{“platformNa… and MJSONWP desired capabilities {“platformName”:“Android”,”… were provided
[BaseDriver] Creating session with W3C capabilities: {“alwaysMatch”:{“platformNa…
[BaseDriver] Session created with session id: 10fa2c66-5e8a-4adb-a251-b069a267cce1
[AndroidDriver] Java version is: 10.0.2
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices…
[ADB] 1 device(s) connected
[AndroidDriver] Using device: 127.0.0.1:21503
[ADB] Setting device id to 127.0.0.1:21503
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.build.version.sdk’
[ADB] Current device property ‘ro.build.version.sdk’: 19
[ADB] Device API level: 19
[BaseDriver] Using local app ‘D:\Android\appiumheji-1\mukewang.apk’
[AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 wait-for-device’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell echo ping’
[AndroidDriver] Pushing settings apk to device…
[ADB] Getting install status for io.appium.settings
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages io.appium.settings’
[ADB] App is installed
[ADB] Getting package info for ‘io.appium.settings’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys package io.appium.settings’
[ADB] The installed ‘io.appium.settings’ package does not require upgrade (‘2.3.0’ >= ‘2.3.0’)
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell ps’
[ADB] Device API level: 19
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’
[ADB] Device API level: 19
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell settings put secure mock_location 1’
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: ‘undefined’ and country: ‘undefined’
[Logcat] Starting logcat capture
[AndroidDriver] Pushing unlock helper app to device…
[ADB] Getting install status for io.appium.unlock
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages io.appium.unlock’
[ADB] App is installed
[ADB] Getting package info for ‘io.appium.unlock’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys package io.appium.unlock’
[ADB] The installed ‘io.appium.unlock’ package does not require upgrade (‘2.0.0’ >= ‘2.0.0’)
[ADB] Getting device platform version
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.build.version.release’
[ADB] Current device property ‘ro.build.version.release’: 4.4.4
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell wm size’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.product.model’
[ADB] Current device property ‘ro.product.model’: PRO 6 Plus
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell getprop ro.product.manufacturer’
[ADB] Current device property ‘ro.product.manufacturer’: Meizu
[AndroidDriver] Parsing package and activity from app manifest
[ADB] Using the alternative activity name detection method because of: Could not find apkanalyzer.bat in D:\Android\appium\sdk\platform-tools\apkanalyzer.bat,D:\Android\appium\sdk\emulator\apkanalyzer.bat,D:\Android\appium\sdk\tools\apkanalyzer.bat,D:\Android\appium\sdk\tools\bin\apkanalyzer.bat,D:\Android\appium\sdk\build-tools\android-4.3\apkanalyzer.bat. Do you have the Android SDK installed at ‘D:\Android\appium\sdk’?
[ADB] Extracting package and launch activity from manifest
[ADB] Package name: ‘cn.com.open.mooc’
[ADB] Main activity name: ‘cn.com.open.mooc.index.splash.MCSplashActivity’
[AndroidDriver] Parsed package and activity are: cn.com.open.mooc/cn.com.open.mooc.index.splash.MCSplashActivity
[ADB] Getting install status for cn.com.open.mooc
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages cn.com.open.mooc’
[ADB] App is installed
[ADB] Getting install status for cn.com.open.mooc
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages cn.com.open.mooc’
[ADB] App is installed
[ADB] Getting package info for ‘cn.com.open.mooc’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys package cn.com.open.mooc’
[ADB] The installed ‘cn.com.open.mooc’ package does not require upgrade (‘5.1.2’ >= ‘5.1.2’)
[AndroidDriver] Performing fast reset on ‘cn.com.open.mooc’
[ADB] Getting install status for cn.com.open.mooc
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm list packages cn.com.open.mooc’
[ADB] App is installed
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop cn.com.open.mooc’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell pm clear cn.com.open.mooc’
[AndroidDriver] Performed fast reset on the installed ‘cn.com.open.mooc’ application (stop and clear)
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell rm -rf /data/local/tmp/strings.json’
[AndroidDriver] Extracting strings from apk
[AndroidDriver] D:\Android\appiumheji-1\mukewang.apk
[AndroidDriver] undefined
[AndroidDriver] C:\Users\10944\AppData\Local\Temp\cn.com.open.mooc
[ADB] Extracting strings for language: default
[ADB] Successfully extracted 926 strings from ‘D:\Android\appiumheji-1\mukewang.apk’ resources for ‘(default)’ configuration
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 push C:\Users\10944\AppData\Local\Temp\cn.com.open.mooc\strings.json /data/local/tmp’
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 forward tcp:4724 tcp:4724’
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state ‘starting’
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: ‘AppiumBootstrap.jar’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 push C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\bootstrap\bin\AppiumBootstrap.jar /data/local/tmp/’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell ps’
[ADB] Attempting to kill process 4203
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill -0 4203’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill 4203’
[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
[UiAutomator] Moving to state ‘stopped’
[AndroidDriver] Shutting down Android driver
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop cn.com.open.mooc’
[Appium] Closing session, cause was ‘UiAUtomator shut down unexpectedly’
[Appium] Removing session f4bad43c-9a4e-4ef8-9cac-871fca52dcb8 from our master session list
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill 4203’
[ADB] Pressing the HOME button
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell input keyevent 3’
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill 4203’
[AndroidBootstrap] Cannot shut down Android bootstrap; it has already shut down
[Logcat] Stopping logcat capture
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop io.appium.unlock’
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill 4203’
[ADB] Cannot kill process 4203 in 1000 ms. Trying to force kill…
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell kill -9 4203’
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: [”-P",5037,"-s",“127.0.0.1:21503”,“shell”,“uiautomator”,“runtest”,“AppiumBootstrap.jar”,"-c",“io.appium.android.bootstrap.Bootstrap”,"-e",“pkg”,“cn.com.open.mooc”,"-e",“disableAndroidWatchers”,false,"-e",“acceptSslCerts”,false]
[UiAutomator] Moving to state ‘online’
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys window’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Device API level: 19
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am start -W -n cn.com.open.mooc/cn.com.open.mooc.index.splash.MCSplashActivity -S’
[ADB] Waiting up to 20000ms for activity matching pkg: ‘cn.com.open.mooc’ and activity: ‘cn.com.open.mooc.index.splash.MCSplashActivity’ to be focused
[ADB] Possible activities, to be checked: ‘cn.com.open.mooc.index.splash.MCSplashActivity’, ‘cn.com.open.mooc.cn.com.open.mooc.index.splash.MCSplashActivity’
[ADB] Getting focused package and activity
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell dumpsys window windows’
[ADB] Found package: ‘cn.com.open.mooc’ and fully qualified activity name : ‘cn.com.open.mooc.index.splash.MCSplashActivity’
[Appium] New AndroidDriver session created successfully, session 10fa2c66-5e8a-4adb-a251-b069a267cce1 added to master session list
[BaseDriver] Event ‘newSessionStarted’ logged at 1565798104950 (23:55:04 GMT+0800 (中国标准时间))
[W3C] Cached the protocol value ‘W3C’ for the new session 10fa2c66-5e8a-4adb-a251-b069a267cce1
[W3C] Responding to client with driver.createSession() result: {“capabilities”:{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“deviceName”:“127.0.0.1:21503”,“app”:“D:\Android\appiumheji-1\mukewang.apk”},“platformName”:“Android”,“deviceName”:“127.0.0.1:21503”,“app”:“D:\Android\appiumheji-1\mukewang.apk”,“deviceUDID”:“127.0.0.1:21503”,“platformVersion”:“4.4.4”,“deviceScreenSize”:“720x1280”,“deviceModel”:“PRO 6 Plus”,“deviceManufacturer”:“Meizu”,“appPackage”:“cn.com.open.mooc”,“appWaitPackage”:“cn.com.open.mooc”,“appActivity”:“cn.com.open.mooc.index.splash.MCSplashActivity”,“appWaitActivity”:“cn.com.open.mooc.index.splash.MCSplashActivity”}}
[HTTP] <-- POST /wd/hub/session 200 8325 ms - 834
[HTTP]
[HTTP] --> GET /wd/hub/session/10fa2c66-5e8a-4adb-a251-b069a267cce1/window/rect
[HTTP] {}
[W3C] Calling AppiumDriver.getWindowRect() with args: [“10fa2c66-5e8a-4adb-a251-b069a267cce1”]
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“getDeviceSize”,“params”:{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“value”:{“width”:720,“height”:1280},“status”:0}
[AndroidBootstrap] Received command result from bootstrap
[W3C] Responding to client with driver.getWindowRect() result: {“width”:720,“height”:1280,“x”:0,“y”:0}
[HTTP] <-- GET /wd/hub/session/10fa2c66-5e8a-4adb-a251-b069a267cce1/window/rect 200 8 ms - 49
[HTTP]
[HTTP] --> POST /wd/hub/session/f5772a29-88ed-4341-9279-7c47ecfc42c0/touch/perform
[HTTP] {“actions”:[{“action”:“press”,“options”:{“x”:648,“y”:640}},{“action”:“wait”,“options”:{“ms”:0}},{“action”:“moveTo”,“options”:{“x”:72,“y”:640}},{“action”:“release”,“options”:{}}]}
[W3C] Encountered internal error running command: NoSuchDriverError: A session is either terminated or not started
[W3C] at asyncHandler$ (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:260:15)
[W3C] at tryCatch (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
[W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
[W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js?21)
[W3C] at invoke (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[W3C] at enqueueResult (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:185:17)
[W3C] at new Promise (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\webpack:~\babel-polyfill~\core-js\modules\es6.promise.js:177:1)
[W3C] at new F (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\core-js\library\modules$.export.js:30:36)
[W3C] at AsyncIterator.enqueue (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:184:12)
[W3C] at AsyncIterator.prototype.(anonymous function) [as next] (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js?21)
[W3C] at Object.runtime.async (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:209:12)
[W3C] at asyncHandler (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-base-driver\build\lib\protocol\protocol.js:380:32)
[W3C] at C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:446:15
[W3C] at Layer.handle [as handle_request] (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[W3C] at next (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\route.js:137:13)
[W3C] at Route.dispatch (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\route.js:112:3)
[W3C] at Layer.handle [as handle_request] (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[W3C] at C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:281:22
[W3C] at param (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:354:14)
[W3C] at param (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:365:14)
[W3C] at Function.process_params (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:410:3)
[W3C] at next (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:275:10)
[W3C] at logger (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\morgan\index.js:144:5)
[W3C] at Layer.handle [as handle_request] (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\layer.js:95:5)
[W3C] at trim_prefix (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:317:13)
[W3C] at C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:284:7
[W3C] at Function.process_params (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:335:12)
[W3C] at next (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:275:10)
[W3C] at C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\body-parser\lib\read.js:130:5
[W3C] at invokeCallback (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\raw-body\index.js:224:16)
[W3C] at done (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\raw-body\index.js:213:7)
[W3C] at IncomingMessage.onEnd (C:\Users\10944\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\raw-body\index.js:273:7)
[W3C] at IncomingMessage.emit (events.js:182:13)
[W3C] at endReadableNT (_stream_readable.js:1090:12)
[W3C] at process._tickCallback (internal/process/next_tick.js:63:19)
[HTTP] <-- POST /wd/hub/session/f5772a29-88ed-4341-9279-7c47ecfc42c0/touch/perform 404 10 ms - 6050
[HTTP]
[BaseDriver] Shutting down because we waited 60 seconds for a command
[AndroidDriver] Shutting down Android driver
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop cn.com.open.mooc’
[Appium] Closing session, cause was ‘New Command Timeout of 60 seconds expired. Try customizing the timeout using the ‘newCommandTimeout’ desired capability’
[Appium] Removing session 10fa2c66-5e8a-4adb-a251-b069a267cce1 from our master session list
[ADB] Pressing the HOME button
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell input keyevent 3’
[AndroidBootstrap] Sending command to android: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“value”:“OK, shutting down”,“status”:0}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=

[AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.

[AndroidBootstrap] [UIAUTO STDOUT] Time: 61.886

[AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)

[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1

[AndroidBootstrap] Received command result from bootstrap
[UiAutomator] Shutting down UiAutomator
[UiAutomator] Moving to state ‘stopping’
[UiAutomator] UiAutomator shut down normally
[UiAutomator] Moving to state ‘stopped’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell ps’
[ADB] No uiautomator process found to kill, continuing…
[UiAutomator] Moving to state ‘stopped’
[Logcat] Stopping logcat capture
[ADB] Running ‘D:\Android\appium\sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:21503 shell am force-stop io.appium.unlock’
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.图片描述

写回答

1回答

Mushishi

2019-08-15

你swipe里面的driver哪里来?

0
0

Python主讲移动端自动化测试框架Appium

APP自动化基础知识、po模型、关键字模型、服务自动化、持续集成

1508 学习 · 1333 问题

查看课程