Closed onlyforcoding24 closed 7 years ago
This means exactly what the error message says: you already have a process with a socket bound to the port geckodriver is attempting to bind to. By default geckodriver binds to port 4444, but it is possible to override this with the -p
flag.
I recommend binding to port 0 and having the system atomically allocate a free port.
@andreastt : Could you please let me know how exactly we can use -p flag to bind the geckodriver to any other port.
% ./geckodriver -p 6789
1503414921335 geckodriver INFO geckodriver 0.18.0 (0000000000000000000000000000000000000000 2017-08-22)
1503414921340 geckodriver INFO Listening on 127.0.0.1:6789
@andreastt Getting the same issue, even after following the above instructions.
Steps followed:
Issues Found as below:
Running TestSuite 1503429718000 geckodriver INFO geckodriver 0.18.0 1503429718004 geckodriver INFO Listening on 127.0.0.1:11213 1503429718456 geckodriver::marionette INFO Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args ["-marionette"] 1503429719344 Marionette INFO Enabled via --marionette 1503429721038 Marionette INFO Listening on port 59482 JavaScript error: chrome://marionette/content/server.js, line 337: NS_ERROR_SOCKET_ADDRESS_IN_USE: Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE) [nsIServerSocket.initSpecialConnection] JavaScript error: , line 0: TypeError: NetworkError when attempting to fetch resource. 1503429721820 addons.productaddons WARN Failed downloading XML, status: 0, reason: error 1503429722873 addons.productaddons WARN Failed downloading via XHR, status: 0, reason: error
Also I tried with many other port numbers, but found the same issue existing.
If you read your logs carefully, your client is binding geckodriver to port 11213:
1503429718004 geckodriver INFO Listening on 127.0.0.1:11213
Apparently something is already bound to that port, so Maironette fails to start the TCP listener.
Actually it is geckodriver only.
Even though I tried killing the process and reexecuted it , but found the same issue.
This has nothing to do with geckodriver, Selenium, or profiles. It was just a bug in Marionette which has been fixed in bug 1254136 for Firefox 57 and 56. You will always see the problem in 55, but it should not cause you any problems.
@whimboo But how to get the firefox 57 and 56 ??? The nightly firefox is not working at all. Even I am not able to launch the URLs manually in the nightly firefox version.
Firefox specific issues even being able to manually reproduce are clearly a different topic and better covered at https://support.mozilla.org/en-US/products/firefox. Not sure which problem you have.
Otherwise download the latest Firefox 56.0 beta and you should be also fine.
Java :openjdk version "1.8.0_151" OS : Ubuntu (16.04 LTS) Browser : Mozilla Firefox 57.0.1 (64-bit) Selenium java jar file : 3.8.1 Mozilla Gecko webdriver :0.19.0 Browser is opened but unable to open the URL.
Code public static void main(String[] args) { //System.setProperty("webdriver.gecko.driver","/home/sanchit/eclipse-workspace/geckodriver.exe"); System.setProperty("webdriver.firefox.marionette","/home/sanchit/eclipse-workspace/geckodriver.exe"); WebDriver driver = new FirefoxDriver(); // Launches Firefox Browser with blank url driver.get("https://www.google.com"); // Navigates to the specified URL String Title = driver.getTitle(); System.out.println(Title); driver.close(); // Closes the Browser }
Getting following exception.
Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting 45 seconds for Firefox to start.
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:14.666Z'
System info: host: 'sanchit-Vostro-3558', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-101-generic', java.version: '1.8.0_151'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.XpiDriverService.waitUntilAvailable(XpiDriverService.java:131)
at org.openqa.selenium.firefox.XpiDriverService.start(XpiDriverService.java:116)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.
Please someone help me to fix it, i am struggling with this since yesterday.
@Sanchit-20 please do not hijack an issue of someone else which also is closed. File a new issue for your problem and make sure to attach a trace log.
System
Stacktrace
Actual Error In Log :
Getting following error