Chromedriver with appium behaving weird. Please read the whole post.

932 views
Skip to first unread message

Adil Imroz

unread,
Nov 8, 2013, 1:38:18 AM11/8/13
to appium-...@googlegroups.com
Hello Folks,

I have been trying to to make chromedriver work with appium. Earlier I had a confusion whether it needed a rooted device or not. But now I managed to root one of my android device and run the test. But still no success. 

While running my test with appium and chrome driver am getting two types of error. But the most weird part is even after getting these two error there was a moment when after doing nothing special, only restarting the appium and running test, the chrome driver worked !!!!! But again once my system I restarted the system and tried to run it again i again started getting these two errors, that magic moment is not coming back again.

Would be great if someone can help me with this. 

Please see the first sort of error below

LOG 1

----------------------------------------------------------------------------------------------------------------------------------------------------------

info: Welcome to Appium v0.8.2 (REV e9cc66197ad6a3496322bd77a8699509fc761b69)


info: Appium REST http interface listener started on 0.0.0.0:4723

info: socket.io started


info: Looks like we want chrome on android


debug: Appium request initiated at /wd/hub/session


info: Clearing out any previous sessions

info: Creating new appium session 29f51ec7-dae4-46c7-9057-1cb55f730f25

info: Ensuring Chromedriver exists


debug: Request received with params: {"desiredCapabilities":{"app":"Chrome","device":"Android"}}


info: Spawning chromedriver with: /Users/Adil/Documents/chromedriver


info: Creating Chrome session


info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/session","method":"POST","jar":false,"headers":{"Content-Length":98,"Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:9515"},"body":"{\"sessionId\":null,\"desiredCapabilities\":{\"chromeOptions\":{\"androidPackage\":\"com.android.chrome\"}}}"}


error: Failed to start an Appium session, err was: Error: connect ECONNREFUSED


info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started (Original error: connect ECONNREFUSED)","code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","origValue":"connect ECONNREFUSED"},"sessionId":"29f51ec7-dae4-46c7-9057-1cb55f730f25"}

POST /wd/hub/session 500 1579ms - 316

info: Clearing out appium devices

info: Clearing out any previous sessions

info: [CHROMEDRIVER] Starting ChromeDriver (v2.6.232908) on port 9515

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Now when I restart appium and run the test I get this second type of error

LOG 2

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

info: Welcome to Appium v0.8.2 (REV e9cc66197ad6a3496322bd77a8699509fc761b69)


info: Appium REST http interface listener started on 0.0.0.0:4723

info: socket.io started


info: Looks like we want chrome on android


debug: Appium request initiated at /wd/hub/session


info: Clearing out any previous sessions

info: Creating new appium session 6928ba14-31be-48ad-a1f8-b011520a2c3e

info: Ensuring Chromedriver exists


debug: Request received with params: {"desiredCapabilities":{"app":"Chrome","device":"Android"}}


info: Spawning chromedriver with: /Users/Adil/Documents/chromedriver


info: [CHROMEDRIVER] Starting ChromeDriver (v2.6.232908) on port 9515


info: [CHROMEDRIVER STDERR] [0.004][SEVERE]: Could not bind socket to 0.0.0.0:9515


info: [CHROMEDRIVER] Port not available. Exiting...


error: Failed to start an Appium session, err was: Error: Chromedriver quit before it was available


info: Chromedriver exited with code 1

info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started (Original error: Chromedriver quit before it was available)","origValue":"Chromedriver quit before it was available"},"sessionId":"6928ba14-31be-48ad-a1f8-b011520a2c3e"}

POST /wd/hub/session 500 375ms - 275

info: Clearing out appium devices

info: Clearing out any previous sessions

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Regards

Adil Imroz


Jonathan Lipps

unread,
Nov 8, 2013, 12:07:13 PM11/8/13
to Adil Imroz, appium-...@googlegroups.com
What version of chrome is on your device?

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Aniket Gadre

unread,
Nov 9, 2013, 9:45:56 AM11/9/13
to Jonathan Lipps, Adil Imroz, appium-...@googlegroups.com
Also seems port is in use?
--
Best Regards,
Aniket Gadre
Test Automation Lead
Amdocs , Pune.
E-add: aniket...@amdocs.com

Tejesh G

unread,
Nov 11, 2013, 7:03:01 AM11/11/13
to appium-...@googlegroups.com
Hi All,

We are trying to perform mobile browser automation on ANDROID EMULATOR(Device-Nexus One) on Windows 7 Environment.
We have been reading in blogs that APPIUM Version 0.11.3 supports CHROME.
As per the blog information we have installed CHROME.apk Version 30(Chrome_30.0.1599.92.apk)
We have specified the chromedriver.exe  path in PATH variable.
The blog says that there is no need of specifying the "app-package" and "app-activity" when we try to launch a browser.
In spite of following the steps specified in blogs we are facing issues in running tests through APPIUM.
I get the following error when I try to execute the test:

debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"WINDOWS
","app":"chrome","device":"Android","version":"4.2"}}

info: Looks like we want chrome on android
info: Creating new appium session c2990f8c-bed9-4831-9787-6f66c407cb0c
info: Ensuring Chromedriver exists
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Could not find chromed
river, is it on PATH?
info: Responding to client with error: {"status":33,"value":{"message":"A new se
ssion could not be created. (Original error: Could not find chromedriver, is it
on PATH?)","origValue":"Could not find chromedriver, is it on PATH?"},"sessionId
":null}
POST /wd/hub/session 500 195ms - 236b


Would be great if any one can help in resolving the issue.


Regards
Tejesh
Chrometest.txt

Aniket Gadre

unread,
Nov 11, 2013, 7:13:37 AM11/11/13
to Tejesh G, appium-...@googlegroups.com
1st thing is do not hack someone else's thread. You can always start a new thread for new issue
2nd , you might have to restart eclipse or whatever IDE you are using after adding chromedriver path to $PATH to pick up updated $PATH


--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Tejesh G

unread,
Nov 11, 2013, 7:42:07 AM11/11/13
to appium-...@googlegroups.com
Also restarted the Eclipse IDE after adding chromedriver path to the PATH variable.

Tejesh G

unread,
Nov 11, 2013, 7:46:06 AM11/11/13
to appium-...@googlegroups.com, Tejesh G
sorry for that .
I did restart IDE after adding chrome driver path to the PATH variable. But still facing the same issue.

Jonathan Lipps

unread,
Nov 11, 2013, 11:28:25 AM11/11/13
to Aniket Gadre, Adil Imroz, appium-...@googlegroups.com
What's running on the port? Maybe just restart your comp to see what's up

hari haran

unread,
Jan 16, 2014, 1:52:55 AM1/16/14
to appium-...@googlegroups.com, Aniket Gadre, Adil Imroz
Hi,
 
Am also facing similiar issues. Please set a prerequiste for chrome browser testing.
 
a) $PATH = path of chromedriver.exe
b) Is the any chrome apk file need to be installed in emulator?
 
Please suggest this would be helpful to everyone.
 
Regards,
Hari

Jonathan Lipps

unread,
Jan 16, 2014, 12:06:20 PM1/16/14
to hari haran, appium-...@googlegroups.com, Aniket Gadre, Adil Imroz
yes, you need to have a chrome apk in the emulator

hari haran

unread,
Jan 16, 2014, 9:35:53 PM1/16/14
to appium-...@googlegroups.com, hari haran, Aniket Gadre, Adil Imroz
 
Hi Jon,
 
I have installed chrome apk in android emulator. script could able to open chrome browser but its not getting connected to internet.
 
Regards,
Hariharan.

Jonathan Lipps

unread,
Jan 17, 2014, 12:24:48 PM1/17/14
to hari haran, appium-...@googlegroups.com, Aniket Gadre, Adil Imroz
That's not an appium issue--sounds like an issue with the emulator.
Reply all
Reply to author
Forward
0 new messages