title: Appium Capybara mobile automation on android physical device connection unstable
body: <p>we are working on mobile automation using Appium &amp; Capybara on physical device</p>
  
  <p>Although our code is working, issue is with stability,  it fails 4 in 10 times below are the details and log attached</p>
  
  <p>when i run the code, most of the time Appium log says that device is not online and after retry from Appium, device is online but by then my automation fails.</p>
  
  <p><strong><em>log</em></strong></p>
  
  <pre><code>&gt; info: --&gt; POST /wd/hub/session {"desiredCapabilities":{"platformName":"Android","platformVersion":"4.3","deviceName":"Achyuth","browserName":"chrome"}}
  &gt; info: Client User-Agent string: Ruby
  &gt; info: Set mode: Proxying straight through to Chromedriver
  &gt; info: [debug] Looks like we want chrome on android
  &gt; info: [debug] Creating new appium session c556660a-a5eb-4421-a91c-d9caac1f967a
  &gt; info: [debug] Checking whether adb is present
  &gt; info: [debug] Using adb from C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe
  &gt; info: [debug] Using fast reset? true
  &gt; info: [debug] Preparing device for session
  &gt; info: [debug] Not checking whether app is present since we are assuming it's already on the device
  &gt; info: Retrieving device
  &gt; info: [debug] Trying to find a connected android device
  &gt; info: [debug] Getting connected devices...
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe devices
  &gt; info: [debug] 1 device(s) connected
  &gt; info: Found device 42f74d186fe79f8b
  &gt; info: [debug] Setting device id to 42f74d186fe79f8b
  &gt; info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b wait-for-device
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell "echo 'ready'"
  &gt; info: [debug] Starting logcat capture
  &gt; info: [debug] Pushing unlock helper app to device...
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b install "C:\Projects\process\mobile\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell "dumpsys window"
  &gt; info: [debug] Screen already unlocked, continuing.
  &gt; info: [debug] Forwarding system:4724 to device:4724
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b forward tcp:4724 tcp:4724
  &gt; info: [debug] Pushing appium bootstrap to device...
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b push "C:\\Projects\\process\\mobile\\Appium\\node_modules\\appium\\build\\android_bootstrap\\AppiumBootstrap.jar" /data/local/tmp/
  &gt; info: Starting App
  &gt; info: [debug] Attempting to kill all 'uiautomator' processes
  &gt; info: [debug] Getting all processes with 'uiautomator'
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell "ps 'uiautomator'"
  &gt; info: [debug] No matching processes found
  &gt; info: [debug] Running bootstrap
  &gt; info: [debug] spawning: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.android.chrome -e disableAndroidWatchers false
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
  &gt; info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
  &gt; info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
  &gt; info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
  &gt; info: [debug] [BOOTSTRAP] [debug] Loading json...
  &gt; info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
  &gt; info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
  &gt; info: [debug] [BOOTSTRAP] [debug] Client connected
  &gt; info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
  &gt; info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
  &gt; info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
  &gt; info: [debug] dataDir set to: /data/local/tmp
  &gt; info: Chromedriver: Changed state to 'starting'
  &gt; info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"\/data\/local\/tmp","status":0}
  &gt; info: Chromedriver: Set chromedriver binary as: C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe
  &gt; 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))
  &gt; info: Chromedriver: No old chromedrivers seemed to exist
  &gt; info: Chromedriver: Spawning chromedriver with: C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe --url-base=wd/hub --port=9515
  &gt; info: Chromedriver: [STDOUT] Starting ChromeDriver 2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a) on port 9515
  &gt; Only local connections are allowed.
  &gt; info: JSONWP Proxy: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
  &gt; 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\"}}}"
  &gt; info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"42f74d186fe79f8b"}}}
  &gt; info: JSONWP Proxy: Got response with status 200: {"sessionId":"ada5c000c4922658f0fcf63b7036ce4b","status":13,"value":{"message":"unknown error: Device 42f74d186fe79f8b is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb51...
  &gt; info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"42f74d186fe79f8b"}}}
  &gt; info: JSONWP Proxy: Got response with status 200: {"sessionId":"438697107eb380c6a93d42dda404d71d","status":13,"value":{"message":"unknown error: Device 42f74d186fe79f8b is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb51...
  &gt; info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"42f74d186fe79f8b"}}}
  &gt; info: JSONWP Proxy: Got response with status 200: {"sessionId":"39a5b91f404c167110e7afb357599fb1","status":13,"value":{"message":"unknown error: Device 42f74d186fe79f8b is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb51...
  &gt; info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"42f74d186fe79f8b"}}}
  &gt; info: JSONWP Proxy: Got response with status 200: {"sessionId":"612e169640e516d7eec9feb7bd41d9f4","status":13,"value":{"message":"unknown error: Device 42f74d186fe79f8b is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb51...
  &gt; error: Chromedriver: Chromedriver exited unexpectedly with code null, signal SIGTERM
  &gt; info: Chromedriver: Changed state to 'stopped'
  &gt; info: Chromedriver stopped unexpectedly on us, shutting down then calling back up with the on-die callback
  &gt; error: Chromedriver: Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 42f74d186fe79f8b is not online
  &gt;   (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64))
  &gt;     at JWProxy.command$ (lib/proxy.js:133:15)
  &gt;     at tryCatch (C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:67:40)
  &gt;     at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:315:22)
  &gt;     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:100:21)
  &gt;     at GeneratorFunctionPrototype.invoke (C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:136:37)
  &gt;     at bound (domain.js:284:14)
  &gt;     at GeneratorFunctionPrototype.runBound (domain.js:297:12)
  &gt;     at run (C:\Projects\process\mobile\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)
  &gt;     at C:\Projects\process\mobile\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
  &gt;     at flush (C:\Projects\process\mobile\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)
  &gt;     at process._tickDomainCallback (node.js:381:11)
  &gt;  { [Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 42f74d186fe79f8b is not online
  &gt;   (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64))]
  &gt;   status: 13,
  &gt;   value: { message: 'unknown error: Device 42f74d186fe79f8b is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64)' },
  &gt;   httpCode: 200 }
  &gt; error: Failed to start an Appium session, err was: Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 42f74d186fe79f8b is not online
  &gt;   (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64))
  &gt; info: [debug] Cleaning up appium session
  &gt; info: [debug] Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 42f74d186fe79f8b is not online
  &gt;   (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64))
  &gt;     at JWProxy.command$ (lib/proxy.js:133:15)
  &gt;     at tryCatch (C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:67:40)
  &gt;     at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:315:22)
  &gt;     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:100:21)
  &gt;     at GeneratorFunctionPrototype.invoke (C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:136:37)
  &gt;     at bound (domain.js:284:14)
  &gt;     at GeneratorFunctionPrototype.runBound (domain.js:297:12)
  &gt;     at run (C:\Projects\process\mobile\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)
  &gt;     at C:\Projects\process\mobile\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
  &gt;     at flush (C:\Projects\process\mobile\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)
  &gt;     at process._tickDomainCallback (node.js:381:11)
  &gt; info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 42f74d186fe79f8b is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64)))","status":13,"value":{"message":"unknown error: Device 42f74d186fe79f8b is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64)"},"httpCode":200,"origValue":"An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 42f74d186fe79f8b is not online\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64))"},"sessionId":null}
  &gt; info: &lt;-- POST /wd/hub/session 500 8585.337 ms - 863 
  &gt; info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
  &gt; info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
  &gt; info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"OK, shutting down","status":0}
  &gt; info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
  &gt; info: [debug] [BOOTSTRAP] [debug] Closed client connection
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
  &gt; info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
  &gt; info: [debug] [UIAUTOMATOR STDOUT] Time: 2.03
  &gt; info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
  &gt; info: [debug] UiAutomator shut down normally
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell "am force-stop com.android.chrome"
  &gt; info: --&gt; POST /wd/hub/session {"desiredCapabilities":{"platformName":"Android","platformVersion":"4.3","deviceName":"Achyuth","browserName":"chrome"}}
  &gt; info: Client User-Agent string: Ruby
  &gt; info: Set mode: Proxying straight through to Chromedriver
  &gt; info: [debug] Looks like we want chrome on android
  &gt; info: [debug] Creating new appium session b5b2a524-792d-497b-8522-60957772fda3
  &gt; info: [debug] Checking whether adb is present
  &gt; info: [debug] Using adb from C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe
  &gt; info: [debug] Using fast reset? true
  &gt; info: [debug] Preparing device for session
  &gt; info: [debug] Not checking whether app is present since we are assuming it's already on the device
  &gt; info: Retrieving device
  &gt; info: [debug] Trying to find a connected android device
  &gt; info: [debug] Getting connected devices...
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe devices
  &gt; info: [debug] 1 device(s) connected
  &gt; info: Found device 42f74d186fe79f8b
  &gt; info: [debug] Setting device id to 42f74d186fe79f8b
  &gt; info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b wait-for-device
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell "echo 'ready'"
  &gt; info: [debug] Starting logcat capture
  &gt; info: [debug] Pushing unlock helper app to device...
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b install "C:\Projects\process\mobile\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
  &gt; info: [debug] Stopping logcat capture
  &gt; info: [debug] Logcat terminated with code null, signal SIGTERM
  &gt; info: [debug] Cleaning up appium session
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell "dumpsys window"
  &gt; info: [debug] Screen already unlocked, continuing.
  &gt; info: [debug] Forwarding system:4724 to device:4724
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b forward tcp:4724 tcp:4724
  &gt; info: [debug] Pushing appium bootstrap to device...
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b push "C:\\Projects\\process\\mobile\\Appium\\node_modules\\appium\\build\\android_bootstrap\\AppiumBootstrap.jar" /data/local/tmp/
  &gt; info: Starting App
  &gt; info: [debug] Attempting to kill all 'uiautomator' processes
  &gt; info: [debug] Getting all processes with 'uiautomator'
  &gt; info: [debug] executing cmd: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell "ps 'uiautomator'"
  &gt; info: [debug] No matching processes found
  &gt; info: [debug] Running bootstrap
  &gt; info: [debug] spawning: C:\Projects\process\mobile\android-sdk-windows\platform-tools\adb.exe -s 42f74d186fe79f8b shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.android.chrome -e disableAndroidWatchers false
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
  &gt; info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
  &gt; info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
  &gt; info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
  &gt; info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
  &gt; info: [debug] [BOOTSTRAP] [debug] Loading json...
  &gt; info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
  &gt; info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
  &gt; info: [debug] [BOOTSTRAP] [debug] Client connected
  &gt; info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
  &gt; info: [debug] dataDir set to: /data/local/tmp
  &gt; info: Chromedriver: Changed state to 'starting'
  &gt; info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
  &gt; info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
  &gt; info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"\/data\/local\/tmp","status":0}
  &gt; info: Chromedriver: Set chromedriver binary as: C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe
  &gt; 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))
  &gt; info: Chromedriver: No old chromedrivers seemed to exist
  &gt; info: Chromedriver: Spawning chromedriver with: C:\Projects\process\mobile\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe --url-base=wd/hub --port=9515
  &gt; info: Chromedriver: [STDOUT] Starting ChromeDriver 2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a) on port 9515
  &gt; Only local connections are allowed.
  &gt; info: JSONWP Proxy: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
  &gt; 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\"}}}"
  &gt; info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"42f74d186fe79f8b"}}}
  &gt; info: JSONWP Proxy: Got response with status 200: {"sessionId":"b60caca97c18f7fda779c67865db496f","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{},"cssSel...
  &gt; info: Chromedriver: Changed state to 'online'
  &gt; info: [debug] Overriding session id with "b60caca97c18f7fda779c67865db496f"
  &gt; info: [debug] Device launched! Ready for commands
  &gt; info: [debug] Setting command timeout to the default of 60 secs
  &gt; info: [debug] Appium session started with sessionId b60caca97c18f7fda779c67865db496f
  &gt; info: &lt;-- POST /wd/hub/session 303 22468.245 ms - 70 
  &gt; info: --&gt; GET /wd/hub/session/b60caca97c18f7fda779c67865db496f {}
  &gt; info: &lt;-- GET /wd/hub/session/b60caca97c18f7fda779c67865db496f 404 4.041 ms - 40 
  </code></pre>