Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting 45 seconds for Firefox to start. #1099

Closed
Sanchit-20 opened this issue Dec 12, 2017 · 6 comments
Labels

Comments

@Sanchit-20
Copy link

Sanchit-20 commented Dec 12, 2017

System

Java :openjdk version "1.8.0_151"
OS : Ubuntu (16.04 LTS)
Browser : Mozilla Firefox 57.0.1 (64-bit)
**Selenium ** : 3.8.1
Geckodriver :0.19.0
Browser is opened but unable to open the URL.

Code

package newpackage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Myclass {

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
}

}

After running the above code, only browser is opened and unable to open the specified url and following error is given

Stacktrace

Dec 13, 2017 1:55:32 AM org.openqa.selenium.remote.DesiredCapabilities firefox
INFO: Using new FirefoxOptions() is preferred to DesiredCapabilities.firefox()
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.(RemoteWebDriver.java:142)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:120)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:106)
at newpackage.Myclass.main(Myclass.java:15)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:7081/hub/status] to be available after 45003 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
at org.openqa.selenium.firefox.XpiDriverService.waitUntilAvailable(XpiDriverService.java:129)
... 8 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:147)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
... 9 more

@mrunalgosar
Copy link

I am also getting same error. By the way what was the last stable configuration you were able to run?

@Sanchit-20
Copy link
Author

Actually I also tried running the above code by using marionette in the Set property and setCapability of marionette to true, but in best possible case only browser was opened and not able to open the URL.

@andreastt
Copy link
Contributor

Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines.

@Sanchit-20
Copy link
Author

Sanchit-20 commented Dec 18, 2017

Solved.
I guess there was something wrong with the associated selenium-java jar files, I had dereferenced all the selenium-java jar from my project and again downloaded most recent jar files and included those my project.

I ran the above code and it worked fine with below trace level log.
1513619576122 geckodriver INFO geckodriver 0.19.0
1513619576142 geckodriver INFO Listening on 127.0.0.1:13578
1513619576990 mozrunner::runner INFO Running command: "/usr/lib/firefox/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.nZDfs1u3JcCR"
1513619579863 Marionette INFO Enabled via --marionette
1513619585600 Marionette INFO Listening on port 35750
1513619585796 Marionette WARN TLS certificate errors will be ignored for this session
1513619585895 Marionette DEBUG Register listener.js for window 2147483649
Dec 18, 2017 11:23:06 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
1513619586432 Marionette DEBUG Received DOM event "beforeunload" for "about:blank"
1513619589629 Marionette DEBUG Received DOM event "pagehide" for "about:blank"
1513619589629 Marionette DEBUG Received DOM event "unload" for "about:blank"
1513619590703 Marionette DEBUG Received DOM event "DOMContentLoaded" for "https://www.google.co.in/?gfe_rd=cr&dcr=0&ei=hQA4WujhAcucX9fpp7AI"
1513619603909 Marionette DEBUG Received DOM event "pageshow" for "https://www.google.co.in/?gfe_rd=cr&dcr=0&ei=hQA4WujhAcucX9fpp7AI"
Google

Thank you for the help and support for taking the issue in consideration.

@Anki1208
Copy link

Anki1208 commented Jan 3, 2018

Facing same issue, Windows 10(64 bit), Selenium 3.8.1, geckodriver 0.19.0.

Error mentioned below:
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: 'INMUVADP014519', ip: '10.1.55.185', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_20'
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.(RemoteWebDriver.java:142)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:120)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:98)
at module.Login2.main(Login2.java:10)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:22517/hub/status] to be available after 45001 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
at org.openqa.selenium.firefox.XpiDriverService.waitUntilAvailable(XpiDriverService.java:129)
... 8 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:147)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
... 9 more

How this can be solved, i have already dereferenced all the selenium-java jar from my project and again downloaded most recent jar files and included those my project.

@andreastt
Copy link
Contributor

@Anki1208 Please don’t hijack a resolved issue. There’s nothing in the stack trace you attached that indicates it is the same issue. It looks to me that you’re using the old FirefoxDriver and not geckodriver, but please open a new issue so we can continue there.

@mozilla mozilla locked as off-topic and limited conversation to collaborators Jan 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants