FuckTheWorld / chromedriver

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

ChromeDriver does not start if instance of Chrome is running #1123

Open GoogleCodeExporter opened 9 years ago

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

Issue Description:
ChromeDriver does not start if instance of Chrome is running. 

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):

Chrome Version 43.0.2357.124 (64-bit)
ChromeDriver 2.15.322455

SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 
1 (Exit value: 1)
Exception in thread "main" 
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new 
session. Possible causes are invalid address of the remote server or browser 
start-up failure.
Build info: version: '2.46.0', revision: 
'61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50'
System info: host: 'BlaineA-MBP10.local', ip: '10.11.203.253', os.name: 'Mac OS 
X', os.arch: 'x86_64', os.version: '10.10.3', java.version: '1.8.0_40'
Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
    at HTMLScrubber.<init>(HTMLScrubber.java:28)
    at Main.main(Main.java:9)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver 
server to start.
Build info: version: '2.46.0', revision: 
'61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50'
System info: host: 'BlaineA-MBP10.local', ip: '10.11.203.253', os.name: 'Mac OS 
X', os.arch: 'x86_64', os.version: '10.10.3', java.version: '1.8.0_40'
Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:170)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:63)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:578)
    ... 8 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out 
waiting for [http://localhost:16451/status] to be available after 20007 ms
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:167)
    ... 10 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: 
java.util.concurrent.TimeoutException
    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:79)
    ... 11 more
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.FutureTask.get(FutureTask.java:205)
    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
    ... 12 more

-----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 Blaineht...@gmail.com on 10 Jun 2015 at 8:28

GoogleCodeExporter commented 9 years ago
I forgot to mention that this is how I am implementing the code:

            System.setProperty("webdriver.chrome.driver", "/Users/blaine_anderson/Documents/ChromeDriver/chromedriver");
            System.setProperty("webdriver.chrome.logfile", "/Users/blaine_anderson/Documents/ChromeDriver/");

            this.driver = new ChromeDriver();

Original comment by Blaineht...@gmail.com on 10 Jun 2015 at 8:29

GoogleCodeExporter commented 9 years ago
Thank you for reporting the issue.

However, i am not able to reproduce the issue
Configuration:-
Mac OS X 10.8.5
Selenium version -2.46
Chromedriver - 2.15
Chrome - v43

Could you please provide chromedriver log with verbose logging enabled?
You can find information on logging here -> 
https://sites.google.com/a/chromium.org/chromedriver/logging

Also, the earlier instance of chrome was launched manually or through 
chromedriver?

Original comment by gmanikp...@chromium.org on 11 Jun 2015 at 12:01

GoogleCodeExporter commented 9 years ago
It should also be noted that I am running OSX 10.10.3.

I have tried to launch the chromedriver directly from the directory, but all it 
does is say " Starting ChromeDriver 2.16.333243 
(0bfa1d3575fc1044244f21ddb82bf870944ef961) on port 9515. Only local connections 
are allowed." It never launches an instance of the chromedriver. 

I have also tried to uninstall and reinstall both Chrome and the Chromedriver. 

Attached is the verbose logfile requested.

Original comment by Blaineht...@gmail.com on 12 Jun 2015 at 5:50

Attachments:

GoogleCodeExporter commented 9 years ago
I also am unable to start any instance of Chromedriver now, even if there is no 
instance of Chrome running. 

Original comment by Blaineht...@gmail.com on 12 Jun 2015 at 5:50

GoogleCodeExporter commented 9 years ago
There was a time that this would work, and would start multiple instances of 
chromedriver. Now I can't get one to start.

Original comment by Blaineht...@gmail.com on 12 Jun 2015 at 6:47

GoogleCodeExporter commented 9 years ago
I tried on OSX 10.10.3 as well, but not able to reproduce the issue.

Can you please try disabling the switch "--test-type"?
Here's how to do that in Java :-

ChromeOptions options = new ChromeOptions();
options.setExperimentalOptions("excludeSwitches", Arrays.asList("--test-type"));
WebDriver driver = new ChromeDriver(options);

Please let me know your observation.

Original comment by gmanikp...@chromium.org on 16 Jun 2015 at 9:58

GoogleCodeExporter commented 9 years ago
Sorry, typo.
Please remove double dash "--" from the test-type switch

ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", Arrays.asList("test-type"));
WebDriver driver = new ChromeDriver(options);

