-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Error on proxyAutoconfigUrl set to null #490
Comments
According to the specification it should be a string type. |
It still seems wrong to launch Firefox and then return the error, doesn't it? Also, the other string capabilities in the "proxy" object don't cause this (e.g., "httpProxy"). If you're insistent that this is OK behavior, then I can take this over to Selenium and make sure language bindings never pass |
We currently do capabilities parsing in Firefox itself, because that is where Marionette lives. We expect this to move to geckodriver soon-ish, so that Firefox is not started if the capabilities passed are invalid. When I implemented capabilities parsing in Marionette, I tried to follow the specification as it were at the time with regards to parsing proxy settings. It seems to have improved somewhat since then, but it still says In my opinion, we should ignore all properties which values are null or undefined, so I will look into whether we need to raise a spec bug on this. |
The current state of using a Proxy is both well-defined and variously implemented. * Chrome and ChromeDriver uses just the HTTP field with a host:port. * Firefox via GeckoDriver directly requires that the host be provided in the HTTP field and the port be provided in the HTTPPort field. * Firefox via Selenium 2 uses just the HTTP field, with the caveat that connections to localhost are not proxied, by default. An additional preference is needed to unset this. * Firefox via Selenium 3 and GeckoDriver fails because Selenium adds a whole bunch of "nulls" for unset values in the Proxy object, which Marionette does not like. mozilla/geckodriver#490 Fixes #41.
The current state of using a Proxy is both well-defined and variously implemented. * Chrome and ChromeDriver uses just the HTTP field with a host:port. * Firefox via GeckoDriver directly requires that the host be provided in the HTTP field and the port be provided in the HTTPPort field. * Firefox via Selenium 2 uses just the HTTP field, with the caveat that connections to localhost are not proxied, by default. An additional preference is needed to unset this. * Firefox via Selenium 3 and GeckoDriver fails because Selenium adds a whole bunch of "nulls" for unset values in the Proxy object, which Marionette does not like. mozilla/geckodriver#490 Fixes #41.
Waiting for a fix or clarification of the spec, do you see any workaround about this? |
The “workaround” is to not define the fields holding null values. E.g. |
Too bad, it does not help.
|
Well |
Hum, sorry I read too quickly your previous message. |
The point is that |
The current state of using a Proxy is both well-defined and variously implemented. * Chrome and ChromeDriver uses just the HTTP field with a host:port. * Firefox via GeckoDriver directly requires that the host be provided in the HTTP field and the port be provided in the HTTPPort field. * Firefox via Selenium 2 uses just the HTTP field, with the caveat that connections to localhost are not proxied, by default. An additional preference is needed to unset this. * Firefox via Selenium 3 and GeckoDriver fails because Selenium adds a whole bunch of "nulls" for unset values in the Proxy object, which Marionette does not like. mozilla/geckodriver#490 Fixes #41.
The current state of using a Proxy is both well-defined and variously implemented. * Chrome and ChromeDriver uses just the HTTP field with a host:port. * Firefox via GeckoDriver directly requires that the host be provided in the HTTP field and the port be provided in the HTTPPort field. * Firefox via Selenium 2 uses just the HTTP field, with the caveat that connections to localhost are not proxied, by default. An additional preference is needed to unset this. * Firefox via Selenium 3 and GeckoDriver fails because Selenium adds a whole bunch of "nulls" for unset values in the Proxy object, which Marionette does not like. mozilla/geckodriver#490 Fixes #41.
Any updates on this one? any ETA? This issue with firefox and the proxy holding us from upgrading the grid and moving to selenium 3.
Both didn't work since the invalidArgumentError
|
Which binding are you using? Given your capabilities you are not setting 'proxyAutoconfigUrl', but something actually sets |
geckodriver wants lowercase proxyType so, intead of MANUAL, send manual ;) |
@andreastt, I had another look at this and actually we have different issues here with the originally filed code:
I would like to fix all the issues in https://bugzilla.mozilla.org/show_bug.cgi?id=1370959, but would need some feedback first from @andreastt to the above issues. |
Also sprach Henrik Skupin:
1. The failure juangj gets is not because `proxyAutoconfigUrl`
is `null`, but there is no entry for `proxyType` in the
capabilities. As such Marionette bails out. Shouldn't this be a
required property when defining proxy settings?
Proxy configuration object deserialisation was not very well
defined when we implemented this, but there has been some
marginal improvements recently. I haven’t kept on top of
those changes so you will have to consult the specification in
https://w3c.github.io/webdriver/webdriver-spec.html#proxy.
I would suggest to raise a better message when it is missing.
I can’t remember how easy it is to provide a better
Imessage here t might be straight forward, but we also have
#832.
2. With `proxyType` set to `pac` we indeed get a failure in
checking the type of `proxyAutoconfigUrl`. This also happens for
any other kind of proxy. Here `proxyAutoconfigUrl` should only be
checked if `proxyType` is set to `pac` but not otherwise. So this
property should be optional. I cannot see that we mark it that way
in the spec. Should we update that?
First of all, I don’t understand how proxy configuration
in WebDriver is supposed to work from what I see in the
spec at present. As far as I can tell, there is no special
handling of "pac", so we shouldn’t skip any type checks of
"proxyAutoconfigUrl".
Again, I don’t know if this makes sense.
|
@eyal919, this is a different issue and doesn't fit into here. But anyway I will let you know that I fixed that recently via bug 1387092. It will need a new geckodriver release, and Firefox 57.0.
I'm currently refactoring all the code around Regarding the original issue here, my patch on bug 1391016 should improve the failure message. But we still need bug 1370959 fixed which moves all checks over to geckodriver. |
Please note that everything except the If you still see problems please file a new issue. Thanks. I will only keep this issue open to really fix the original issue as reported by @juangj. As it looks like by using |
What do you mean by this? An HTTP request is an HTTP request. |
Note that the capabilities JSON Object used in the curl request is now incorrect, however. It should be updated to use the WebDriver conforming capabilities negotiation. I think this is correct, but I haven’t tested it:
|
There was a missing closing bracket in your last example but it clearly did it:
results in
Something suspicious I still noticed is that if you specify an invalid capability object your are not always getting an exception. I filed bug 1396883 for that. Otherwise I'm going to close this issue now. It's all fixed. |
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. |
Firefox Version
52.0 beta 8
Platform
I'm using Linux, but it probably happens on all of them
Steps to reproduce -
./geckodriver-0.14.0 -b firefox52b8/firefox
curl -d '{"desiredCapabilities": {"proxy": {"proxyAutoconfigUrl": null}}, "requiredCapabilities": {}}' http://localhost:4444/session
Firefox starts up correctly and Marionette appears to handle this just fine, but Geckodriver returns an error:
This error does not occur on Firefox 51.0.1.
The text was updated successfully, but these errors were encountered: