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

[work-in-progress] Add support for Marionette #189

Closed
wants to merge 1 commit into from

Conversation

davehunt
Copy link
Contributor

This builds on #188 and adds the new Firefox driver 'wires' to support Firefox 46+ with Marionette. It should also work with Firefox 45 to allow users to start experimenting with using Marionette by setting a 'marionette' capability. I've had issues connecting to the wires service though - it appears to start, but the connection is refused:

Driver info: driver.version: MarionetteDriver
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
    ... 19 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:6600 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    ... 20 more
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
    ... 33 more
01:22:06.345 WARN - Exception: Connection refused

@jgraham
Copy link

jgraham commented Apr 11, 2016

This might be because wires currently assumes that the server is running on 127.0.0.1 unless told otherwise, and I guess selenium is not telling it otherwise. This could be fixed on both ends (by looking up an ip address corresponding to localhost).

@kayabendroth
Copy link
Member

@davehunt Please rebase.

@davehunt
Copy link
Contributor Author

Rebased, but still a work in progress.

@davehunt
Copy link
Contributor Author

So it seems this is working for the first session in a standalone-firefox container, but I couldn't get it to work at all in node-firefox attached to a hub. Running a second session in a standalone-firefox container throws the same exception as attempting to run a session in node-firefox (shown in the issue description).

I found this question on StackOverflow, which describes a very similar problem. They came to the conclusion that the Marionette port was causing the problem, which suggests that we should either be picking a random free port for this, or make sure we're releasing the port when a session is deleted.

I'll raise a bug against wires to see how we might address this.

@dylanlive
Copy link

dylanlive commented Jun 15, 2016

If this is indeed a port issue, perhaps SeleniumHQ/selenium#2286 will fix this issue.

Update: Never mind, looked deeper and it was only for the Ruby bindings.

@elgalu
Copy link
Member

elgalu commented Sep 26, 2016

Is this no longer valid @davehunt and now is enough to install geckodriver ?

@davehunt
Copy link
Contributor Author

@elgalu you're right, this has been replaced by #271

@davehunt davehunt closed this Sep 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants