Repository navigation
Closed
Labels
Description
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:
{
"error":"session not created",
"message":"Expected [object String] \"proxyType\" in [object Object] {\"proxyAutoconfigUrl\":null}",
"stacktrace":"stack backtrace:
0: 0x4e0eed - backtrace::backtrace::trace::had1fe133e10f4f84
1: 0x4e13b2 - backtrace::capture::Backtrace::new::hea6d366cd875d5b7
2: 0x43dc86 - geckodriver::marionette::MarionetteSession::response::h65e4938ffab7411a
3: 0x43b542 - <geckodriver::marionette::MarionetteHandler as webdriver::server::WebDriverHandler<geckodriver::marionette::GeckoExtensionRoute>>::handle_command::h847e3041a2edbf86
4: 0x4098ff - std::panicking::try::do_call::h3c184502ab82dbaa
5: 0x5801da - panic_unwind::__rust_maybe_catch_panic
at /buildslave/rust-buildbot/slave/stable-dist-rustc-musl-linux/build/obj/../src/libpanic_unwind/lib.rs:97
6: 0x41c9e4 - <F as alloc::boxed::FnBox<A>>::call_box::h1e0e39839fbedd5b
7: 0x576944 - alloc::boxed::{{impl}}::call_once<(),()>
at /buildslave/rust-buildbot/slave/stable-dist-rustc-musl-linux/build/obj/../src/liballoc/boxed.rs:605
- std::sys_common::thread::start_thread
at /buildslave/rust-buildbot/slave/stable-dist-rustc-musl-linux/build/obj/../src/libstd/sys_common/thread.rs:21
- std::sys::imp::thread::{{impl}}::new::thread_start
at /buildslave/rust-buildbot/slave/stable-dist-rustc-musl-linux/build/obj/../src/libstd/sys/unix/thread.rs:84"
}
This error does not occur on Firefox 51.0.1.
Reacted by Thibaut ETIENNE, evgenijvorobey, Moritz Kneilmann and eyal919
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
None yet
Activity
andreastt commentedon Feb 22, 2017
According to the specification it should be a string type.
juangj commentedon Feb 22, 2017
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
null, as they seem to sometimes do now.andreastt commentedon Feb 22, 2017
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
proxyAutoconfigUrlshould be a string type. Other properties we get from JSON Objects that are null or undefined are ignored, so I do feel that the proxy configuration object as described in the spec right now are slightly out of sync with what we do elsewhere.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.
Add a test to demonstrate that Proxy works
Add a test to demonstrate that Proxy works
[-]Geckodriver error when proxyAutoconfigUrl capability is null[/-][+]Error on proxyAutoconfigUrl set to null[/+]thibaut-sticky commentedon Feb 28, 2017
Waiting for a fix or clarification of the spec, do you see any workaround about this?
andreastt commentedon Feb 28, 2017
The “workaround” is to not define the fields holding null values. E.g.
{proxyAutoconfigUrl: null}→{}.thibaut-sticky commentedon Mar 1, 2017
Too bad, it does not help.
andreastt commentedon Mar 1, 2017
Well
proxyAutoconfigUrlshould certainly not be an object:proxy={proxyAutoconfigUrl={}thibaut-sticky commentedon Mar 1, 2017
Hum, sorry I read too quickly your previous message.
andreastt commentedon Mar 1, 2017
The point is that
proxyAutoconfigUrlneeds to be either a string or undefined (missing) currently.5 remaining items
alessandro-aglietti commentedon May 30, 2017
geckodriver wants lowercase proxyType so, intead of MANUAL, send manual ;)
whimboo commentedon Aug 3, 2017
@andreastt, I had another look at this and actually we have different issues here with the originally filed code:
The failure @juangj gets is not because
proxyAutoconfigUrlisnull, but there is no entry forproxyTypein the capabilities. As such Marionette bails out. Shouldn't this be a required property when defining proxy settings? I would suggest to raise a better message when it is missing.With
proxyTypeset topacwe indeed get a failure in checking the type ofproxyAutoconfigUrl. This also happens for any other kind of proxy. HereproxyAutoconfigUrlshould only be checked ifproxyTypeis set topacbut not otherwise. So this property should be optional. I cannot see that we mark it that way in the spec. Should we update that?With both 1) and 2) fixed Marionette returns a valid session, but webdriver-rust fails now in extracting the data.
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.
andreastt commentedon Aug 3, 2017
whimboo commentedon Aug 16, 2017
@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
manualproxy settings right now on bug 1369827. It will have the same target as the issue above.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.
whimboo commentedon Sep 1, 2017
Please note that everything except the
noProxycapability as has been discussed here is available now in Firefox 57.0 Nightly. To actually use it with geckodriver you will have to wait for the next release, or build it from source on your own.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
curldirectly we bypass thevalidate_proxychecks.andreastt commentedon Sep 1, 2017
What do you mean by this? An HTTP request is an HTTP request.
andreastt commentedon Sep 1, 2017
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:
whimboo commentedon Sep 5, 2017
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.
lock commentedon Aug 17, 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.