Original comment by gmanikp...@chromium.org on 18 Jun 2015 at 6:21

GoogleCodeExporter commented 9 years ago
Here is the stacktrace:

Starting ChromeDriver 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961) on 
port 25049
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown 
error: Chrome failed to start: exited normally
  (Driver info: chromedriver=2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961),platform=Mac OS X 10.10.3 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.75 seconds
Build info: version: '2.46.0', revision: 
'61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50'
System info: host: 'BlaineA-MBP10.local', ip: '10.11.203.140', os.name: 'Mac OS 
X', os.arch: 'x86_64', os.version: '10.10.3', java.version: '1.8.0_40'
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:148)
    at HTMLScrubber.<init>(HTMLScrubber.java:41)
    at Main.getKscData(Main.java:59)
    at Main.main(Main.java:22)

Here is the log file:

[0.542][INFO]: COMMAND InitSession {
   "desiredCapabilities": {
      "browserName": "chrome",
      "chromeOptions": {
         "args": [  ],
         "excludeSwitches": [ "test-type" ],
         "extensions": [  ]
      },
      "platform": "ANY",
      "version": ""
   }
}
[0.545][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": {
         "pattern_pairs": {
            "https://*,*": {
               "media-stream": {
                  "audio": "Default",
                  "video": "Default"
               }
            }
         }
      },
      "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
   }
}
[0.546][INFO]: Populating Local State file: {
   "background_mode": {
      "enabled": false
   },
   "ssl": {
      "rev_checking": {
         "enabled": false
      }
   }
}
[0.559][INFO]: Launching chrome: /Applications/Google 
Chrome.app/Contents/MacOS/Google 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=/var/folders/r5/yqdz1vsn1jn64wnrwdywtp_x0qtxqw/T/.org.chromium.
Chromium.fX3xLc/internal --log-level=0 --metrics-recording-only --no-first-run 
--password-store=basic --remote-debugging-port=12183 
--safebrowsing-disable-auto-update --safebrowsing-disable-download-protection 
--use-mock-keychain 
--user-data-dir=/var/folders/r5/yqdz1vsn1jn64wnrwdywtp_x0qtxqw/T/.org.chromium.C
hromium.AvK3v5 data:,
[60.612][INFO]: RESPONSE InitSession unknown error: Chrome failed to start: 
exited normally

Original comment by Blaineht...@gmail.com on 18 Jun 2015 at 6:32

Attachments:

GoogleCodeExporter commented 9 years ago
Blainehtcdev

Unable to reproduce issue with chromedriver:2.16, chrome:v43 in Mac OS 10.10.3, 
Selenium:2.46

Sample Code:
System.setProperty("webdriver.chrome.driver", "drivers/chromedriver");
System.setProperty("webdriver.chrome.logfile", "drivers/chromedriver.log");
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com");

As note, please check do you have enough permissions to launch chrome 
executable.

If not add execute permissions to "/Applications/Google 
Chrome.app/Contents/MacOS/Google Chrome" and please try again and let us know 
if there are any specific environment details. 

Original comment by ssudunag...@chromium.org on 19 Jun 2015 at 9:32

GoogleCodeExporter commented 9 years ago
Both the directory and the executable have execute permissions. 

Here is the permissions for the directory where Chromedriver sits:

BlaineA-MBP10:Documents blaine_anderson$ ls -ld ChromeDriver/
drwxr-xr-x  5 blaine_anderson  2011247417  170 Jun 12 10:42 ChromeDriver/

Here is the permissions for the files in that directory. 

BlaineA-MBP10:ChromeDriver blaine_anderson$ ls -a -l
total 20936
drwxr-xr-x   5 blaine_anderson  2011247417       170 Jun 12 10:42 .
drwx------+ 57 blaine_anderson  2011247417      1938 Jun 10 11:20 ..
-rwxr-xr-x@  1 blaine_anderson  2011247417  10710524 Jun  8 04:06 chromedriver
-rw-r--r--   1 blaine_anderson  2011247417      2442 Jun 19 09:57 
chromedriver.log
-rw-r--r--   1 blaine_anderson  2011247417      2419 Jun 10 12:04 logfile.txt

Original comment by Blaineht...@gmail.com on 19 Jun 2015 at 5:00

Galileo1 commented 5 years ago

Did we had any break through for this issue? I see I was reported long time back but I am stuck with the same problem now. Any help is appreciated.