-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Grid does not handle w3c capabilities correctly #3808
Comments
Also, testing with curl seems to work fine: curl -v -X POST http://<my_server_ip>:4444/wd/hub/session -d '{"desiredCapabilities":{"browserName":"firefox", "marionette": "true", "javascriptEnabled": "true"}}' curl -v 'http://<my_server_ip>:4444/wd/hub/session/SESSION_ID' |
Ok, looks it actually works if I change the port to 5555. I'm guessing that's connecting directly to a node rather than the hub? Why would port 4444 work with selenium 2.5 but not 3.3.3? |
I met the same issue. and Using the same command on selenium 3.3.0 working fine. Now I'm downgrade to 3.3.0. In [1]: from selenium.webdriver import * In [2]: dri = Remote('http://my_sever_ip:4444/wd/hub', DesiredCapabilities.HTMLUNIT)KeyError Traceback (most recent call last) /usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py in init(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector) /usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py in start_session(self, capabilities, browser_profile) /usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params) /usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) KeyError: 'message' In [3]: exit |
I have the same issue with Selenium python client 3.3.2 or 3.3.3 against a Selenium server 3.3.1. It works with Selenium python client 3.3.1. The problem has been introduced with commit abe1f45. It uses the new W3C start session (send "capabilities" instead of "requiredCapabilities"), but it seems that Selenium 3.3.1 server still needs "requiredCapabilities". |
I have downgraded selenium, selenium standalone server and it works fine. |
I can create Remote driver if run server locally as But it fails for a local grid started as:
I found that this grid works only with "selenium-server-standalone-2.53.1.jar", but do not even with the first 3.x one "selenium-server-standalone-3.0.0.jar" I use python 3.6, selenium 3.3.3, and command
|
Here is a full stacktrace using the python bindings 3.4.0 with selenium server (in grid hub/node mode) : https://gist.github.com/smccarthy/6778f2af97b99e301767438de01c62fb I tried with chromedriver 2.28 and 2.29 , but I seem to get the same issue with DesiredCapabilities.FIREFOX |
This appears to be a grid issue, it does not like |
Or rather that it expects selenium/java/server/src/org/openqa/grid/web/servlet/handler/WebDriverRequest.java Line 69 in 02a0df9
|
@shs96c you'd probably be best at handling the fix for this |
Is there any update on this? I am still stuck on 3.0.1 because of this bug. |
I'm having the same issue using the .Net bindings on the client side. OS: Windows 10 I was testing this setup with a locally running hub and node on my dev laptop before upgrading our actual grid. Anytime I request a browser directly from the hub, I get an error. This is not a problem using 3.3 nor is it a problem using 3.4 when I bypass the grid and use a local browser. |
@bjharo see @jimevans's explanation here #3929 (comment) |
And the reason it's showing up now is that 3.4 is the first release to consistently attempt to send the W3C spec-compliant payload for a new session command (containing a |
Do we have any work around of it? |
I also am seeing this problem. My workaround in Python has been to force an earlier version of selenium when installing. I.e., |
As a workaround this is what worked for me....go into the selenium webdriver client I am using python client go into the remote/webdriver.py you will see this within the start_session(some args) method
remove the so you end up with:
I am sure that this is very similar to the other client bindings. Just a temporary workaround until this can be fixed. |
Should be fixed in version 3.5, please reopen the issue if it's not true. |
Not working for me in version 3.5. I had to downgrade to v3.3 |
@CristianSw "Not working" is a zero info message. What browser, what capabilities, what error appears? |
v3.5.1 fixes the issue for C#/Chrome/Windows Thanks |
@fatdh thanks for the update, I've just upgraded to 3.5.1, however, I'm using selenium grid running on docker and the docker image is still using selenium-server-standalone 3.4.0 @barancev Let's backtrack a little bit.. I wouldn't say that
is very informing.. was it fixed or not? I was just trying to help & signal that the original issue might need to be reopened. |
Would it possible to get the version 3.5 of the java selenium libraries on the central maven repository? |
I can verify that the 3.5.1 fixed the issue for me.(C#) I'm also using Selenium Grid v3.4.0 |
Should this be fixed in the standalone mode as well? I'm getting the following (using FF54 and geckodriver 0.18.0):
|
Sorry, my fault, it works now :) |
I think we can close this issue. |
FYI: version 3.5.1 is available in maven central |
Can you share what your fix is/was? Experiencing the same issue with v3.5.2 and geckodriver v0.18 and hoped that v3.5.0 should fix this. edit: |
I was upgrading the server while still using old python selenium. |
I was redirected to this issue report by: FF 52.3.0 I am not using a standalone, so how can I pass "-enablePassthrough"? I'm just creating FirefoxDriver(), and specifying the location of the geckodriver via System.setProperty("webdriver.gecko.driver", ...) in Java. Is using FirefoxDriver + gecko a supported path forward? |
FYI, |
Yeah, I'm aware it requires an argument. I was trying to figure where to apply that option, since I'm not running any nodes, nor a standalone Selenium server. I'm launching WebDriver by calling new FirefoxDriver() in Java, and then driver.get() on a URL. Perhaps the redirect from issue #4008 was incorrect, as this issue refers to "Grid" and I'm not using that, nor standalone WebDriver. |
Is the Pass Through Mode the way going forward for supporting W3C compliant webdrivers in the standalone server or is it planned to make it working also without Pass Through Mode? |
All modes should work.
…On Fri, Sep 15, 2017 at 5:16 PM, Philip Lonsing ***@***.***> wrote:
Is the *Pass Through Mode* the way going forward for supporting W3C
webdrivers in the standalone server or is it planned to make it working
also without Pass Through Mode?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3808 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABuRX85zXmJcXyGuPE5clnwh67wCKhLks5siqLOgaJpZM4M5en1>
.
|
Issue still reproduces for me (Ruby v2.3.3). I'm using Selenium Grid v3.3.1 running on docker and selenium-webdriver v3.5.2 on local machine. the error is:
|
@DaryaOrlova that's because you're using grid v3.3.1, this was fixed in the grid code not the ruby gem |
So we've been running into this at work with the C# bindings. By making these changes starting at line 1108 in RemoteWebDriver.cs we are now capable of using desired capabilities as worked prior to the w3c changes. https://gist.github.com/tkueck/178eb16058c9e3b240107dcc2c4cb2f3 |
Meta -
OS: Mac OS El Capitan 10.11.6
Selenium Version: 3.3.3
Browser: Firefox
Browser Version: 52.0.2 (64-bit)
Expected Behavior -
In python, the following should create a Remote driver:
from selenium import webdriver
cap = {'platform': 'ANY', 'browserName': 'firefox', 'version': '', 'marionette': True, 'javascriptEnabled': True}
driver = webdriver.Remote(command_executor='http://<my_server_ip>:4444/wd/hub', desired_capabilities=cap)
(note: this works with selenium 2.53.6 with python2.7 when executed against the same server)
Actual Behavior -
Thows exception: KeyError: 'message'
When I pdb into this I see the following response from the server:
{'value': '{"status":13,"value":{"class":"java.lang.NullPointerException","stackTrace":[{"fileName":"HashMap.java","className":"java.util.HashMap","methodName":"putMapEntries","lineNumber":500},{"fileName":"HashMap.java","className":"java.util.HashMap","methodName":"putAll","lineNumber":784},{"fileName":"DesiredCapabilities.java","className":"org.openqa.selenium.remote.DesiredCapabilities","methodName":"\u003cinit\u003e","lineNumber":54},{"fileName":"RequestHandler.java","className":"org.openqa.grid.web.servlet.handler.RequestHandler","methodName":"process","lineNumber":104},{"fileName":"DriverServlet.java","className":"org.openqa.grid.web.servlet.DriverServlet","methodName":"process","lineNumber":83},{"fileName":"DriverServlet.java","className":"org.openqa.grid.web.servlet.DriverServlet","methodName":"doPost","lineNumber":67},{"fileName":"HttpServlet.java","className":"javax.servlet.http.HttpServlet","methodName":"service","lineNumber":707},{"fileName":"HttpServlet.java","className":"javax.servlet.http.HttpServlet","methodName":"service","lineNumber":790},{"fileName":"ServletHolder.java","className":"org.seleniumhq.jetty9.servlet.ServletHolder","methodName":"handle","lineNumber":841},{"fileName":"ServletHandler.java","className":"org.seleniumhq.jetty9.servlet.ServletHandler","methodName":"doHandle","lineNumber":543},{"fileName":"ScopedHandler.java","className":"org.seleniumhq.jetty9.server.handler.ScopedHandler","methodName":"nextHandle","lineNumber":188},{"fileName":"SessionHandler.java","className":"org.seleniumhq.jetty9.server.session.SessionHandler","methodName":"doHandle","lineNumber":1584},{"fileName":"ScopedHandler.java","className":"org.seleniumhq.jetty9.server.handler.ScopedHandler","methodName":"nextHandle","lineNumber":188},{"fileName":"ContextHandler.java","className":"org.seleniumhq.jetty9.server.handler.ContextHandler","methodName":"doHandle","lineNumber":1228},{"fileName":"ScopedHandler.java","className":"org.seleniumhq.jetty9.server.handler.ScopedHandler","methodName":"nextScope","lineNumber":168},{"fileName":"ServletHandler.java","className":"org.seleniumhq.jetty9.servlet.ServletHandler","methodName":"doScope","lineNumber":481},{"fileName":"SessionHandler.java","className":"org.seleniumhq.jetty9.server.session.SessionHandler","methodName":"doScope","lineNumber":1553},{"fileName":"ScopedHandler.java","className":"org.seleniumhq.jetty9.server.handler.ScopedHandler","methodName":"nextScope","lineNumber":166},{"fileName":"ContextHandler.java","className":"org.seleniumhq.jetty9.server.handler.ContextHandler","methodName":"doScope","lineNumber":1130},{"fileName":"ScopedHandler.java","className":"org.seleniumhq.jetty9.server.handler.ScopedHandler","methodName":"handle","lineNumber":141},{"fileName":"HandlerWrapper.java","className":"org.seleniumhq.jetty9.server.handler.HandlerWrapper","methodName":"handle","lineNumber":132},{"fileName":"Server.java","className":"org.seleniumhq.jetty9.server.Server","methodName":"handle","lineNumber":564},{"fileName":"HttpChannel.java","className":"org.seleniumhq.jetty9.server.HttpChannel","methodName":"handle","lineNumber":320},{"fileName":"HttpConnection.java","className":"org.seleniumhq.jetty9.server.HttpConnection","methodName":"onFillable","lineNumber":251},{"fileName":"AbstractConnection.java","className":"org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback","methodName":"succeeded","lineNumber":279},{"fileName":"FillInterest.java","className":"org.seleniumhq.jetty9.io.FillInterest","methodName":"fillable","lineNumber":112},{"fileName":"ChannelEndPoint.java","className":"org.seleniumhq.jetty9.io.ChannelEndPoint$2","methodName":"run","lineNumber":124},{"fileName":"QueuedThreadPool.java","className":"org.seleniumhq.jetty9.util.thread.QueuedThreadPool","methodName":"runJob","lineNumber":672},{"fileName":"QueuedThreadPool.java","className":"org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2","methodName":"run","lineNumber":590},{"fileName":"Thread.java","className":"java.lang.Thread","methodName":"run","lineNumber":745}]}}', 'status': 500}
Steps to reproduce -
Execute the above steps in python using selenium 3.3.3, firefox 52.0.2, geckodriver 0.15.0. The server is using selenium-server-standalone-3.3.1.jar on ubuntu 16.10. I'm happy to provide the ip of the server privately if it'll help.
The text was updated successfully, but these errors were encountered: