Running test on any Android 'O' device fails due to "Chrome not reachable" error

Summary:
I have an Android app whose Login page is a web view page. When I run the code on any Android ‘O’ real device, app gets installed but fails to login. Checking the Appium logs says “Chrome not reachable”.

Environment Details:
Appium Version: 1.7.0-beta,1.6.5
MAC OS version used to run Appium: 10.11.6
Mobile Platform version: 8.0.0
Real Device: Pixel / Nexus 6P

Appium Logs:
[debug] \cf2 [AndroidDriver]\cf0 A port was not given, using random port: 8000
[debug] \cf2 [Chromedriver]\cf0 Changed state to ‘starting’
\cf2 [Chromedriver]\cf0 Set chromedriver binary as: /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver
\cf2 [Chromedriver]\cf0 Killing any old chromedrivers, running: pkill -15 -f “/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver.*–port=8000”
\cf2 [Chromedriver]\cf0 No old chromedrivers seemed to exist
\cf2 [Chromedriver]\cf0 Spawning chromedriver with: /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver --url-base=wd/hub --port=8000 --adb-port=5037
\cf2 [Chromedriver]\cf0 [STDOUT] Starting ChromeDriver 2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262) on port 8000
Only local connections are allowed.
[debug] \cf2 [JSONWP Proxy]\cf0 Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
[debug] \cf2 [JSONWP Proxy]\cf0 Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
[debug] \cf2 [JSONWP Proxy]\cf0 Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
[debug] \cf2 [JSONWP Proxy]\cf0 Got response with status 200: “{\“sessionId\”:\”\",\“status\”:0,\“value\”:{\“build\”:{\“version\”:\“alpha\”},\“os\”:{\“arch\”:\“x86_64\”,\“name\”:\“Mac OS X\”,\“version\”:\“10.11.6\”}}}"
[debug] \cf2 [JSONWP Proxy]\cf0 Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.sharefile.customworkflow”,“androidUseRunningApp”:true,“androidDeviceSerial”:“FA6AB0304976”}}}
[debug] \cf2 [JSONWP Proxy]\cf0 Got response with status 200: {“sessionId”:“5d3bc0287ff8d6630dbdf69dc58bc3d4”,“status”:100,“value”:{“message”:“chrome not reachable\n (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)”}}
[debug] \cf2 [JSONWP Proxy]\cf0 Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.sharefile.customworkflow”,“androidUseRunningApp”:true,“androidDeviceSerial”:“FA6AB0304976”}}}
[debug] \cf2 [JSONWP Proxy]\cf0 Got response with status 200: {“sessionId”:“bb33bb06a93e77d9c6560866c2f8eb40”,“status”:100,“value”:{“message”:"chrome not reachable\n (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)"}}
[debug] \cf2 [JSONWP Proxy]\cf0 Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.sharefile.customworkflow”,“androidUseRunningApp”:true,“androidDeviceSerial”:“FA6AB0304976”}}}
[debug] \cf2 [JSONWP Proxy]\cf0 Got response with status 200: {“sessionId”:“2942bb4297e1d39f2ef01e60f12bce01”,“status”:100,“value”:{“message”:"chrome not reachable\n (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)"}}
[debug] \cf2 [JSONWP Proxy]\cf0 Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.sharefile.customworkflow”,“androidUseRunningApp”:true,“androidDeviceSerial”:“FA6AB0304976”}}}
[debug] \cf2 [JSONWP Proxy]\cf0 Got response with status 200: {“sessionId”:“5e362811ac41c175eaeac65bb62fec4c”,“status”:100,“value”:{“message”:"chrome not reachable\n (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)"}}
\cf2 [Chromedriver]\cf0 Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] \cf2 [Chromedriver]\cf0 Changed state to ‘stopped’
\cf2 [Chromedriver]\cf0 Error: chrome not reachable
(Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)
at Chromedriver.callee$2$0$ (…/…/lib/chromedriver.js:182:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: chrome not reachable
(Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)
at Chromedriver.callee$2$0$ (…/…/lib/chromedriver.js:182:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
\cf2 [MJSONWP]\cf0 Encountered internal error running command: Error: chrome not reachable
(Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)
at Chromedriver.callee$2$0$ (…/…/lib/chromedriver.js:182:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)\

Due to this issue am not able to run the code on any Android ‘O’ device. Could anybody please help me to solve this issue?

Thanks,
Meghana

I recomend you try to reach the app with Appium Desktop (open the inspector), there you can check if your capabilities are right.

Hi @krantos, I tried with Appium Desktop as well. It has the same issue. App gets installed but fails to login. Appium logs says the same as earlier.

What are the capabilities?

Here are the Capabilities >>

[Appium] appPackage: ‘com.ACTUAL.APP_PACKAGEID’
[Appium] appActivity: ‘com.ACTUAL.APP_PACKAGEID.activity.LauncherActivity’
[Appium] recreateChromeDriverSessions: true
[Appium] noReset: true
[Appium] newCommandTimeout: ‘120000’
[Appium] platformVersion: ‘8.0.0’
[Appium] browserName: ‘Chrome’
[Appium] platformName: ‘Android’
[Appium] deviceName: ‘Pixel’
[AndroidDriver] AndroidDriver version: 1.20.0

Chrome Version used in device is: 60.0.3112.116

Check this: https://github.com/appium/appium/issues/8958
and this: https://github.com/mi2pankaj/chromeDriverHandler

Hi @krantos, thanks for sharing the above two links.
I checked the comments on the issue logged #8958 and its still open. Am facing the exact same issue on Android ‘O’. I will follow up with that.

Thanks,
Meghana