FuckTheWorld / chromedriver

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

"unable to discover open pages" and "Chrome Automation Extension has crashed." on Windows 8.1 RTM #539

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
ChromeDriver will crash as soon as the ChromeDriver constructor is invoked. No 
special setting is been used. The exact same call works just fine in Windows 8.

Steps to reproduce:
The following C# code snippet reproduces the issue:

var chromeOptions = new ChromeOptions();
chromeOptions.AddArgument("--verbose");
ChromeDriverService chromeDriverService = 
ChromeDriverService.CreateDefaultService("C:\\chromedriver");
chromeDriverService.LogPath = "C:\\thelog.log";
ChromeDriver driver = new ChromeDriver(chromeDriverService, chromeOptions);

Expected result: Chrome browser should load successfully.

Actual result: InvalidOperationException: "unknown error: unable to discover 
open pages". Also, this error pops up in the task bar: "Chrome Automation 
Extension has crashed."

OS: Windows 8.1 x64 RTM
Browser: Chrome 29
Chrome Driver: 2.3
WebDriver: 2.35
.Net Framework 4.5

Please see the attached log file.

Original issue reported on code.google.com by JCas...@gmail.com on 24 Sep 2013 at 5:35

Attachments:

GoogleCodeExporter commented 9 years ago
I experienced the same issue this week. The only difference is that it was 
working on WIN 8.1. Not sure it's caused by a recent chrome update.

Original comment by tnl...@gmail.com on 2 Oct 2013 at 2:29

GoogleCodeExporter commented 9 years ago
I am hitting the same issue, using:
OS: Windows 7 x64
Browser: Chrome 31
Chrome Driver: 2.6
WebDriver: 2.37
.NET 4.5 

Original comment by JohnG...@gmail.com on 18 Nov 2013 at 10:21

GoogleCodeExporter commented 9 years ago
I am also seeing the same issue:
OS: Windows 7 x64
Browser: Chrome 31
Chrome Driver: 2.6, 2.7
WebDriver: 2.37
.NET 4.5

Original comment by zek...@gmail.com on 4 Dec 2013 at 11:09

GoogleCodeExporter commented 9 years ago
It's interesting to note that when I compile with .NET 4.0 I don't see this 
issue, can some one verify? (Not sure if there is in fact a link here)

Original comment by zek...@gmail.com on 4 Dec 2013 at 11:16

GoogleCodeExporter commented 9 years ago
I still have this issue even when compiling against .NET 4.0.

Original comment by JohnG...@gmail.com on 6 Dec 2013 at 9:57

GoogleCodeExporter commented 9 years ago
Seeing same on Win 8.1 

Original comment by amus...@gmail.com on 6 Dec 2013 at 11:34

GoogleCodeExporter commented 9 years ago
A similar issue was found and fixed in chromedriver 2.6. If anyone's still 
seeing this issue on older versions of chromedriver, the first thing to do 
would be to upgrade to the latest release (currently 2.7).

http://chromedriver.storage.googleapis.com/index.html

If you're seeing this issue on 2.6+, please post the output of the following:

1. run chromedriver with logging turned on
2. open up the log file, and read the port number that is passed to chrome via 
the --remote-debugging-port argument (e.g. JCasaIt's example uses 
--remote-debugging-port=58553)
3. navigate to localhost:58553/json (replace 58553 with whatever port you've 
got)

Original comment by samu...@chromium.org on 9 Dec 2013 at 5:08

