When starting WebDriver with a Chrome browser, receiving a message, only local connections are allowed, even if the browser starts correctly

When I launch the Chrome browser using WebDriver, I get the following message on the console. Please let me know how to solve it.

"Starting ChromeDriver (v2.10.267521) on port 22582" "Only local connections are allowed."

Here is my sample code:

public class Browserlaunch { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\\chromedriver_win32 \\chromedriver.exe"); WebDriver driver = new ChromeDriver() ; driver.get("http://webdunia.com"); driver.close(); driver.quit(); } } 
+46
google-chrome webdriver
Aug 01 '14 at 12:40
source share
7 answers

This is an informational message. What the message tells you is that the chromedriver executable will only accept connections from the local machine.

You see that most driver versions (the Chrome driver and the IE driver for sure) create an HTTP server, and language bindings (Java, Python, Ruby, .NET, etc.) use the JSON-over-HTTP protocol to communicate with the driver and browser automation. Naturally, since the HTTP server simply listens on the open port for HTTP requests generated by language connections, connections to the HTTP server launched by language connections are limited only by allowed access from other processes on the same host. Please note that this restriction does not apply to connections that the browser can make for external websites; rather, it simply prevents incoming connections from other sites.

+64
Aug 01 '14 at
source share
— -

I was getting exactly the same errors. I fought this issue for several hours today. This, apparently, was caused by a mismatch between the versions of chromium plating and selenium-server-autonomous. The config.js file referenced the chronicler 2.9 directory and selenium-server-stand-alone 2.35.0. As soon as I was convinced that we refer to 2.10 and 2.42.2, it worked.

+7
Jul 17 '15 at 4:31 on
source share

This happened to me when I had to fix an old project that was not considered at that time. The chromidra associated with the project is not compatible with my version of chrome, so when I updated the chrome recorder, it worked fine.

+3
Mar 04 '16 at 10:49
source share

Not necessarily the best practice, but my environment was a local area network with several machines that needed access to selenium.

When starting the chronograph, you can go through the following parameter:

chromedriver --whitelisted-ips=""

Basically this is a white list of all IP addresses, not always an ideal solution, of course, and be careful with it for production conditions, but you should be presented with a detailed warning:

Running ChromeDriver 2.16.333244 (15fb740a49ab3660b8f8d496cfab2e4d37c7e6ca) on port 9515 All remote connections are allowed. Use whitelisting instead.

A workaround at best, but it works.

Relative registration

+2
Jun 03 '16 at 14:12
source share

This is an informational message. This does not mean anything, if your test scripts and chrome pointers are on the same machine, then you can add the "whitelisted-ips" option. Your test will work fine. However, if you use chrome gear in the grid setup, this message will not appear

+1
Feb 05 '15 at 19:02
source share

I had to run my commands in the terminal the same , but not separately.

 nohup sudo Xvfb :10 -ac export DISPLAY=:10 java -jar vendor/se/selenium-server-standalone/bin/selenium-server-standalone.jar -Dwebdriver.chrome.bin="/usr/bin/google-chrome" -Dwebdriver.chrome.driver="vendor/bin/chromedriver" 
0
Aug 12 '16 at 3:01
source share

Very often this error appears if you are using incompatible versions of Selenium and ChromeDriver.

Selenium 3.0.1 for the Maven project:

  <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.0.1</version> </dependency> 

ChromeDriver 2.27: https://sites.google.com/a/chromium.org/chromedriver/downloads

0
Jan 04 '17 at 10:52 on
source share



All Articles