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

'noProxy' capability requires to be a list by webdriver spec but is only handled as string #5004

Closed
whimboo opened this issue Nov 3, 2017 · 25 comments
Labels

Comments

@whimboo
Copy link
Contributor

whimboo commented Nov 3, 2017

Given by the webdriver spec the noProxy capability has to be a list:
https://w3c.github.io/webdriver/webdriver-spec.html#proxy

Currently at least the Java binding is forcing the entry to a string type, which causes problems with drivers (like geckodriver) which implement the behavior as given by the spec.

As it looks like some kind of wrapper is necessary to keep both old drivers and wdspec compliant drivers to work.

Here the code in question:
https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/Proxy.java#L76

@shs96c can you please have a look?

@jleyba
Copy link
Contributor

jleyba commented Nov 3, 2017

FYI I just pushed some JS changes related to this in 661a196

@whimboo
Copy link
Contributor Author

whimboo commented Nov 15, 2017

Btw. the actual noProxy capability got added via w3c/webdriver@a90db4b.

@barancev
Copy link
Member

cc @shs96c

@Ismoh
Copy link

Ismoh commented Jan 9, 2018

For all of you, who are still messing around with setting up "noProxy" via Proxy class, I found a workaround:

Proxy proxy = new Proxy();
proxy.setProxyType(Proxy.ProxyType.MANUAL);
proxy.setHttpProxy("webproxy:80");
proxy.setSslProxy("webproxy:80");
//proxy.setNoProxy("localhost, 123.34.54.*, andsoon.com"); DO NOT USE THIS
options.setCapability(CapabilityType.PROXY, proxy);

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.proxy.no_proxies_on", "localhost, 123.34.54.*, andsoon.com"); // INSTEAD use this one
options.setCapability(FirefoxDriver.PROFILE, profile);

Use the FirefoxProfile to set up the no proxy preference.

Edit:
I am using Selenium 3.8.0, GeckoDriver (Marionette) 0.19.1, Java 8.

@p0deje
Copy link
Member

p0deje commented Mar 2, 2018

This works fine with Ruby - user is free to define proxy as a string or

Selenium::WebDriver.logger.level = :debug

proxy = Selenium::WebDriver::Proxy.new
proxy.no_proxy = ["localhost", "123.34.54.*", "andsoon.com"]
caps = Selenium::WebDriver::Remote::Capabilities.firefox(proxy: proxy)
driver = Selenium::WebDriver.for(:firefox, desired_capabilities: caps)
# 2018-03-02 11:46:35 INFO Selenium -> POST session
# 2018-03-02 11:46:35 INFO Selenium    >>> http://127.0.0.1:4444/session | {"desiredCapabilities":{"browserName":"firefox","version":"","platform":"ANY","javascriptEnabled":true,"cssSelectorsEnabled":true,"takesScreenshot":true,"nativeEvents":false,"rotatable":false,"proxy":{"proxyType":"MANUAL","noProxy":["localhost","123.34.54.*","andsoon.com"]},"moz:firefoxOptions":{}},"capabilities":{"firstMatch":[{"proxy":{"proxyType":"manual","noProxy":["localhost","123.34.54.*","andsoon.com"]},"browserName":"firefox","moz:firefoxOptions":{}}]}}
# 2018-03-02 11:46:35 DEBUG Selenium      > {"Accept"=>"application/json", "Content-Type"=>"application/json; charset=utf-8", "Content-Length"=>"465"}
# 1519969597947	Marionette	INFO	Listening on port 49629
# 1519969598018	Marionette	INFO	Proxy settings initialised: {"proxyType":"manual","noProxy":["localhost","123.34.54.*","andsoon.com"]}

With 62744b3, noProxy with string payload is automatically converted to array in W3C capabilities.

@jimevans
Copy link
Member

This was fixed for .NET in f454a5c

@barancev
Copy link
Member

This was fixed in Java too, it supports now both legacy and W3C formats of Proxy.

@ruicapmi
Copy link

Hello,

