org.openqa.selenium.WebDriverException: chrome not reachable

org.openqa.selenium.WebDriverException: chrome not reachable
(Session info: chrome=53.0.2785.49)
(Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 11 milliseconds
Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: ‘2016-06-30 19:26:09’
System info: host: ‘TRBIR0RI3KICQSJ’, ip: ‘192.168.101.201’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_121’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{appPackage=com.play.android, app=D:\workSpace\EclipseProjects\AppiumForEclipse\apps\play-debug.apk, deviceScreenSize=1080x1920, networkConnectionEnabled=true, noReset=false, warnings={}, databaseEnabled=false, deviceName=85GBBMA2353T, platform=LINUX, deviceUDID=85GBBMA2353T, appActivity=com.play.android.activity.SplashActivity, desired={appPackage=com.play.android, appActivity=com.play.android.activity.SplashActivity, app=D:\workSpace\EclipseProjects\AppiumForEclipse\apps\play-debug.apk, noReset=false, unicodeKeyboard=true, platformName=Android, deviceName=85GBBMA2353T, resetKeyboard=true}, platformVersion=5.1, webStorageEnabled=false, locationContextEnabled=false, takesScreenshot=true, javascriptEnabled=true, deviceModel=MX5, unicodeKeyboard=true, platformName=Android, deviceManufacturer=Meizu, resetKeyboard=true}]
Session ID: 8ddfaffa-1a46-4de1-95cc-c610c10052e7
*** Element info: {Using=xpath, value=//*[@id=‘pageWrap’]/section/div/ul/li[1]/a/img}

appium version:1.6.5

code like this,first time it runs nomally,second time,it doesnt work well,and response as above.

        mdriver.context("WEBVIEW_com.play.android");
		
		if (!m_tee_h5.isDisplayed()) {
			mdriver.navigate().refresh();
			System.out.println("refresh…");
			if (!m_tee_h5.isDisplayed()) {
				assertTrue(false);
			}
		}

[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘D:\SoftWare\SDK\platform-tools\adb.exe’ with args: ["-P",5037,"-s",“85GBBMA2353T”,“shell”,“cat”,"/proc/net/unix"]
[debug] [AndroidDriver] WEBVIEW_5766 mapped to pid 5766
[debug] [AndroidDriver] Getting process name for webview
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘D:\SoftWare\SDK\platform-tools\adb.exe’ with args: ["-P",5037,"-s",“85GBBMA2353T”,“shell”,“ps”]
[debug] [AndroidDriver] Parsed pid: 5766 pkg: com.play.android!
[debug] [AndroidDriver] from: u0_a446,5766,363,2180612,252228,ffffffff,00000000,R,com.play.android
[debug] [AndroidDriver] returning process name: com.play.android
[debug] [AndroidDriver] Found webviews: [“WEBVIEW_com.play.android”]
[debug] [AndroidDriver] Available contexts: [“NATIVE_APP”,“WEBVIEW_com.play.android”]
[debug] [AndroidDriver] Connecting to chrome-backed webview context ‘WEBVIEW_com.play.android’
[debug] [AndroidDriver] Found existing Chromedriver for context ‘WEBVIEW_com.play.android’. Using it.
[debug] [JSONWP Proxy] Proxying [GET /url] to [GET http://127.0.0.1:9515/wd/hub/session/03ed0a5df552796d1734c756a3568f63/url] with no body
[debug] [AndroidBootstrap] Emitting alert message…
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Emitting system alert message
[debug] [AndroidDriver] ChromeDriver is not associated with a window. Re-initializing the session.
[Chromedriver] Restarting chromedriver
[debug] [Chromedriver] Changed state to ‘restarting’
[debug] [JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:9515/wd/hub/session/03ed0a5df552796d1734c756a3568f63] with no body
[debug] [AndroidBootstrap] Emitting alert message…
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Emitting system alert message
[Chromedriver] ProxyRequestError: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
at JWProxy.proxy$ (…/…/…/lib/jsonwp-proxy/proxy.js:153:13)
at tryCatch (D:\MyProgram\nodejs\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (D:\MyProgram\nodejs\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (D:\MyProgram\nodejs\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (D:\MyProgram\nodejs\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
{ ProxyRequestError: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
at JWProxy.proxy$ (…/…/…/lib/jsonwp-proxy/proxy.js:153:13)
at tryCatch (D:\MyProgram\nodejs\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (D:\MyProgram\nodejs\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (D:\MyProgram\nodejs\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (D:\MyProgram\nodejs\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37) jsonwp: null }
[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))
[Chromedriver] No old chromedrivers seemed to exist
[Chromedriver] Spawning chromedriver with: D:\MyProgram\nodejs\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe --url-base=wd/hub --port=9515 --adb-port=5037
[Chromedriver] [STDOUT] Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 9515
Only local connections are allowed.
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
[debug] [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”}}}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.play.android”,“androidUseRunningApp”:true,“androidDeviceSerial”:“85GBBMA2353T”}}}
[debug] [JSONWP Proxy] Got response with status 200: {“sessionId”:“60c53dfaa6a85ef6a3517581d46b6ec9”,“status”:0,“value”:{“acceptSslCerts”:true,“applicationCacheEnabled”:false,“browserConnectionEnabled”:false,“browserName”:“chrome”,“chrome”:{},“cssSelectorsEnabled”:true,“databaseEnabled”:false,“handlesAlerts”:true,“hasTouchScreen”:true,“javascriptEnabled”:true,“locationContextEnabled”:true,“mobileEmulationEnabled”:false,“nativeEvents”:true,“platform”:“ANDROID”,“rotatable”:false,“takesHeapSnapshot”:true,“takesScreenshot”:true,“version”:“53.0.2785.49”,“webStorageEnabled”:true}}
[debug] [Chromedriver] Changed state to ‘online’

Did you solve problem? I got same

no,i give up all about chromedriver , i don`t think it works well.

Don’t understand, how did you do that? You changed chromedriver on another? Or will you not write tests on webview?
I faced with this issue when changed capability “automationName” to “uiautomator2”

I have seen this issue for awhile now. When I attempt to select the same element twice in the same test, this error will frequently arise. It isn’t consistent, but it does happen enough that we are thoroughly stuck.

thks for your advice,i will try

Hi @dbashford ,
I’m also facing the same issue.
I’m using appium 1.6.5
Tried it with chromedriver 2.30, 2.31, 2.28… every time I get the same error.
Were you able to resolve this?

I’m using appium 1.7.1 and I’m also facing this issue.
I’m running 2 test cases and I always meet this exception at the second test case.
Then I set caps “AndroidMobileCapabilityType.RECREATE_CHROME_DRIVER_SESSIONS = true”, and now, it worked fine
Hope this will be as useful for you, man.

I’m using appium 1.7.2 and I’m also facing this issue.
I’m running 2 test cases and I always meet this exception at the second test case.
Then I set caps “AndroidMobileCapabilityType.RECREATE_CHROME_DRIVER_SESSIONS = true”, and its not working.

appium version 1.7.2
node version 9.4.0
npm version 5.6.0
chrome version : 61.0
chrome driver version : i tired 2.32 & 2.33
kindly help me