楼主问题解决了吗,我也遇到相同问题了
> info: [debug] Responding to client with success: {"status":0,"value":["NATIVE_APP","WEBVIEW_com.android.browser"],"sessionId":"ce0c9924-6801-4e8d-88e6-d423d93a29e9"}
> info: <-- GET /wd/hub/session/ce0c9924-6801-4e8d-88e6-d423d93a29e9/contexts 200 285.910 ms - 116 {"status":0,"value":["NATIVE_APP","WEBVIEW_com.android.browser"],"sessionId":"ce0c9924-6801-4e8d-88e6-d423d93a29e9"}
> info: --> POST /wd/hub/session/ce0c9924-6801-4e8d-88e6-d423d93a29e9/context {"sessionId":"ce0c9924-6801-4e8d-88e6-d423d93a29e9","name":"WEBVIEW_com.android.browser"}
> info: [debug] Getting a list of available webviews
> info: [debug] executing cmd: D:\android-sdk-windows\platform-tools\adb.exe -s a8e34a88 shell "cat /proc/net/unix"
> info: [debug] WEBVIEW_16148 mapped to pid 16148
> info: [debug] Getting process name for webview
> info: [debug] executing cmd: D:\android-sdk-windows\platform-tools\adb.exe -s a8e34a88 shell "ps"
> info: [debug] Parsed pid: 16148 pkg: com.android.browser
> info: [debug] from: u0_a3,16148,265,1183056,169020,ffffffff,00000000,S,com.android.browser
> info: [debug] returning process name: com.android.browser
> info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.android.browser
> info: [debug] ["WEBVIEW_com.android.browser"]
> info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.android.browser
> info: [debug] Connecting to chrome-backed webview
> info: Chromedriver: Changed state to 'starting'
> info: Chromedriver: Set chromedriver binary as: D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe
> info: Chromedriver: Killing any old chromedrivers, running: FOR /F "usebackq tokens=5" %a in (`netstat -nao ^| findstr /R /C:"9515 "`) do (FOR /F "usebackq" %b in (`TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe`) do (IF NOT %b=="" TASKKILL /F /PID %a))
> info: Chromedriver: No old chromedrivers seemed to exist
> info: Chromedriver: Spawning chromedriver with: D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe --url-base=wd/hub --port=9515
> info: Chromedriver: [STDOUT] Starting ChromeDriver 2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a) on port 9515
> Only local connections are allowed.
> info: JSONWP Proxy: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
> info: JSONWP Proxy: Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Windows NT\",\"version\":\"6.1 SP1\"}}}"
> info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.wuba.zhuanzhuan","androidUseRunningApp":true,"androidDeviceSerial":"a8e34a88"}}}
> info: JSONWP Proxy: Got response with status 200: {"sessionId":"48484bae5d2a8561bcd0432883fe3697","status":13,"value":{"message":"unknown error: Device a8e34a88 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d...
> info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.wuba.zhuanzhuan","androidUseRunningApp":true,"androidDeviceSerial":"a8e34a88"}}}
> info: [debug] Didn't get a new command in 60 secs, shutting down...
> info: Shutting down appium session
> info: [debug] Pressing the HOME button
> info: [debug] executing cmd: D:\android-sdk-windows\platform-tools\adb.exe -s a8e34a88 shell "input keyevent 3"
> info: [debug] Stopping logcat capture
> info: [debug] Logcat terminated with code null, signal SIGTERM
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
> info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"OK, shutting down","status":0}
> info: [debug] [BOOTSTRAP] [debug] Closed client connection
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
> 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: 0
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
> info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
> info: [debug] [UIAUTOMATOR STDOUT] Time: 90.544
> info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
> info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
> info: [debug] UiAutomator shut down normally
> info: [debug] Cleaning up android objects
> info: [debug] Cleaning up appium session
> info: [debug] We shut down because no new commands came in
> info: JSONWP Proxy: Got response with status 200: {"sessionId":"2392b916ac64c4a5fb5c5ee182d301da","status":100,"value":{"message":"chrome not reachable\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=W...
> info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.wuba.zhuanzhuan","androidUseRunningApp":true,"androidDeviceSerial":"a8e34a88"}}}
> info: JSONWP Proxy: Got response with status 200: {"sessionId":"f96bb09622ccbf6ec8d182190fab036a","status":100,"value":{"message":"chrome not reachable\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=W...
> info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.wuba.zhuanzhuan","androidUseRunningApp":true,"androidDeviceSerial":"a8e34a88"}}}
> info: JSONWP Proxy: Got response with status 200: {"sessionId":"85cb8cefcac0c27066cfb91e157b5589","status":13,"value":{"message":"unknown error: Device a8e34a88 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d...
> error: Chromedriver: Chromedriver exited unexpectedly with code null, signal SIGTERM
> info: Chromedriver: Changed state to 'stopped'
> warn: Chromedriver for context WEBVIEW_com.android.browser stopped unexpectedly
> warn: Chromedriver quit unexpectedly, but it wasn't the active context, ignoring
> error: Chromedriver: Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device a8e34a88 is not online
> (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64))
> at JWProxy.command$ (lib/proxy.js:133:15)
> at tryCatch (D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:67:40)
> at GeneratorFunctionPrototype.invoke [as _invoke] (D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:315:22)
> at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:100:21)
> at GeneratorFunctionPrototype.invoke (D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:136:37)
> at bound (domain.js:284:14)
> at GeneratorFunctionPrototype.runBound (domain.js:297:12)
> at run (D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\es6.promise.js:89:39)
> at D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\es6.promise.js:100:28
> at flush (D:\appium\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\$.microtask.js:17:13)
> at process._tickDomainCallback (node.js:381:11)
> { [Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device a8e34a88 is not online
> (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64))]
> status: 13,
> value: { message: 'unknown error: Device a8e34a88 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64)' },
> httpCode: 200 }
> info: <-- POST /wd/hub/session/ce0c9924-6801-4e8d-88e6-d423d93a29e9/context - - ms - -
> undefined