JAva code in https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/Proxy.java#L76 returns a List for noProxy in toJSON method But with RemoteDriver working with https://github.com/SeleniumHQ/docker-selenium/releases/tag/3.12.0-boron in FIREFOX somethings happens with marionette geckodriver serialization and I'm taking a error:

1529167282737 geckodriver INFO geckodriver 0.20.1
org.openqa.selenium.InvalidArgumentException:
noProxy is not an array: "127.0.0.1,localhost
"
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z'
System info: host: '8221164d15ad', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-93-generic', java.version: '1.8.0_171'

Thanks

@Ismoh
Copy link

Ismoh commented Jun 16, 2018

I can confirm. It is still not fixed, but you can use this workaround:
#5004 (comment)

@ruicapmi
Copy link

Thanks, workaround works

@tarheeldobe
Copy link

tarheeldobe commented Aug 2, 2018

Confirm that it does not work in NodeJS (Nightwatch) either. nightwatchjs/nightwatch#1855

Does anyone have a work around for NodeJS?

@remeltucker
Copy link

I am having trouble getting the workaround given for Java to work.
I am using Selenium 3.14.0, GeckoDriver (Marionette) 0.21, Java 8. Running tests on docker-firefox linked to docker selenium-grid.

Proxy does not seem to take effect and the proxy dialog asking for username and password keeps popping up

Any thoughts ?

@whimboo
Copy link
Contributor Author

whimboo commented Aug 29, 2018

@remeltucker if you are referring to proxy authentication this hasn't been implemented yet in Marionette.

@remeltucker
Copy link

remeltucker commented Aug 29, 2018

I am referring to firefox not bypassing proxies even though I specified the proxy url and the no proxy list as mentioned in the work around here https://github.com/SeleniumHQ/selenium/issues/5004#issuecomment-356313996

Is there anything else I need to do if am executing on a dockerized selenium grid setup running on linux machines?

@alexcomsa
Copy link

@remeltucker if you are using a Docker container or a linux OS for your selenium node you can set the proxy and no_proxy environment variables.

@whimboo
Copy link
Contributor Author

whimboo commented Aug 30, 2018

There is no workaround necessary anymore since Firefox 57. So everything should be done via the proxy capabilities. See https://github.com/mozilla/geckodriver/#proxy-object. If that is not working a trace log is necessary, and make sure that the hosts as specified for noProxy are a list, and not a comma separated string.

@remeltucker
Copy link

Tried the below for sending proxy capabilities

            JsonObject json = new JsonObject();
            json.addProperty("proxyType", "MANUAL");
            json.addProperty("httpProxy", "<proxyURL>:<proxyPort>");
            json.addProperty("sslProxy", "<proxyURL>:<proxyPort>");
            JsonArray jArray = new JsonArray();
            jArray.add("127.0.0.1");
            jArray.add("localhost");
            jArray.add("<url1>");
            jArray.add("<url2");
            json.add("noProxy", jArray);
            capabilities.setCapability(CapabilityType.PROXY, json);

           Driver = new RemoteWebDriver(new URL(gridUrl),options );

Exception observed as shown below
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at org.openqa.selenium.Proxy.(Proxy.java:76)


Test Console logs (Node logs given below)

Message: org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
System info: host: 'f45c89cc5419', ip: 'fe80:0:0:0:101c:a633:ab7d:fa07%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:564)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:143)
at smokeTestStepDefinitions.Hooks.InitializeTest(Hooks.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:40)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:34)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:202)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at org.openqa.selenium.Proxy.(Proxy.java:76)
at org.openqa.selenium.remote.ProtocolHandshake$Result.lambda$static$0(ProtocolHandshake.java:148)
at org.openqa.selenium.remote.ProtocolHandshake$Result.(ProtocolHandshake.java:162)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$1(W3CHandshakeResponse.java:97)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:106)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
... 47 more

Console Log from the Firefox Node

