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

Connection refused error while executing Selenium script in Firefox driver #1338

Closed
sarveshp90 opened this issue Jul 29, 2018 · 5 comments
Closed
Labels

Comments

@sarveshp90
Copy link

sarveshp90 commented Jul 29, 2018

System

  • Version: geckodriver-v0.21.0-win64
  • Platform: Windows 7
  • Firefox: version 61.0.1
  • Selenium: Java client version 3.13.0

Testcase

Open Google site in firefox browser

Code:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class AutoDemo {

public static void main(String[] args) {
	
	System.setProperty("webdriver.gecko.driver", "C:\\seleniumDriver\\geckodriver.exe");
	
	WebDriver driver = new FirefoxDriver();
	
	driver.get("https://www.seleniumhq.org/download/");

}

}

Stacktrace

1532871071526 geckodriver INFO geckodriver 0.21.0
1532871071537 geckodriver INFO Listening on 127.0.0.1:21309
1532871072315 mozrunner::runner INFO Running command: "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\Users\Sarvesh\AppData\Local\Temp\rust_mozprofile.BEQ5tVZxpaDy"
[GFX1-]: Mismatched driver versions between the registry 8.951.0.0 and DLL(s) 8.15.10.2626, reported.
[GFX1-]: Mismatched driver versions between the registry 8.951.0.0 and DLL(s) 8.15.10.2626, reported.
[GFX1-]: Mismatched driver versions between the registry 8.951.0.0 and DLL(s) 8.15.10.2626, reported.
[GFX1-]: Mismatched driver versions between the registry 8.951.0.0 and DLL(s) 8.15.10.2626, reported.
[GFX1-]: Mismatched driver versions between the registry 8.951.0.0 and DLL(s) 8.15.10.2626, reported.
[GFX1-]: Mismatched driver versions between the registry 8.951.0.0 and DLL(s) 8.15.10.2626, reported.
Exception in thread "main" org.openqa.selenium.WebDriverException: connection refused
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:14.902Z'
System info: host: 'SARVESH-PC', ip: 'XXXX', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver
remote stacktrace:
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:125)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:103)
at demo.AutoDemo.main(AutoDemo.java:12)

@andreastt
Copy link
Contributor

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

@sarveshp90
Copy link
Author

Hi @andreastt
Could you please help me here to take trace-level log from geckodriver.

I have added below code in eclipse:
FirefoxOptions options = new FirefoxOptions();
options.setLogLevel(FirefoxDriverLogLevel.TRACE);
WebDriver driver = new FirefoxDriver(options);

but don't know at which location these logs files are generated.

@ranjitiyer
Copy link

The log should be in the current working directory

-rw-r--r--  1 user  ANT\Domain Users   519K Aug  1 19:03 geckodriver.log

@whimboo
Copy link
Collaborator

whimboo commented Aug 2, 2018

@sarveshp90 it looks like there is a problem with your graphics driver, and Firefox aborts during startup. As such geckodriver is not able to connect to it.

[GFX1-]: Mismatched driver versions between the registry 8.951.0.0 and DLL(s) 8.15.10.2626, reported.

Can you please check if you can manually start this instance of Firefox?

I would suggest to fix the graphic driver installation, and if time permits please also file a bug on Bugzilla for Firefox.

@lock
Copy link

lock bot commented Aug 16, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.

@lock lock bot locked and limited conversation to collaborators Aug 16, 2019
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

4 participants