Precondition:
Fifefox 52
Selenium 3.3.1
JMeter 3.1
I met an error when run script in Firefox 52 by JMeter, the following error returns. Is there anybody met the same issue as me, please let me know.
Command duration or timeout: 0 milliseconds
Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800'
System info: host: 'I19', ip: '173.255.161.131', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: driver.version: FirefoxDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:367)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.
at org.openqa.selenium.firefox.FirefoxDriver.
at org.openqa.selenium.firefox.FirefoxDriver.
at org.openqa.selenium.firefox.FirefoxDriver.
at com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig.createBrowser(FirefoxDriverConfig.java:100)
at com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig.createBrowser(FirefoxDriverConfig.java:21)
at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.getPreparedBrowser(WebDriverConfig.java:233)
at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadStarted(WebDriverConfig.java:220)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:659)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:628)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:616)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:245)
at java.lang.Thread.run(Unknown Source)_
Same here with
Exception: InvalidArgumentError: Expected [object String] "{\"proxyAutoconfigUrl\":null,\"autodetect\":false,\"socksUsername\":null,\"socksPassword\":null,\"httpProxy\":\"192.168.1.16:39503\",\"proxyType\":\"MANUAL\",\"noProxy\":null,\"ftpProxy\":null,\"socksProxy\":null,\"hCode\":23997356,\"class\":\"org.openqa.selenium.Proxy\",\"sslProxy\":\"192.168.1.16:39503\"}" to be an object (WARNING: The server did not provide any stacktrace information)
This has to do with mozilla/geckodriver#490
This is because Marionette expects properties of the proxy configuration capability object to be either not present at all or of type string -- not null. And as far as I can see and the person how implemented this says, this is how the spec defines it. So maybe it is possible to change the behavior of the RemoteDriver to skip properties with null values?
As @MoritzKn mentioned, see https://github.com/mozilla/geckodriver/issues/490
@innokenty so changing the driver to not pass properties that are null is not an option? If so, what is the reason for that?
Oh sorry, that comment was supposed to mention @lmtierney
Any updates on this one? This issue with firefox holding us from upgrading the grid and moving to selenium 3.
My Last test was using Firefox 52, selenium 3.3.1 and geckodriver 0.15.0 and with the next capabilities for the proxy:
1) desiredCapabilities.proxy = {proxyType: 'direct'};
2) desiredCapabilities.proxy = {
proxyType: "manual",
httpProxy: proxyUrl,
sslProxy: proxyUrl
};
Both didn't work since the invalidArgumentError
1) message: 'InvalidArgumentError: Expected [object String] "{\"proxyAutoconfigUrl\":null,\"socksUsername\":null,\"socksPassword\":null,\"autodetect\":false,\"httpProxy\":null,\"proxyType\":\"DIRECT\",\"noProxy\":null,\"ftpProxy\":null,\"socksProxy\":null,\"hCode\":832656744,\"class\":\"org.openqa.selenium.Proxy\",\"sslProxy\":null}" to be an object (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 0 milliseconds\nBuild info: version: \'3.3.1\', revision: \'5234b32\', time: \'2017-03-10 09:04:52 -0800\'\nSystem info: host: \'xxx\', ip: \'172.25.8.100\', os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.12.3\', java.version: \'1.8.0_60\'\nDriver info: driver.version: FirefoxDriver',
2) message: 'InvalidArgumentError: Expected [object String] "{\"proxyAutoconfigUrl\":null,\"socksUsername\":null,\"socksPassword\":null,\"autodetect\":false,\"httpProxy\":\"localhost:8087\",\"proxyType\":\"MANUAL\",\"noProxy\":null,\"ftpProxy\":null,\"socksProxy\":null,\"hCode\":1558851061,\"class\":\"org.openqa.selenium.Proxy\",\"sslProxy\":\"localhost:8087\"}" to be an object (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 0 milliseconds\nBuild info: version: \'3.3.1\', revision: \'5234b32\', time: \'2017-03-10 09:04:52 -0800\'\nSystem info: host: \'xxx\', ip: \'172.25.8.100\', os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.12.3\', java.version: \'1.8.0_60\'\nDriver info: driver.version: FirefoxDriver',_
Environment
We are having the same issue, the values are clearly not being sent in the request to the hub:
"POST /wd/hub/session HTTP/1.1[\r][\n]"
"Content-Type: application/json; charset=utf-8[\r][\n]"
"Content-Length: 18983[\r][\n]"
"Host: myremotehost.at.work.com:4445[\r][\n]"
"Connection: Keep-Alive[\r][\n]"
"User-Agent: Apache-HttpClient/4.3.5 (java 1.5)[\r][\n]"
"Accept-Encoding: gzip,deflate[\r][\n]"
"[\r][\n]"
"{[\n]"
" "desiredCapabilities": {[\n]"
" "proxy": {[\n]"
" "proxyAutoconfigUrl": "http://somehost.at.work.com/pac.dat",[\n]"
" "autodetect": false,[\n]"
" "proxyType": "PAC",[\n]"
" "hCode": 1655955258,[\n]"
" "class": "org.openqa.selenium.Proxy"[\n]"
" },[\n]"
" "marionette": true,[\n]"
" "browserName": "firefox",[\n]"
" "javascriptEnabled": true,[\n]"
" "version": "",[\n]"
" "platform": "ANY",[\n]"
" "firefox_profile": "UEsDBBQACAgIAEmLkkoAAAAAAAAAAAAAAAA..."[\n]"
" },[\n]"
" "requiredCapabilities": {},[\n]"
" "capabilities": {[\n]"
" "desiredCapabilities": {[\n]"
" "proxy": {[\n]"
" "proxyAutoconfigUrl": "http://somehost.at.work.com/pac.dat",[\n]"
" "autodetect": false,[\n]"
" "proxyType": "PAC",[\n]"
" "hCode": 1655955258,[\n]"
" "class": "org.openqa.selenium.Proxy"[\n]"
" },[\n]"
" "marionette": true,[\n]"
" "browserName": "firefox",[\n]"
" "javascriptEnabled": true,[\n]"
" "version": "",[\n]"
" "platform": "ANY",[\n]"
" "firefox_profile": "UEsDBBQACAgIAEmLkkoAAAAAAAAAAAAAAAA..."[\n]"
" },[\n]"
" "requiredCapabilities": {}[\n]"
" },[\n]"
" "alwaysMatch": {[\n]"
" "proxy": {[\n]"
" "proxyAutoconfigUrl": "http://somehost.at.work.com/pac.dat",[\n]"
" "autodetect": false,[\n]"
" "proxyType": "PAC",[\n]"
" "hCode": 1655955258,[\n]"
" "class": "org.openqa.selenium.Proxy"[\n]"
" },[\n]"
" "javascriptEnabled": true,[\n]"
" "version": "",[\n]"
" "platform": "ANY"[\n]"
" },[\n]"
" "firstMatch": [[\n]"
" {[\n]"
" "browserName": {[\n]"
" "value": "firefox"[\n]"
" }[\n]"
" }[\n]"
" ][\n]"
"}"
However we keep getting the same error:
org.openqa.selenium.SessionNotCreatedException: InvalidArgumentError: Expected [object String] "{\"proxyAutoconfigUrl\":\"http://somehost.at.work.com/pac.dat\",\"autodetect\":false,\"socksUsername\":null,\"socksPassword\":null,\"httpProxy\":null,\"proxyType\":\"PAC\",\"noProxy\":null,\"ftpProxy\":null,\"socksProxy\":null,\"hCode\":238670991,\"class\":\"org.openqa.selenium.Proxy\",\"sslProxy\":null}" to be an object (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'MYREMOTEHOST', ip: '192.168.3.5', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_73'
Driver info: driver.version: FirefoxDriver
Most helpful comment
Any updates on this one? This issue with firefox holding us from upgrading the grid and moving to selenium 3.
My Last test was using Firefox 52, selenium 3.3.1 and geckodriver 0.15.0 and with the next capabilities for the proxy:
1) desiredCapabilities.proxy = {proxyType: 'direct'};
2) desiredCapabilities.proxy = {
proxyType: "manual",
httpProxy: proxyUrl,
sslProxy: proxyUrl
};
Both didn't work since the invalidArgumentError
1) message: 'InvalidArgumentError: Expected [object String] "{\"proxyAutoconfigUrl\":null,\"socksUsername\":null,\"socksPassword\":null,\"autodetect\":false,\"httpProxy\":null,\"proxyType\":\"DIRECT\",\"noProxy\":null,\"ftpProxy\":null,\"socksProxy\":null,\"hCode\":832656744,\"class\":\"org.openqa.selenium.Proxy\",\"sslProxy\":null}" to be an object (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 0 milliseconds\nBuild info: version: \'3.3.1\', revision: \'5234b32\', time: \'2017-03-10 09:04:52 -0800\'\nSystem info: host: \'xxx\', ip: \'172.25.8.100\', os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.12.3\', java.version: \'1.8.0_60\'\nDriver info: driver.version: FirefoxDriver',
2) message: 'InvalidArgumentError: Expected [object String] "{\"proxyAutoconfigUrl\":null,\"socksUsername\":null,\"socksPassword\":null,\"autodetect\":false,\"httpProxy\":\"localhost:8087\",\"proxyType\":\"MANUAL\",\"noProxy\":null,\"ftpProxy\":null,\"socksProxy\":null,\"hCode\":1558851061,\"class\":\"org.openqa.selenium.Proxy\",\"sslProxy\":\"localhost:8087\"}" to be an object (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 0 milliseconds\nBuild info: version: \'3.3.1\', revision: \'5234b32\', time: \'2017-03-10 09:04:52 -0800\'\nSystem info: host: \'xxx\', ip: \'172.25.8.100\', os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.12.3\', java.version: \'1.8.0_60\'\nDriver info: driver.version: FirefoxDriver',_