• 我也遇到了这个问题,请帮忙看一下

    info: --> POST /wd/hub/session {"desiredCapabilities":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform":"ANDROID","platformName":"Android","platformVersion":"6.0","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"capabilities":{"desiredCapabilities":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform":"ANDROID","platformName":"Android","platformVersion":"6.0","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"firstMatch":[{"browserName":"android","platformName":"android"}]}}
    info: Client User-Agent string: selenium/3.12.0 (java windows)
    info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform, sessionOverride, version
    info: [debug] Didn't get app but did get Android package, will attempt to launch it on the device
    info: [debug] Creating new appium session 524ae36f-e8f6-4962-bd83-c05d8d60f397
    info: Starting android appium
    info: [debug] Getting Java version
    info: Java version is: 1.8.0_171
    info: [debug] Checking whether adb is present
    info: [debug] Using adb from C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe
    warn: No app capability, can't parse package/activity
    info: [debug] Using fast reset? true
    info: [debug] Preparing device for session
    info: [debug] Not checking whether app is present since we are assuming it's already on the device
    info: Retrieving device
    info: [debug] Trying to find a connected android device
    info: [debug] Getting connected devices...
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe devices
    info: [debug] 1 device(s) connected
    info: Found device HL2001K3D7CF05566
    info: [debug] Setting device id to HL2001K3D7CF05566
    info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 wait-for-device
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "echo 'ready'"
    info: [debug] Starting logcat capture
    info: [debug] Getting device API level
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "getprop ro.build.version.sdk"
    info: [debug] Device is at API Level 23
    info: Device API level is: 23
    info: [debug] Extracting strings for language: default
    info: [debug] Apk doesn't exist locally
    info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "rm -rf /data/local/tmp/strings.json"
    info: [debug] Not uninstalling app since server not started with --full-reset
    info: [debug] Skipping install since we launched with a package instead of an app path
    info: [debug] Forwarding system:4724 to device:4724
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 forward tcp:4724 tcp:4724
    info: [debug] Pushing appium bootstrap to device...
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 push "C:\TOOls\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
    info: [debug] Enabling Unicode keyboard support
    info: [debug] Pushing unicode ime to device...
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 install "C:\TOOls\Appium\node_modules\appium\build\unicode_ime_apk\UnicodeIME-debug.apk"
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "settings get secure default_input_method"
    info: [debug] Unsetting IME 'io.appium.android.ime/.UnicodeIME'
    info: [debug] Setting IME to 'io.appium.android.ime/.UnicodeIME'
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "ime enable io.appium.android.ime/.UnicodeIME"
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "ime set io.appium.android.ime/.UnicodeIME"
    info: [debug] Pushing settings apk to device...
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 install "C:\TOOls\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
    info: [debug] Pushing unlock helper app to device...
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 install "C:\TOOls\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
    info: Starting App
    info: [debug] Attempting to kill all 'uiautomator' processes
    info: [debug] Getting all processes with 'uiautomator'
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "ps 'uiautomator'"
    info: [debug] No matching processes found
    info: [debug] Running bootstrap
    info: [debug] spawning: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.halove.children -e disableAndroidWatchers false
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
    info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
    info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
    info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
    info: [debug] [BOOTSTRAP] [debug] Loading json...
    info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
    info: [debug] Waking up device if it's not alive
    info: [debug] Pushing command to appium work queue: ["wake",{}]
    info: [debug] [BOOTSTRAP] [debug] Client connected
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: wake
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "dumpsys window"
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
    info: Unlocking screen
    info: [debug] Screen is locked, trying to unlock
    info: [debug] Getting device API level
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "getprop ro.build.version.sdk"
    info: [debug] Device is at API Level 23
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.appium.unlock/.Unlock"
    info: [debug] [BOOTSTRAP] [debug] Emitting system alert message
    info: [debug] Emitting alert message...
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "dumpsys window"
    info: [debug] Screen is locked, trying to unlock
    info: [debug] Getting device API level
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "getprop ro.build.version.sdk"
    info: [debug] Device is at API Level 23
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.appium.unlock/.Unlock"
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "dumpsys window"
    info: [debug] Screen is locked, trying to unlock
    info: [debug] Getting device API level
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "getprop ro.build.version.sdk"
    info: [debug] Device is at API Level 23
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.appium.unlock/.Unlock"
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "dumpsys window"
    info: [debug] Screen is unlocked, continuing
    info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
    info: [debug] dataDir set to: /data/local/tmp
    info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"\/data\/local\/tmp"}
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
    info: [debug] Getting device API level
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "getprop ro.build.version.sdk"
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":false}
    info: [debug] Device is at API Level 23
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.halove.children/com.halove.family.SplashActivity"
    info: [debug] Waiting for pkg "com.halove.children" and activity "com.halove.family.SplashActivity" to be focused
    info: [debug] Getting focused package and activity
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "dumpsys window windows"
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "getprop ro.build.version.release"
    info: [debug] Device is at release version 6.0
    info: [debug] Device launched! Ready for commands
    info: [debug] Setting command timeout to the default of 60 secs
    info: [debug] Appium session started with sessionId 524ae36f-e8f6-4962-bd83-c05d8d60f397
    info: <-- POST /wd/hub/session 303 20638.607 ms - 74
    info: --> GET /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397 {}
    info: [debug] Responding to client with success: {"status":0,"value":{"platform":"ANDROID","browserName":"android","platformVersion":"6.0","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform":"ANDROID","platformName":"Android","platformVersion":"6.0","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","deviceName":"HL2001K3D7CF05566","platformName":"Android","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"sessionId":"524ae36f-e8f6-4962-bd83-c05d8d60f397"}
    info: <-- GET /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397 200 0.809 ms - 896 {"status":0,"value":{"platform":"ANDROID","browserName":"android","platformVersion":"6.0","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform":"ANDROID","platformName":"Android","platformVersion":"6.0","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","deviceName":"HL2001K3D7CF05566","platformName":"Android","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"sessionId":"524ae36f-e8f6-4962-bd83-c05d8d60f397"}
    info: --> GET /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397 {}
    info: [debug] Responding to client with success: {"status":0,"value":{"platform":"ANDROID","browserName":"android","platformVersion":"6.0","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform":"ANDROID","platformName":"Android","platformVersion":"6.0","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","deviceName":"HL2001K3D7CF05566","platformName":"Android","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"sessionId":"524ae36f-e8f6-4962-bd83-c05d8d60f397"}
    info: <-- GET /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397 200 0.932 ms - 896 {"status":0,"value":{"platform":"ANDROID","browserName":"android","platformVersion":"6.0","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform":"ANDROID","platformName":"Android","platformVersion":"6.0","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","deviceName":"HL2001K3D7CF05566","platformName":"Android","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"sessionId":"524ae36f-e8f6-4962-bd83-c05d8d60f397"}
    info: --> GET /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397 {}
    info: [debug] Responding to client with success: {"status":0,"value":{"platform":"ANDROID","browserName":"android","platformVersion":"6.0","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform":"ANDROID","platformName":"Android","platformVersion":"6.0","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","deviceName":"HL2001K3D7CF05566","platformName":"Android","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"sessionId":"524ae36f-e8f6-4962-bd83-c05d8d60f397"}
    info: <-- GET /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397 200 0.960 ms - 896 {"status":0,"value":{"platform":"ANDROID","browserName":"android","platformVersion":"6.0","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform":"ANDROID","platformName":"Android","platformVersion":"6.0","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","deviceName":"HL2001K3D7CF05566","platformName":"Android","resetKeyboard":false,"sessionOverride":true,"unicodeKeyboard":true,"version":""},"sessionId":"524ae36f-e8f6-4962-bd83-c05d8d60f397"}
    info: --> POST /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397/element {"using":"id","value":"com.halove.children:id/login_submit"}
    info: [debug] Waiting up to 0ms for condition
    info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"com.halove.children:id/login_submit","context":"","multiple":false}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.halove.children:id/login_submit","context":"","multiple":false}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: find
    info: [debug] [BOOTSTRAP] [debug] Finding com.halove.children:id/login_submit using ID with the contextId: multiple: false
    info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.halove.children:id/login_submit]
    error: Unhandled error: Error: read ECONNRESET
    at exports._errnoException (util.js:746:11)
    at TCP.onread (net.js:561:26) context: [POST /wd/hub/session {"desiredCapabilities":{"appActivity":"com.halove.family.SplashActivity","appPackage":"com.halove.children","automationName":"Appium","browserName":"android","deviceName":"HL2001K3D7CF05566","platform]
    info: [debug] Logcat terminated with code 0, signal null
    info: [debug] UiAutomator exited
    info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s HL2001K3D7CF05566 shell "echo 'ping'"
    info: [debug] Attempting to uninstall app
    info: [debug] Not uninstalling app since server not started with --full-reset
    info: [debug] Cleaning up android objects
    info: [debug] Condition unmet after 4214ms. Timing out.
    info: [debug] Responding to client with error: {"status":13,"value":{"message":"UiAutomator died while responding to command, please check appium logs!","name":"UnknownError","origValue":"UiAutomator died while responding to command, please check appium logs!"},"sessionId":"524ae36f-e8f6-4962-bd83-c05d8d60f397"}
    info: [debug] Cleaning up appium session
    info: <-- POST /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397/element 500 4224.362 ms - 266
    info: --> DELETE /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397 {}
    info: <-- DELETE /wd/hub/session/524ae36f-e8f6-4962-bd83-c05d8d60f397 404 0.564 ms - 40