-1

MAC: 10.11.6, Selenium: 2.53(Also tried with 3.4 and 3.8) & Java 1.8

Driver settings tried:

String exePath ="/usr/local/Cellar/chromedriver/2.35/bin/chromedriver";
System.setProperty("webdriver.chrome.driver", exePath);
WebDriver driver = new ChromeDriver();
driver = new ChromeDriver(options);

Error stack trace:

Starting ChromeDriver 2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef) on port 14988
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created exception
from disconnected: unable to connect to renderer
  (Session info: chrome=64.0.3282.140)
  (Driver info: chromedriver=2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef),platform=Mac OS X 10.11.6 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.55 seconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:32:46'
System info: host: '01hw382197', ip: '172.25.155.171', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_111'
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:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
    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 dataAndConfig.DriverClass.getDriver(DriverClass.java:39)
    at scriptsPostPaidWebApp.BillingPayNow.main(BillingPayNow.java:27)
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Possible duplicate of [Unable to run the selenium script while connected to the LAN](https://stackoverflow.com/questions/48824322/unable-to-run-the-selenium-script-while-connected-to-the-lan) – undetected Selenium Feb 16 '18 at 12:56

1 Answers1

0

Have a look at the following links:

  1. https://github.com/SeleniumHQ/selenium/issues/4897
  2. WebDriverError: disconnected: unable to connect to renderer
  3. https://github.com/SeleniumHQ/selenium/issues/4979

First off you should make sure that your ChromeDriver supports your Chrome version. Since you are using ChromeDriver 2.3.5 and Google Chrome v64 you should be fine. (you still might want to upgrade your Selenium version)

According to the links posted above, you need to comment out every method that manipulates the window size of your browser in any way. e.g. setMaximize().

If that didnt work, you might want to give options.addArguments("no-sandbox"); a try.

Angry Red Panda
  • 419
  • 1
  • 5
  • 28
  • Thanks Angry, However it is still not working for me, I have tried with updating my selenium version to 3.4, 3.5, 3.8 but it is not at all working for me. please advice. I am not using any setMaximize(). Also the same code is working fine in my windows system The only change is, in my windows i have chrome v63, so could you please help me how to downgrade the chrome in mac, as i tried installing dmg of V63 but it gets updated automatically – Siddharth Tiwari Feb 13 '18 at 08:10
  • hey, sorry to hear that none of my solutions worked out. I never had to use a MAC before, but a quick google query brought up this promising tutorial: http://support.imonggo.com/help/kb/advance-questions/how-to-install-a-previous-version-of-chrome-in-mac – Angry Red Panda Feb 13 '18 at 08:23
  • I am not sure what to do in this case now, I have brought down the chrome version to 60 and chromedriver to 2.33, but still it is not working – Siddharth Tiwari Feb 16 '18 at 05:41
  • today I have observed a new version of it: I am able to run the script with same configuration, when I connect my system with WIFI, however it doesn't work when I connect my LAN. – Siddharth Tiwari Feb 16 '18 at 07:20
  • Please help guys – Siddharth Tiwari Feb 16 '18 at 11:34