19:20:00.510 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0'
19:20:00.517 INFO [GridLauncherV3$3.launch] - Launching a Selenium Grid node on port 5555
2018-08-30 19:20:00.719:INFO::main: Logging initialized @786MS to org.seleniumhq.jetty9.util.log.StdErrLog
19:20:00.963 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 5555
19:20:00.963 INFO [GridLauncherV3$3.launch] - Selenium Grid node is up and ready to register to the hub
19:20:01.040 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
19:20:01.040 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://selenium-hub:4444/grid/register
19:20:01.711 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
19:20:12.507 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "firefox",
"build": "FastForward",
"ignoreProtectedModeSettings": true,
"moz:firefoxOptions": {
"args": [
],
"log": {
"level": "trace"
},
"prefs": {
}
},
"name": "SmokeTest",
"proxy": {
"httpProxy": ":",
"noProxy": "127.0.0.1,localhost,URL1,URL2,169.254\u002f16,.local,0.0.0.0",
"proxyType": "manual",
"sslProxy": ":"
},
"recordVideo": true
}
19:20:12.509 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
1535656812544 geckodriver INFO geckodriver 0.21.0
1535656812550 geckodriver INFO Listening on 127.0.0.1:3582
1535656812580 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.TqirMFjOQT7z"
1535656812581 geckodriver::marionette DEBUG Waiting 60s to connect to browser on 127.0.0.1:41228
1535656813156 Marionette DEBUG Received observer notification profile-after-change
1535656813848 Marionette DEBUG Received observer notification command-line-startup
1535656813848 Marionette DEBUG Received observer notification nsPref:changed
1535656814660 Marionette DEBUG Received observer notification sessionstore-windows-restored
1535656815435 Marionette DEBUG Setting recommended pref apz.content_response_timeout to 60000
1535656815435 Marionette DEBUG Setting recommended pref browser.download.panel.shown to true
1535656815435 Marionette DEBUG Setting recommended pref browser.pagethumbnails.capturing_disabled to true
1535656815436 Marionette DEBUG Setting recommended pref browser.search.update to false
1535656815436 Marionette DEBUG Setting recommended pref toolkit.cosmeticAnimations.enabled to false
1535656815437 Marionette DEBUG Setting recommended pref browser.tabs.disableBackgroundZombification to false
1535656815438 Marionette DEBUG Setting recommended pref browser.tabs.warnOnCloseOtherTabs to false
1535656815438 Marionette DEBUG Setting recommended pref browser.tabs.warnOnOpen to false
1535656815438 Marionette DEBUG Setting recommended pref browser.usedOnWindows10.introURL to
1535656815438 Marionette DEBUG Setting recommended pref browser.urlbar.suggest.searches to false
1535656815440 Marionette DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1535656815440 Marionette DEBUG Setting recommended pref dom.disable_beforeunload to true
1535656815440 Marionette DEBUG Setting recommended pref dom.disable_open_during_load to false
1535656815440 Marionette DEBUG Setting recommended pref dom.file.createInChild to true
1535656815440 Marionette DEBUG Setting recommended pref dom.max_chrome_script_run_time to 0
1535656815440 Marionette DEBUG Setting recommended pref dom.max_script_run_time to 0
1535656815441 Marionette DEBUG Setting recommended pref extensions.getAddons.cache.enabled to false
1535656815442 Marionette DEBUG Setting recommended pref extensions.webservice.discoverURL to http://%(server)s/dummy/discoveryURL
1535656815442 Marionette DEBUG Setting recommended pref network.http.prompt-temp-redirect to false
1535656815442 Marionette DEBUG Setting recommended pref network.http.speculative-parallel-limit to 0
1535656815442 Marionette DEBUG Setting recommended pref security.fileuri.strict_origin_policy to false
1535656815442 Marionette DEBUG Setting recommended pref security.notification_enable_delay to 0
1535656815442 Marionette DEBUG Setting recommended pref signon.autofillForms to false
1535656815442 Marionette DEBUG Setting recommended pref signon.rememberSignons to false
1535656815482 Marionette DEBUG New connections are accepted
1535656815483 Marionette INFO Listening on port 41228
1535656815490 geckodriver::marionette DEBUG Connected to Marionette on 127.0.0.1:41228
1535656815499 Marionette DEBUG Accepted connection 0 from 127.0.0.1:37860
1535656815502 Marionette TRACE 0 -> [0,1,"WebDriver:NewSession",{"browserName":"firefox","capabilities":{"desiredCapabilities":{"browserName":"firefox","proxy":{ ... m","
...com","169.254/16",".local","0.0.0.0"],"proxyType":"manual","sslProxy":":"}}]
1535656815506 Marionette INFO Proxy settings initialised: {"proxyType":"manual","httpProxy":":","noProxy":["127.0.0.1","localhost","
.
..com","...com","169.254/16",".local","0.0.0.0"],"sslProxy":":"}
1535656815543 Marionette DEBUG Register listener.js for window 2147483649
1535656815549 Marionette TRACE 0 <- [1,1,null,{"sessionId":"5a5f3324-4dd6-488d-a88f-8325663bca44","capabilities":{"browserName":"firefox","browserVersion":"61.0. ... 2,"moz:profile":"/tmp/rust_mozprofile.TqirMFjOQT7z","moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}]
1535656815552 webdriver::server DEBUG <- 200 OK {"value": {"sessionId":"5a5f3324-4dd6-488d-a88f-8325663bca44","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"61.0.1","moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":82,"moz:profile":"/tmp/rust_mozprofile.TqirMFjOQT7z","moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"linux","platformVersion":"3.10.0-862.9.1.el7.x86_64","proxy":{"httpProxy":":","noProxy":["127.0.0.1","localhost","
.
..com","..*.com","169.254/16",".local","0.0.0.0"],"proxyType":"manual","sslProxy":":"},"rotatable":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
19:20:15.564 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
19:20:15.603 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session 5a5f3324-4dd6-488d-a88f-8325663bca44 (org.openqa.selenium.firefox.GeckoDriverService)

Note: Hope this helps. Having issues getting the trace logs. Will try again if this info doesn't help.

@barancev
Copy link
Member

barancev commented Aug 31, 2018

@remeltucker Please upgrade to 3.14 and retest

@whimboo
Copy link
Contributor Author

whimboo commented Aug 31, 2018

The trace log looks fine. So do what @barancev suggested first, and if it still doesn't work please open about:config in Firefox for this user profile and check the value of the network.proxy.no_proxies_on preference. If it doesn't contain your entries please file a geckodriver issue.

@remeltucker
Copy link

remeltucker commented Sep 1, 2018

Retested in 3.14 and I did not get the java exception as mentioned earlier and was able to pass the noproxy as a list.
However I did not see the value of network.proxy.no_proxies_on being updated in my firefox profile.
Logs from the node (Dockerized Grid and Node running on linux machines) as given below. The alert for proxy authentication popped up which makes me think that the noproxy list is not being considered during execution

Am I missing something ? if not, is there any recommended workarounds?

Node Logs


12:57:13.806 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0'
12:57:13.813 INFO [GridLauncherV3$3.launch] - Launching a Selenium Grid node on port 5555
2018-09-01 12:57:14.020:INFO::main: Logging initialized @769ms to org.seleniumhq.jetty9.util.log.StdErrLog
12:57:14.263 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 5555
12:57:14.264 INFO [GridLauncherV3$3.launch] - Selenium Grid node is up and ready to register to the hub
12:57:14.344 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
12:57:14.345 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://selenium-hub:4444/grid/register
12:57:14.985 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
12:57:41.223 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "firefox",
"build": "FastForward",
"ignoreProtectedModeSettings": true,
"moz:firefoxOptions": {
"args": [
],
"log": {
"level": "trace"
},
"prefs": {
}
},
"name": "FastForward-Smoke",
"proxy": {
"httpProxy": ":",
"noProxy": "127.0.0.1,localhost,.kdc..com,,,169.254\u002f16,.local,0.0.0.0",
"proxyType": "manual",
"sslProxy": ":"
},
"recordVideo": true
}
12:57:41.226 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
1535806661259 geckodriver INFO geckodriver 0.21.0
1535806661266 geckodriver INFO Listening on 127.0.0.1:22852
1535806661290 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.sxG1cqzx1Dw4"
1535806661292 geckodriver::marionette DEBUG Waiting 60s to connect to browser on 127.0.0.1:35053
1535806661881 Marionette DEBUG Received observer notification profile-after-change
1535806662568 Marionette DEBUG Received observer notification command-line-startup
1535806662568 Marionette DEBUG Received observer notification nsPref:changed
1535806663403 Marionette DEBUG Received observer notification sessionstore-windows-restored
1535806663651 Marionette DEBUG Setting recommended pref apz.content_response_timeout to 60000
1535806663652 Marionette DEBUG Setting recommended pref browser.download.panel.shown to true
1535806663652 Marionette DEBUG Setting recommended pref browser.pagethumbnails.capturing_disabled to true
1535806663653 Marionette DEBUG Setting recommended pref browser.search.update to false
1535806663654 Marionette DEBUG Setting recommended pref toolkit.cosmeticAnimations.enabled to false
1535806663655 Marionette DEBUG Setting recommended pref browser.tabs.disableBackgroundZombification to false
1535806663655 Marionette DEBUG Setting recommended pref browser.tabs.warnOnCloseOtherTabs to false
1535806663656 Marionette DEBUG Setting recommended pref browser.tabs.warnOnOpen to false
1535806663656 Marionette DEBUG Setting recommended pref browser.usedOnWindows10.introURL to
1535806663656 Marionette DEBUG Setting recommended pref browser.urlbar.suggest.searches to false
1535806663657 Marionette DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1535806663658 Marionette DEBUG Setting recommended pref dom.disable_beforeunload to true
1535806663658 Marionette DEBUG Setting recommended pref dom.disable_open_during_load to false
1535806663658 Marionette DEBUG Setting recommended pref dom.file.createInChild to true
1535806663658 Marionette DEBUG Setting recommended pref dom.max_chrome_script_run_time to 0
1535806663658 Marionette DEBUG Setting recommended pref dom.max_script_run_time to 0
1535806663659 Marionette DEBUG Setting recommended pref extensions.getAddons.cache.enabled to false
1535806663659 Marionette DEBUG Setting recommended pref extensions.webservice.discoverURL to http://%(server)s/dummy/discoveryURL
1535806663659 Marionette DEBUG Setting recommended pref network.http.prompt-temp-redirect to false
1535806663659 Marionette DEBUG Setting recommended pref network.http.speculative-parallel-limit to 0
1535806663660 Marionette DEBUG Setting recommended pref security.fileuri.strict_origin_policy to false
1535806663660 Marionette DEBUG Setting recommended pref security.notification_enable_delay to 0
1535806663660 Marionette DEBUG Setting recommended pref signon.autofillForms to false
1535806663660 Marionette DEBUG Setting recommended pref signon.rememberSignons to false
1535806663700 Marionette DEBUG New connections are accepted
1535806663700 Marionette INFO Listening on port 35053
1535806663800 geckodriver::marionette DEBUG Connected to Marionette on 127.0.0.1:35053
1535806663801 Marionette DEBUG Accepted connection 0 from 127.0.0.1:38332
1535806663814 Marionette TRACE 0 -> [0,1,"WebDriver:NewSession",{"browserName":"firefox","capabilities":{"desiredCapabilities":{"browserName":"firefox","proxy":{ ... ","
.
.com","169.254/16",".local","0.0.0.0"],"proxyType":"manual","sslProxy":"proxy.kdc..com:8099"}}]
1535806663818 Marionette INFO Proxy settings initialised: {"proxyType":"manual","httpProxy":"proxy.kdc.
.com:8099","noProxy":["127.0.0.1","localhost",".kdc..com",".ds..com",".abc..com","169.254/16",".local","0.0.0.0"],"sslProxy":"proxy.kdc..com:8099"}
1535806663850 Marionette DEBUG Register listener.js for window 2147483649
1535806663855 Marionette TRACE 0 <- [1,1,null,{"sessionId":"e0a0f4cd-94ee-438c-969e-435191ead5d8","capabilities":{"browserName":"firefox","browserVersion":"61.0. ... 1,"moz:profile":"/tmp/rust_mozprofile.sxG1cqzx1Dw4","moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}]
1535806663857 webdriver::server DEBUG <- 200 OK {"value": {"sessionId":"e0a0f4cd-94ee-438c-969e-435191ead5d8","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"61.0.1","moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":81,"moz:profile":"/tmp/rust_mozprofile.sxG1cqzx1Dw4","moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"linux","platformVersion":"3.10.0-862.9.1.el7.x86_64","proxy":{"httpProxy":"proxy.kdc.
.com:8099","noProxy":["127.0.0.1","localhost",".kdc..com",".ds..com",".abc..com","169.254/16",".local","0.0.0.0"],"proxyType":"manual","sslProxy":"proxy.kdc..com:8099"},"rotatable":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
12:57:43.868 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
12:57:43.903 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session e0a0f4cd-94ee-438c-969e-435191ead5d8 (org.openqa.selenium.firefox.GeckoDriverService)
1535806664126 webdriver::server DEBUG -> POST /session/e0a0f4cd-94ee-438c-969e-435191ead5d8/url {
"url": "http:\u002f\u002fwww.
.com"
}
1535806664128 Marionette TRACE 0 -> [0,2,"WebDriver:Navigate",{"url":"http://www.
***.com"}]
1535806664136 Marionette DEBUG Received DOM event beforeunload for about:blank
1535806745236 Marionette DEBUG Received DOM event pagehide for about:blank
1535806745644 Marionette DEBUG Received DOM event DOMContentLoaded for https://www.****.com/
1535806746502 Marionette DEBUG Received observer notification common-dialog-loaded
1535806746506 Marionette TRACE 0 <- [1,2,null,{}]
1535806746510 webdriver::server DEBUG <- 200 OK {"value": null}
1535806746575 webdriver::server DEBUG -> GET /session/e0a0f4cd-94ee-438c-969e-435191ead5d8/title
1535806746578 Marionette TRACE 0 -> [0,3,"WebDriver:GetTitle",{}]
1535806746579 Marionette TRACE 0 <- [1,3,{"error":"unexpected alert open","message":"","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178:5\nU ... nManagerPrompter.js:599:12\nrun@jar:file:///opt/firefox-latest/omni.ja!/components/nsLoginManagerPrompter.js:121:18\n"},null]
1535806746580 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unexpected alert open","message":"","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178:5\nUnexpectedAlertOpenError@chrome://marionette/content/error.js:461:5\nassert.that/<@chrome://marionette/content/assert.js:405:13\nassert.noUserPrompt@chrome://marionette/content/assert.js:178:3\nGeckoDriver.prototype._assertAndDismissModal@chrome://marionette/content/driver.js:3185:5\nGeckoDriver.prototype.getTitle@chrome://marionette/content/driver.js:1110:3\ndespatch@chrome://marionette/content/server.js:294:20\nexecute@chrome://marionette/content/server.js:268:11\nonPacket/<@chrome://marionette/content/server.js:243:15\nonPacket@chrome://marionette/content/server.js:242:8\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:500:9\nopenModalWindow@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:353:5\nopenPrompt@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:566:9\nnsIPrompt_promptUsernameAndPassword@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:757:9\npromptAuth@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:856:18\npromptAuth@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:100:16\npromptAuth@jar:file:///opt/firefox-latest/omni.ja!/components/nsLoginManagerPrompter.js:599:12\nrun@jar:file:///opt/firefox-latest/omni.ja!/components/nsLoginManagerPrompter.js:121:18\n"}}
1535806746677 webdriver::server DEBUG -> DELETE /session/e0a0f4cd-94ee-438c-969e-435191ead5d8/window
1535806746678 Marionette TRACE 0 -> [0,4,"WebDriver:CloseWindow",{}]
1535806746679 Marionette TRACE 0 <- [1,4,{"error":"unexpected alert open","message":"","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178:5\nU ... nManagerPrompter.js:599:12\nrun@jar:file:///opt/firefox-latest/omni.ja!/components/nsLoginManagerPrompter.js:121:18\n"},null]
1535806746680 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unexpected alert open","message":"","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178:5\nUnexpectedAlertOpenError@chrome://marionette/content/error.js:461:5\nassert.that/<@chrome://marionette/content/assert.js:405:13\nassert.noUserPrompt@chrome://marionette/content/assert.js:178:3\nGeckoDriver.prototype._assertAndDismissModal@chrome://marionette/content/driver.js:3185:5\nGeckoDriver.prototype.close@chrome://marionette/content/driver.js:2718:3\ndespatch@chrome://marionette/content/server.js:294:20\nexecute@chrome://marionette/content/server.js:268:11\nonPacket/<@chrome://marionette/content/server.js:243:15\nonPacket@chrome://marionette/content/server.js:242:8\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:500:9\nopenModalWindow@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:353:5\nopenPrompt@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:566:9\nnsIPrompt_promptUsernameAndPassword@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:757:9\npromptAuth@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:856:18\npromptAuth@jar:file:///opt/firefox-latest/omni.ja!/components/nsPrompter.js:100:16\npromptAuth@jar:file:///opt/firefox-latest/omni.ja!/components/nsLoginManagerPrompter.js:599:12\nrun@jar:file:///opt/firefox-latest/omni.ja!/components/nsLoginManagerPrompter.js:121:18\n"}}

@barancev
Copy link
Member

barancev commented Sep 1, 2018

I mean, upgrade you client WebDriver library, the log above shows you're using version 3.12

@remeltucker
Copy link

Where are you seeing 3.12? I am seeing 3.14 .
Below is the test console log for the test run using 3.14

Message: org.openqa.selenium.UnhandledAlertException: :
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'f45c89cc5419', ip: 'fe80:0:0:0:82a:383b:cb47:afa0%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: false, browserName: firefox, browserVersion: 61.0.1, javascriptEnabled: true, moz:accessibilityChecks: false, moz:headless: false, moz:processID: 81, moz:profile: /tmp/rust_mozprofile.sxG1cq..., moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, platformVersion: 3.10.0-862.9.1.el7.x86_64, proxy: Proxy(manual, http=proxy.kd..., rotatable: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, webdriver.remote.sessionid: e0a0f4cd-94ee-438c-969e-435...}
Session ID: e0a0f4cd-94ee-438c-969e-435191ead5d8
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:120)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at org.openqa.selenium.remote.RemoteWebDriver.close(RemoteWebDriver.java:438)
at smokeTestStepDefinitions.Hooks.TearDownTest(Hooks.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:40)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:34)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:206)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:46)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

@barancev
Copy link
Member

barancev commented Sep 1, 2018

@remeltucker So it's not UnreachableBrowserException you reported earllier, thank you for clarification.

@whimboo, can you please look at the marionette log.

@whimboo
Copy link
Contributor Author

whimboo commented Sep 3, 2018

I feel the last comments drift away the original reason why this issue was filed. So @remeltucker if it still not works and you can finally give me a response to my request for the network.proxy.no_proxies_on preference value, then file a new issue for geckodriver please.

Here your problem is offtopic. Thanks.

@remeltucker
Copy link

remeltucker commented Sep 3, 2018

My comment post the ask to retest does mention that the network.proxy.no_proxies_on preference value is not updated. Sorry if it was not clear.I have filed an issue for geckodriver (mozilla/geckodriver#1365)

Thanks @whimboo and @barancev

@lock lock bot locked and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests