FuckTheWorld / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

chromedriver does not return if --remote-debugging-port argument is specified #878

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
See http://goo.gl/ll2FvQ for common issues.

Issue Description:
I am trying to automate my web-app using selenium. If I launch chrome.exe using 
chromeOptions and provide the argument --remote-debugging-port=xxyy through 
options.add_argument, then chrome gets launched. However, chromedriver does not 
return. It returns after a timeout of approx 30secs with the error msg which 
says "chrome not reachable"

chromedriver version: 2.10
chrome version: 36.0.1985.143 m
selenium version: 2.42.1

From what I see in the logs, chromedriver launches chrome.exe with the 
remote-debugging-port argument that I provided. However, chromedriver keeps 
sending the devtools request on a port which it generates uniquely. See 
attached log file qc1.log

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):
<enter repro steps here>

-----Other helpful tips:
Attach your chromedriver log with verbose logging enabled (see
http://goo.gl/5Sx8mC for how to do this).

Original issue reported on code.google.com by 11mohitb...@gmail.com on 13 Aug 2014 at 12:53

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Same issue here
[7.552][INFO]: Launching chrome: "<path_to_chrome>" 
--disable-background-networking --disable-client-side-phishing-detection 
--disable-component-update --disable-default-apps --disable-hang-monitor 
--disable-prompt-on-repost --disable-sync --disable-web-resources
--enable-logging --ignore-certificate-errors 
--load-extension="C:\Users\Dick\AppData\Local\Temp\scoped_dir9324_28935\internal
" --log-level=0 --metrics-recording-only --no-first-run --password-store=basic 
--remote-debugging-port=9555 --safebrowsing-disable-auto-update 
--safebrowsing-disable-download-protection --test-type=webdriver 
--url=file:///index.html --use-mock-keychain 
--user-data-dir="C:\Users\Dick\AppData\Local\Temp\scoped_dir9324_25757" data:,
[7.559][DEBUG]: DevTools request: http://127.0.0.1:12559/json/version
[8.558][DEBUG]: DevTools request failed
[8.609][DEBUG]: DevTools request: http://127.0.0.1:12559/json/version
....
[75.037][INFO]: RESPONSE InitSession unknown error: Chrome failed to start: 
exited normally

Original comment by dvdbrin...@gmail.com on 16 Jan 2015 at 2:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
#2  you may have different issue 

launch chrome with command line

"<path_to_chrome>" --disable-background-networking 
--disable-client-side-phishing-detection --disable-component-update 
--disable-default-apps --disable-hang-monitor --disable-prompt-on-repost 
--disable-sync --disable-web-resources
--enable-logging --ignore-certificate-errors 
--load-extension="C:\Users\Dick\AppData\Local\Temp\scoped_dir9324_28935\internal
" --log-level=0 --metrics-recording-only --no-first-run --password-store=basic 
--remote-debugging-port=9555 --safebrowsing-disable-auto-update 
--safebrowsing-disable-download-protection --test-type=webdriver 
--url=file:///index.html --use-mock-keychain 
--user-data-dir="C:\Users\Dick\AppData\Local\Temp\scoped_dir9324_25757" data:

Original comment by andrewch...@chromium.org on 22 Jan 2015 at 11:44

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18

GoogleCodeExporter commented 9 years ago
This issue is reproducible, when starting passing chromeOption with argument 
--remote-debugging-port=xxyy.  chrome session starts with data:, but do not 
listen any command after that. and in logfile it shows error message:- 

[60.637][INFO]: RESPONSE InitSession chrome not reachable 

attaching testcase to recreate the issue locally.

Original comment by agau...@chromium.org on 20 Apr 2015 at 7:19

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 26 May 2015 at 11:41

GoogleCodeExporter commented 9 years ago
I would like to make a case for this since it seems like this "bug" has been 
sitting for a while.

Chrome has wicked powerful profiling tools exposed through the remote debugger 
wire protocol and the built in chrome debugger.
As a developer on many projects and large complex applications, I want to have 
a way to automatically detect memory leaks, such as when I have detached DOM 
nodes or am allocating too many DOM nodes. 

Currently this test process is quite manual 
https://github.com/tastejs/todomvc/issues/1332#issue-85828508 , however 
selenium and chromedriver allow in theory for this process to automated. 

For example:
https://gist.github.com/samccone/86b792bf4fe27f35ed88

This would be the ideal process for me, however with this current bug I am 
blocked. I feel like the in theory the idea of automated perf testing is 
something that many people would be excited by. It would drive more people to 
use chromedriver and chrome debugging tools. Seems like a win on all fronts and 
a big win for the developer community.

Thanks for this great tool! 🎆 

Original comment by samcc...@gmail.com on 16 Jun 2015 at 2:58

GoogleCodeExporter commented 9 years ago
sam, I believe you can satisfy your usecases via the perfLoggingPrefs  and 
traceCategories
https://sites.google.com/a/chromium.org/chromedriver/logging/performance-log

Original comment by paulir...@chromium.org on 17 Jun 2015 at 8:05

GoogleCodeExporter commented 9 years ago
So it looks like if I start chromedriver with

--js-flags="--expose-gc"

I will gain access to the gc() function which then should allow me to make some 
assertions around a set of behaviors

The only caveat with this approach would be that I need a new driver session 
per perf test, but cool, thanks for the input I will give this a shot.

Original comment by samcc...@gmail.com on 17 Jun 2015 at 8:12