selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Firefox 53 Selenium 3.4.0, geckodriver-v0.16.1 doesn't work with selenium grid

Open sandeepjain1987 opened this issue 9 years ago • 13 comments

Meta -

OS: Windows 7 Selenium Version: 3.4.0 Firefox Browser Version: 53.0.2 (32-bit)

Expected Behavior - Create FirefoxDriver instance

Actual Behavior - HTTP ERROR 500

Problem accessing /grid/admin/AllProxiesJsonServlet. Reason:

Server Error

Caused by:

java.lang.NoSuchMethodError: org.openqa.grid.common.RegistrationRequest.getAssociatedJSON()Lcom/google/gson/JsonObject; at com.seleniumgrid2api.servlet.AllProxiesJsonServlet.getResponse(AllProxiesJsonServlet.java:67) at com.seleniumgrid2api.servlet.AllProxiesJsonServlet.process(AllProxiesJsonServlet.java:51) at com.seleniumgrid2api.servlet.AllProxiesJsonServlet.doPost(AllProxiesJsonServlet.java:41) at com.seleniumgrid2api.servlet.AllProxiesJsonServlet.doGet(AllProxiesJsonServlet.java:36) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:841) at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:543) at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1584) at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1228) at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:481) at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1553) at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1130) at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.seleniumhq.jetty9.server.Server.handle(Server.java:564) at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:320) at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:251) at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:112) at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.seleniumhq.jetty9.util.thread.Invocable.invokePreferred(Invocable.java:122) at org.seleniumhq.jetty9.util.thread.strategy.ExecutingExecutionStrategy.invoke(ExecutingExecutionStrategy.java:58) at org.seleniumhq.jetty9.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:201) at org.seleniumhq.jetty9.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:133) at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Unknown Source)

Steps to reproduce -

  1. Selenium Hub cmd: java -classpath "selenium-server-standalone-3.4.0.jar;servlet.jar;" org.openqa.grid.selenium.GridLauncherV3 -role hub -servlets com.seleniumgrid2api.servlet.AllProxiesJsonServlet ( I want this servlet for my project. It's a generic one)

  2. Node : java -Dwebdriver.gecko.driver="C:\bin\Selenium\geckodriver.exe" -jar C:\bin\Selenium\selenium-server-standalone-3.4.0.jar -role node -hub http://10.121.64.195:4444/grid/register -browser browserName=firefox,version=53,platform=VISTA,maxInstances=5

  3. Run a simple selenium script to open firefox instance.

Note: When I access http://10.121.64.195:4444/grid/admin/AllProxiesJsonServlet I see the above error message. It was working fine before Selenium 2.53 version.

sandeepjain1987 avatar May 08 '17 15:05 sandeepjain1987

The same error is also in Linux version

marektamaskovic avatar May 08 '17 22:05 marektamaskovic

Having the same problem in the same environment Windows 7 Selenium Version: 3.4.0 Firefox Browser Version: 53.0.2 (32-bit)

MarkPTP avatar May 10 '17 15:05 MarkPTP

The problem does not occur for below combination with windows

Windows 7 Selenium Version 3.4.0 Firefox browser version: 53.0.2 geckodriver-v0.16.1-win64

but webelementSendKey exception is coming for linux Linux Selenium Version 3.4.0 Firefox browser version 53.0.2 geckodriver-v0.16.1-linux64.tar.gz

please suggest a workaround for the linux sendkey , or to make overall changes in the selenium test case. Have tried javascript executor script and getting reference exception

shreya0591 avatar May 11 '17 06:05 shreya0591

also getting problems on a Mac 10.12.3 selenium 3.4.2 geckodriver-v0.16.1-macos 53.0.3 (64-bit) i'm using Python 2.7.13

gseek27 avatar May 21 '17 06:05 gseek27

Solved for MacOS:

from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary binary = FirefoxBinary('/Applications/Firefox.app/Contents/MacOS/firefox-bin') driver = webdriver.Firefox(executable_path = "/usr/local/bin/geckodriver") driver.get("http://www.google.com") print driver.title driver.quit()

You had to use the Expected Firefox location from here: https://github.com/SeleniumHQ/selenium/wiki/FirefoxDriver

Good luck!

gseek27 avatar May 21 '17 09:05 gseek27

It dint work

sandeepjain1987 avatar May 22 '17 23:05 sandeepjain1987

Did you try the following code with the path to your firefox executable?

binary = FirefoxBinary('/Applications/Firefox.app/Contents/MacOS/firefox-bin')

If so, what was your path?

gseek27 avatar May 23 '17 01:05 gseek27

yes. java -Dwebdriver.firefox.bin="C:\Users\jains13\AppData\Local\Mozilla Firefox\firefox.exe"

sandeepjain1987 avatar May 25 '17 22:05 sandeepjain1987

Now that I think about it, I didn't get the exact same message (error 500). I had an issue with Selenium and Geckodriver, but I don't think it was that.

gseek27 avatar May 26 '17 03:05 gseek27

Error 500 is not the problem anymore. Problem is with using servlets file "AllProxiesJsonServlet" w.r.t selenium server 3.4.0 jar file. Lots of code changes have been made with no provision to access servlets file. Even if I fix the below issue, it doesn't fix the getAllNode information issue from servlet file java.lang.NoSuchMethodError: org.openqa.grid.common.RegistrationRequest.getAssociatedJSON()Lcom/google/gson/JsonObject

sandeepjain1987 avatar May 26 '17 13:05 sandeepjain1987

This looks to be a duplicate of #3808

AutomatedTester avatar May 29 '17 09:05 AutomatedTester

same problem here... firefox 53 webdriver 3.4.0 if i run: require 'rspec' require 'selenium-webdriver'

describe 'Verificar elementos da página' do it 'should do something' do driver = Selenium::WebDriver.for(:firefox) end end got the same message: Selenium::WebDriver::Error::WebDriverError: Unable to find Mozilla geckodriver. Please download the server from https://github.com/mozilla/geckodriver/releases and place it somewhere on your PATH. More info at https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver.

./getElements_spec.rb:8:in block (2 levels) in <top (required)>' -e:1:in load' -e:1:in `

'

veted avatar Jun 02 '17 16:06 veted

Is anybody working on servlet file "AllProxiesJsonServlet.java" which is compatible with gecko driver 3.4.0+ version ?

sandeepjain1987 avatar Aug 21 '17 22:08 sandeepjain1987