Appium : Android chrome browser launched & closed automatically
See original GitHub issueThe problem
When i try to run the following script via real device, results in session not found issue . Anyone help me out to resolve the same ! DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(“deviceName”, “000e20727b839f”); capabilities.setCapability(“newCommandTimeout”, 120); capabilities.setCapability(“browserName”, “Chrome”); capabilities.setCapability(“launchTimeout”, “100000”); capabilities.setCapability(“platformName”, “Android”); capabilities.setCapability(“platformVersion”, “6.0.1”); driver = new RemoteWebDriver(new URL(“http://10.155.104.185:4723/wd/hub”), capabilities); driver.navigate().to(“http://www.google.com”); System.out.println(“Android Device browser called successfully”);
Note: Chrome is updated to the latest Selenium webdriver : 3.0.1
Environment
- Appium version (or git revision) that exhibits the issue: 1.4.16
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium:Windows 7 64bit
- Node.js version (unless using Appium.app|exe):
- Mobile platform/version under test: Android 6.0.1
- Real device or emulator/simulator: Real device ,Galaxy Note5
- Appium CLI or Appium.app|exe:
Details
Describe in more detail the problem you have been experiencing, if necessary.
Link to Appium logs
info: Chromedriver: Changed state to ‘starting’ info: Chromedriver: Set chromedriver binary as: C:\Program Files (x86)\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: [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: Chromedriver: No old chromedrivers seemed to exist info: Chromedriver: Spawning chromedriver with: C:\Program Files (x86)\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.android.chrome”,“androidDeviceSerial”:“1115fb90a0a70304”}}} info: JSONWP Proxy: Got response with status 200: {“sessionId”:“2bfb3242510d121a1149668cc0360fb5”,“status”:13,“value”:{“message”:"unknown error: Device 1115fb90a0a70304 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb51… 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”:“1115fb90a0a70304”}}} info: JSONWP Proxy: Got response with status 200: {“sessionId”:“0fee9abce5d95006999f124f95cb196c”,“status”:13,“value”:{“message”:"unknown error: Device 1115fb90a0a70304 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb51… 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”:“1115fb90a0a70304”}}} info: JSONWP Proxy: Got response with status 200: {“sessionId”:“df91f783fefcdf2f4fe3c6ed30290426”,“status”:13,“value”:{“message”:"unknown error: Device 1115fb90a0a70304 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb51… 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”:“1115fb90a0a70304”}}} info: JSONWP Proxy: Got response with status 200: {“sessionId”:“47e83f716322a3bdbaee0b674e65321d”,“status”:13,“value”:{“message”:"unknown error: Device 1115fb90a0a70304 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb51… error: Chromedriver: Chromedriver exited unexpectedly with code null, signal SIGTERM info: Chromedriver: Changed state to ‘stopped’ info: Chromedriver stopped unexpectedly on us, shutting down then calling back up with the on-die callback error: Chromedriver: Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 1115fb90a0a70304 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 (C:\Program Files (x86)\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] (C:\Program Files (x86)\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] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js💯21) at GeneratorFunctionPrototype.invoke (C:\Program Files (x86)\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 (C:\Program Files (x86)\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 C:\Program Files (x86)\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💯28 at flush (C:\Program Files (x86)\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 1115fb90a0a70304 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 1115fb90a0a70304 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64)’ }, httpCode: 200 } info: [debug] Cleaning up appium session 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 1115fb90a0a70304 is not online (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64)) info: [debug] Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 1115fb90a0a70304 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 (C:\Program Files (x86)\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] (C:\Program Files (x86)\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] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js💯21) at GeneratorFunctionPrototype.invoke (C:\Program Files (x86)\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 (C:\Program Files (x86)\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 C:\Program Files (x86)\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💯28 at flush (C:\Program Files (x86)\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) 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 1115fb90a0a70304 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 1115fb90a0a70304 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 1115fb90a0a70304 is not online\n (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64))”},“sessionId”:null} info: <-- POST /wd/hub/session 500 5634.757 ms - 863 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: {“status”:0,“value”:“OK, shutting down”} 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= info: [debug] [UIAUTOMATOR STDOUT] 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: 2.068 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] executing cmd: “D:\Android Setup\android-sdk-installer\platform-tools\adb.exe” -s 1115fb90a0a70304 shell “am force-stop com.android.chrome” info: [debug] Stopping logcat capture info: [debug] Logcat terminated with code null, signal SIGTERM info: [debug] Cleaning up appium session
Code To Reproduce Issue [ Good To Have ]
When i try to run the following script , results in session not found issue DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(“deviceName”, “000e20727b839f”); capabilities.setCapability(“newCommandTimeout”, 120); capabilities.setCapability(“browserName”, “Chrome”); capabilities.setCapability(“launchTimeout”, “100000”); capabilities.setCapability(“platformName”, “Android”); capabilities.setCapability(“platformVersion”, “6.0.1”); driver = new RemoteWebDriver(new URL(“http://10.155.104.185:4723/wd/hub”), capabilities); driver.navigate().to(“http://www.google.com”); System.out.println(“Android Device browser called successfully”);
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
Hi mykola-mokhnach ,
I had solved the issue, Thanks for your response and time !
Download latest chrome driver 2.25 https://chromedriver.storage.googleapis.com/index.html?path=2.25/ Provide path : capabilities.setCapability(“chromedriverExecutable”, “…path.//chromedriver.exe”);
DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(“deviceName”, “000e20727b839f”); capabilities.setCapability(“newCommandTimeout”, 120); capabilities.setCapability(“chromedriverExecutable”, “…path.//chromedriver.exe”); capabilities.setCapability(“browserName”, “Chrome”); capabilities.setCapability(“launchTimeout”, “100000”); capabilities.setCapability(“platformName”, “Android”); capabilities.setCapability(“platformVersion”, “6.0.1”); driver = new RemoteWebDriver(new URL(“http://10.155.104.185:4723/wd/hub”), capabilities); driver.navigate().to(“http://www.google.com”); System.out.println(“Android Device browser called successfully”);
Result :
Android chrome browser launched successfully !
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.