GoogleCodeExporter commented 9 years ago
A workaround I found is to use the "--no-sandbox" flag (not optimal but if 
you're desperate).  

PS.  I'm still seeing this issue on with Chomedriver 2.8, but can't get any 
logs because logging is broken (issue 638)
OS: Windows 8.1 x64 RTM
Browser: Chrome 32.0.1700.41 m Aura
Chrome Driver: 2.8
WebDriver: 2.39
.NET 4.5

Original comment by RPW...@gmail.com on 7 Jan 2014 at 2:05

GoogleCodeExporter commented 9 years ago
We are also employing the --no-sandbox flag as a workaround for now.

Original comment by JohnG...@gmail.com on 30 Jan 2014 at 9:22

GoogleCodeExporter commented 9 years ago
@RPWong, chromedriver 2.9 has recently been released, which fixes the logging 
issue on Windows. Could you try using that, and post your logs?

Original comment by samu...@chromium.org on 3 Feb 2014 at 11:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I tried going to localhost12614/json but all it has is an empty array:
[  ]

Attached the chromedriver logs

OS: Windows 8.1 x64 RTM
Browser: Chrome 32.0.1700.107 m
Chrome Driver: 2.9
WebDriver: 2.39
.NET 4.5

Original comment by RPW...@gmail.com on 5 Feb 2014 at 12:52

Attachments:

GoogleCodeExporter commented 9 years ago
Works for me on both Windows 7 and 8.1.

Do you have any local policies set up such as extension whitelisting (see 
chrome://policy)?

Another thing to try would be to launch chrome directly (rather than through 
chromedriver) and see what comes up at localhost:12614/json. The command line 
is on the second-last line (75) of your webdriverLog.txt file.

Original comment by samu...@chromium.org on 6 Feb 2014 at 10:28

GoogleCodeExporter commented 9 years ago
No local policies from chrome://policy.

I'm able to launch chrome fine through a command line (although I had to modify 
the load extension's path to point to a scoped_dir that existed.)

Original comment by RPW...@gmail.com on 6 Feb 2014 at 11:09

GoogleCodeExporter commented 9 years ago
Did anything come up at localhost:12614/json or was it an empty array again?

Original comment by samu...@chromium.org on 6 Feb 2014 at 11:25

GoogleCodeExporter commented 9 years ago
Oops missed that part of the instructions.  Loading the localhost:12614/json 
does return the following:

[ {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:12614/devtools/page/B21C3142-8CEE-4952-913D-4972333EAB33",
   "id": "B21C3142-8CEE-4952-913D-4972333EAB33",
   "title": "data:,",
   "type": "page",
   "url": "http://localhost:12614/json",
   "webSocketDebuggerUrl": "ws://localhost:12614/devtools/page/B21C3142-8CEE-4952-913D-4972333EAB33"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:12614/devtools/page/BC228C2E-1FC3-41FA-BD7E-1D56B0DA8754",
   "faviconUrl": "chrome://extension-icon/aapnijgdinlhnhlmodcfapnahmbfebeb/24/1",
   "id": "BC228C2E-1FC3-41FA-BD7E-1D56B0DA8754",
   "title": "Chrome Automation Extension",
   "type": "background_page",
   "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://localhost:12614/devtools/page/BC228C2E-1FC3-41FA-BD7E-1D56B0DA8754"
} ]

Original comment by RPW...@gmail.com on 6 Feb 2014 at 11:49

GoogleCodeExporter commented 9 years ago
@RPWong, the output of localhost:12614/json looks good to me.

Would mind trying with verbose logging and please send us the chromedriver.log?
https://sites.google.com/a/chromium.org/chromedriver/logging

From chromedriver.log with verbose logging turned on, we could know more 
details of what's going on with the chromedriver server and the errors you run 
into.

Besides the error "unable to discover open pages", do you also run into "Chrome 
Automation Extension has crashed."?

Original comment by st...@chromium.org on 7 Feb 2014 at 12:52

GoogleCodeExporter commented 9 years ago
Attached the verbose log.

Yes I see popups saying the following extensions have crashed:
Feedback
Settings 
Hangout Services
Chrome Automation Extension

Original comment by RPW...@gmail.com on 7 Feb 2014 at 2:42

Attachments:

GoogleCodeExporter commented 9 years ago
Also I noticed that the error now says:
OpenQA.Selenium.WebDriverException: OpenQA.Selenium.WebDriverException: The 
HTTP request to the remote WebDriver server for URL 
http://localhost:53849/session timed out after 60 seconds. ---> 
System.Net.WebException: The operation has timed out. Aborting test execution.

Original comment by RPW...@gmail.com on 7 Feb 2014 at 2:44

GoogleCodeExporter commented 9 years ago
I copied the internal folder that contained the chrome automation extension 
that got created (last time I just picked another internal folder that was 
already laying around the temp folder, which I guess might have been an old 
one?) and tried to run chrome through the command line again.  This time chrome 
started but the chrome automation extension crashed; the other extensions 
(feedback, etc) did not crash.

In the command prompt I see the following errors:
[4624:14460:0206/190904:ERROR:desktop_root_window_host_win.cc(746)] NOT 
IMPLEMENTED
[4624:14460:0206/190904:ERROR:child_process_launcher.cc(332)] Failed to launch 
child process

Original comment by RPW...@gmail.com on 7 Feb 2014 at 3:11

GoogleCodeExporter commented 9 years ago
*edit* (you should add an actual edit button :) )
There was also another error I missed:
[4624:14460:0206/190904:ERROR:chrome_views_delegate.cc(176)] NOT IMPLEMENTED

Original comment by RPW...@gmail.com on 7 Feb 2014 at 3:14

GoogleCodeExporter commented 9 years ago
I am running into this issue with the latest driver (2.9). --no-sandbox works 
fine though - any idea when this might get fixed?

Original comment by chandram...@gmail.com on 2 Apr 2014 at 7:42

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Tried on both Win 8.1 and Win 7, i am not able to reproduce the issue with 
latest version of chromedriver 2.14

Can you please try with latest version and let us know if you see the issue?

Original comment by gmanikp...@chromium.org on 7 Apr 2015 at 10:16

GoogleCodeExporter commented 9 years ago
Can you please try with latest version of chromedriver and chrome browser and 
let us know if you see the issue?

Original comment by ssudunag...@chromium.org on 18 May 2015 at 10:40

GoogleCodeExporter commented 9 years ago
JCasalT / RPWong / chandramouleswaran

please try with latest chromedriver:2.16 with sample code provided below and 
let us know if you are still seeing the issue.

Sample Code:
ChromeDriverService cdservice=new ChromeDriverService.Builder()
        .usingDriverExecutable(new File("drivers/chromedriver.exe"))
        .withLogFile(new File("drivers/chromedriver.log"))
        .usingAnyFreePort()
        .build();
cdservice.start();
WebDriver driver = new ChromeDriver(cdservice);
driver.get("http://www.google.com");

Original comment by ssudunag...@chromium.org on 19 Jun 2015 at 10:37

shabana-parveen commented 8 years ago

Updated Chrome driver with http://chromedriver.storage.googleapis.com/index.html?path=2.22/,

But issue is still persist.

Time elapsed: 63.877 sec <<< FAILURE! org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 61.00 seconds Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: XXX', ip: 'XXXX', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40' Driver info: org.openqa.selenium.chrome.ChromeDriver

Results :

Failed tests: Test_CP_XXXSetUp:95 » WebDriver unknown error...

Tests run: 209, Failures: 1, Errors: 0, Skipped: 208

[ERROR] There are test failures.

davidpitanguy commented 8 years ago

I am with the same error, log: [23.464][INFO]: COMMAND InitSession { "desiredCapabilities": { "browserName": "chrome", "chromeOptions": { "args": [ "user-data-dir=src/main/resources/chromedriver/profile", "--start-maximized" ], "extensions": [ ] }, "platform": "ANY", "version": "" } } [23.467][INFO]: Populating Preferences file: { "alternate_error_pages": { "enabled": false }, "autofill": { "enabled": false }, "browser": { "check_default_browser": false }, "distribution": { "import_bookmarks": false, "import_history": false, "import_search_engine": false, "make_chrome_default_for_user": false, "show_welcome_page": false, "skip_first_run_ui": true }, "dns_prefetching": { "enabled": false }, "profile": { "content_settings": { "patternpairs": { "https://,_": { "media-stream": { "audio": "Default", "video": "Default" } } } }, "default_content_setting_values": { "geolocation": 1 }, "default_content_settings": { "geolocation": 1, "mouselock": 1, "notifications": 1, "popups": 1, "ppapi-broker": 1 }, "password_manager_enabled": false }, "safebrowsing": { "enabled": false }, "search": { "suggest_enabled": false }, "translate": { "enabled": false } } [23.469][INFO]: Populating Local State file: { "background_mode": { "enabled": false }, "ssl": { "rev_checking": { "enabled": false } } } [23.481][INFO]: Launching chrome: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-background-networking --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-logging --ignore-certificate-errors --load-extension="C:\Users\T39672\AppData\Local\Temp\scoped_dir13580_21009\internal" --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12622 --safebrowsing-disable-auto-update --start-maximized --test-type=webdriver --use-mock-keychain --user-data-dir=src/main/resources/chromedriver/profile [85.114][INFO]: RESPONSE InitSession unknown error: Chrome failed to start: crashed

shabana-parveen commented 8 years ago

Hey,

My problem gets resolved after performing below steps:

If you are using windows, run your Jenkins services in system admin,

  1. open to run cmd
  2. Enter service and click Okay button
  3. A service dialog box open, locate Jenkins services. Go to properties of service
  4. Go to logon tab, choose the second option. provide the your admin user not the local server
  5. then restart the services.

PS: Chrome driver needs admin permission to initiate Chrome, for other references please have a look on google group item : https://groups.google.com/forum/#!topic/selenium-users/gfvfH-YEC48

Thanks, Shabana

shabana-parveen commented 8 years ago

Guys, Today I again faced the same issue with updated Chrome driver, and got the work around as below, its working fine for me.

           System.setProperty("webdriver.chrome.driver", Remote_ChromeDriverPath);
    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    ChromeOptions options = new ChromeOptions();
    options.addArguments("--disable-extensions");
    options.addArguments("no-sandbox");
    options.addArguments("ignore-certificate-errors"); 
        options.addArguments("--allow-running-insecure-content");
               capabilities.setCapability("chrome.binary", Remote_ChromeDriverPath);
       capabilities.setCapability(ChromeOptions.CAPABILITY, options);

    driver = new ChromeDriver(capabilities);
rmullaguri2308 commented 8 years ago

I had tried Jenkins to logon as admin and tried chrome latest versions didn't work
Thanks Shaba,Above solution worked fine.

shabana-parveen commented 8 years ago

Good to know @rmullaguri2308 :)

joelfogue commented 8 years ago

If you're still getting this error 'unable to discover open pages' find the answer by Pelican at this link:

http://stackoverflow.com/questions/21001652/chrome-driver-error-using-selenium-unable-to-discover-open-pages/38700776#38700776

Worked for me!