[info] [Appium] Welcome to Appium v1.15.1 [info] [Appium] Non-default server args: [info] [Appium] allowInsecure: { [info] [Appium] } [info] [Appium] denyInsecure: { [info] [Appium] } [info] [Appium] Appium REST http interface listener started on 0.0.0.0:4723[info] [HTTP] --> GET /wd/hub/sessions [info] [HTTP] {} [debug] [GENERIC] Calling AppiumDriver.getSessions() with args: [] [debug] [GENERIC] Responding to client with driver.getSessions() result: [] [info] [HTTP] <-- GET /wd/hub/sessions 200 1 ms - 40 [info] [HTTP] [info] [HTTP] --> POST /wd/hub/session [info] [HTTP] {"desiredCapabilities":{"appActivity":"cn.com.egova.login.LoginActivity","appPackage":"cn.com.egova.handpark","automationName":"uiAutomator2","deviceName":"Android Emulator","noReset":"True","platformName":"Android","platformVersion":"10.0.0","skipServerInstallation":"True","newCommandTimeout":0,"connectHardwareKeyboard":true}} [debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":"cn.com.egova.login.LoginActivity","appPackage":"cn.com.egova.handpark","automationName":"uiAutomator2","deviceName":"Android Emulator","noReset":"True","platformName":"Android","platformVersion":"10.0.0","skipServerInstallation":"True","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null] [debug] [BaseDriver] Event 'newSessionRequested' logged at 1624420094387 (11:48:14 GMT+0800 (中国标准时间)) [info] [Appium] Appium v1.15.1 creating new AndroidUiautomator2Driver (v1.37.2) session [debug] [BaseDriver] Creating session with MJSONWP desired capabilities: { [debug] [BaseDriver] "appActivity": "cn.com.egova.login.LoginActivity", [debug] [BaseDriver] "appPackage": "cn.com.egova.handpark", [debug] [BaseDriver] "automationName": "uiAutomator2", [debug] [BaseDriver] "deviceName": "Android Emulator", [debug] [BaseDriver] "noReset": "True", [debug] [BaseDriver] "platformName": "Android", [debug] [BaseDriver] "platformVersion": "10.0.0", [debug] [BaseDriver] "skipServerInstallation": "True", [debug] [BaseDriver] "newCommandTimeout": 0, [debug] [BaseDriver] "connectHardwareKeyboard": true [debug] [BaseDriver] } [warn] [BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior [warn] [BaseDriver] Capability 'skipServerInstallation' changed from string to boolean. This may cause unexpected behavior [warn] [BaseDriver] The following capabilities were provided, but are not recognized by Appium: [warn] [BaseDriver] connectHardwareKeyboard [info] [BaseDriver] Session created with session id: 22e376e7-aa4c-4ee9-b925-b91d3b1c80e5 [info] [UiAutomator2] Starting 'cn.com.egova.handpark' directly on the device[info] [ADB] Using 'adb.exe' from 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe' [info] [AndroidDriver] Retrieving device list [debug] [ADB] Trying to find a connected android device [debug] [ADB] Getting connected devices...[debug] [ADB] Connected devices: [{"udid":"5e3d2ca8","state":"device"}] [info] [AndroidDriver] Looking for a device with Android '10.0.0' [debug] [ADB] Setting device id to 5e3d2ca8 [info] [ADB] Getting device platform version [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell getprop ro.build.version.release' [debug] [ADB] Current device property 'ro.build.version.release': 10 [info] [AndroidDriver] Using device: 5e3d2ca8 [info] [ADB] Using 'adb.exe' from 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe' [debug] [ADB] Setting device id to 5e3d2ca8 [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell getprop ro.build.version.sdk' [debug] [ADB] Current device property 'ro.build.version.sdk': 29 [debug] [ADB] Device API level: 29 [warn] [UiAutomator2] Relaxing hidden api policy [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell settings put global hidden_api_policy_pre_p_apps 1'[debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell settings put global hidden_api_policy_p_apps 1' [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell settings put global hidden_api_policy 1' [warn] [AndroidDriver] No app sent in, not parsing package/activity [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 wait-for-device'[debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell echo ping' [debug] [AndroidDriver] Pushing settings apk to device... [debug] [ADB] Getting install status for io.appium.settings [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell dumpsys package io.appium.settings' [debug] [ADB] 'io.appium.settings' is installed [debug] [ADB] Getting package info for 'io.appium.settings' [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell dumpsys package io.appium.settings'[info] [ADB] Cannot extract apk info using apkanalyzer. Falling back to aapt. Original error: Could not find 'apkanalyzer.bat' in ["C:\\Users\\dtd\\AppData\\Local\\Android\\Sdk\\platform-tools\\apkanalyzer.bat","C:\\Users\\dtd\\AppData\\Local\\Android\\Sdk\\emulator\\apkanalyzer.bat","C:\\Users\\dtd\\AppData\\Local\\Android\\Sdk\\tools\\apkanalyzer.bat","C:\\Users\\dtd\\AppData\\Local\\Android\\Sdk\\tools\\bin\\apkanalyzer.bat","C:\\Users\\dtd\\AppData\\Local\\Android\\Sdk\\build-tools\\29.0.3\\apkanalyzer.bat"]. Do you have Android Build Tools installed at 'C:\Users\dtd\AppData\Local\Android\Sdk'? [info] [ADB] Using 'aapt.exe' from 'C:\Users\dtd\AppData\Local\Android\Sdk\build-tools\29.0.3\aapt.exe' [debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('2.14.2' >= '2.14.2') [debug] [ADB] There is no need to install/upgrade 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk' [debug] [ADB] Getting IDs of all 'io.appium.settings' processes [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell 'pgrep --help; echo $?'' [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell pgrep -f io\\.appium\\.settings'[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions. [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell appops set io.appium.settings android\:mock_location allow' [debug] [Logcat] Starting logcat capture [info] [UiAutomator2] 'skipServerInstallation' is set. Skipping UIAutomator2 server installation. [debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200 [debug] [ADB] Forwarding system: 8200 to device: 6790 [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 forward tcp\:8200 tcp\:6790'[debug] [UiAutomator2] No app capability. Assuming it is already on the device [debug] [UiAutomator2] Performing shallow cleanup of automation leftovers [debug] [UiAutomator2] No obsolete sessions have been detected (Error: socket hang up) [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell am force-stop io.appium.uiautomator2.server.test' [info] [UiAutomator2] 'skipServerInstallation' is set. Attempting to use UIAutomator2 server from the device [info] [UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online... [debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","5e3d2ca8","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"][debug] [Instrumentation] android.util.AndroidException: INSTRUMENTATION_FAILED: io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner [debug] [Instrumentation] at com.android.commands.am.Instrument.run(Instrument.java:514) [debug] [Instrumentation] at com.android.commands.am.Am.runInstrument(Am.java:196) [debug] [Instrumentation] INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner} [debug] [Instrumentation] at com.android.commands.am.Am.onRun(Am.java:80) [debug] [Instrumentation] at com.android.internal.os.BaseCommand.run(BaseCommand.java:56) [debug] [Instrumentation] at com.android.commands.am.Am.main(Am.java:50) [debug] [Instrumentation] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) [debug] [Instrumentation] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:380) [debug] [Instrumentation] INSTRUMENTATION_STATUS: id=ActivityManagerService [debug] [Instrumentation] INSTRUMENTATION_STATUS_CODE: -1 [debug] [Instrumentation] The process has exited with code 1[warn] [UiAutomator2] The instrumentation process has been unexpectedly terminated. Retrying UiAutomator2 startup (#1 of 1) [debug] [UiAutomator2] Performing strict cleanup of automation leftovers [debug] [UiAutomator2] No obsolete sessions have been detected (Error: socket hang up) [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell am force-stop io.appium.uiautomator2.server.test'[debug] [ADB] Attempting to kill all uiautomator processes [debug] [ADB] Getting IDs of all 'uiautomator' processes [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell pgrep -f uiautomator' [info] [ADB] No 'uiautomator' process has been found[info] [UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online... [debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","5e3d2ca8","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"][debug] [Instrumentation] android.util.AndroidException: INSTRUMENTATION_FAILED: io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner [debug] [Instrumentation] at com.android.commands.am.Instrument.run(Instrument.java:514) [debug] [Instrumentation] at com.android.commands.am.Am.runInstrument(Am.java:196) [debug] [Instrumentation] at com.android.commands.am.Am.onRun(Am.java:80) [debug] [Instrumentation] at com.android.internal.os.BaseCommand.run(BaseCommand.java:56) [debug] [Instrumentation] at com.android.commands.am.Am.main(Am.java:50) [debug] [Instrumentation] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) [debug] [Instrumentation] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:380) [debug] [Instrumentation] INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner} [debug] [Instrumentation] INSTRUMENTATION_STATUS: id=ActivityManagerService [debug] [Instrumentation] INSTRUMENTATION_STATUS_CODE: -1 [debug] [Instrumentation] The process has exited with code 1[error] [UiAutomator2] Error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output. [error] [UiAutomator2] at Object.wrappedLogger.errorAndThrow (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:79:13) [error] [UiAutomator2] at UiAutomator2Server.errorAndThrow [as startSession] (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\uiautomator2.js:227:13) [debug] [UiAutomator2] Deleting UiAutomator2 session [debug] [UiAutomator2] Deleting UiAutomator2 server session [debug] [WD Proxy] Matched '/' to command name 'deleteSession' [warn] [UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell am force-stop cn.com.egova.handpark' [debug] [Logcat] Stopping logcat capture [debug] [ADB] Removing forwarded port socket connection: 8200 [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 forward --remove tcp\:8200'[info] [UiAutomator2] Restoring hidden api policy to the device default configuration [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell settings delete global hidden_api_policy_pre_p_apps' [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell settings delete global hidden_api_policy_p_apps' [debug] [ADB] Running 'C:\Users\dtd\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 5e3d2ca8 shell settings delete global hidden_api_policy'[debug] [BaseDriver] Event 'newSessionStarted' logged at 1624420101946 (11:48:21 GMT+0800 (中国标准时间)) [debug] [MJSONWP] Encountered internal error running command: Error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output. [debug] [MJSONWP] at Object.wrappedLogger.errorAndThrow (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:79:13) [debug] [MJSONWP] at UiAutomator2Server.errorAndThrow [as startSession] (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\uiautomator2.js:227:13) [info] [HTTP] <-- POST /wd/hub/session 500 7559 ms - 274 [info] [HTTP]  [info] [HTTP] --> DELETE /wd/hub/session [info] [HTTP] {} [debug] [HTTP] No route found. Setting content type to 'text/plain' [info] [HTTP] <-- DELETE /wd/hub/session 404 2 ms - 57 [info] [HTTP]