mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.12k stars 1.52k forks source link

FF 52.3.0esr not working with Selenium 3.4.0 and geckodriver 0.18 #892

Closed tjwelde closed 7 years ago

tjwelde commented 7 years ago

System

Testcase

on mac:

sudo ifconfig lo0 alias 172.16.123.1 # needed to talk to the host
docker run -d -p 4444:4444 --name selenium-hub selenium/hub:3.4.0-francium
git clone https://github.com/SeleniumHQ/docker-selenium.git
cd docker-selenium
BUILD_ARGS="--build-arg FIREFOX_VERSION=52.3.0esr" make firefox firefox_debug
docker run -d --add-host="dockerhost:172.16.123.1" --link selenium-hub:hub <Image ID>

Now you can run your webdriver commands. dockerhost is the domain name for the host.

This is the scenario, I am trying to solve, but I also tested with a local selenium and FF and it also didn't work, with the same error.

Stacktrace

15:28:59.201 INFO - Selenium build info: version: '3.4.0', revision: 'unknown'
15:28:59.203 INFO - Launching a Selenium Grid node
2017-08-22 15:28:59.804:INFO::main: Logging initialized @1132ms to org.seleniumhq.jetty9.util.log.StdErrLog
15:28:59.882 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
 registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
15:28:59.883 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
 registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
15:28:59.884 INFO - Driver class not found: com.opera.core.systems.OperaDriver
15:28:59.885 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
15:28:59.886 INFO - Driver class not found: com.opera.core.systems.OperaDriver
15:28:59.887 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
15:28:59.889 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
 registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
2017-08-22 15:28:59.964:INFO:osjs.Server:main: jetty-9.4.3.v20170317
2017-08-22 15:29:00.048:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@2f7298b{/,null,AVAILABLE}
2017-08-22 15:29:00.088:INFO:osjs.AbstractConnector:main: Started ServerConnector@6d3b14c9{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
2017-08-22 15:29:00.090:INFO:osjs.Server:main: Started @1418ms
15:29:00.091 INFO - Selenium Grid node is up and ready to register to the hub
15:29:00.115 INFO - Starting auto registration thread. Will try to register every 5000 ms.
15:29:00.115 INFO - Registering the node to the hub: http://172.17.0.2:4444/grid/register
15:29:00.146 INFO - The node is registered to the hub and ready to use
15:29:05.488 INFO - SessionCleaner initialized with insideBrowserTimeout 0 and clientGoneTimeout 30000 polling every 3000
15:29:06.530 INFO - Executing: [new session: Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@7ee5a23, browserName=firefox, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.6.2, url=http://webdriver.io}}]])
15:29:06.570 INFO - Creating a new session for Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@7ee5a23, browserName=firefox, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.6.2, url=http://webdriver.io}}]
1503415746769   geckodriver INFO    geckodriver 0.18.0
1503415746774   geckodriver INFO    Listening on 127.0.0.1:16109
1503415747031   geckodriver::marionette INFO    Starting browser /opt/firefox-52.3.0esr/firefox with args ["-marionette"]
1503415747990   Marionette  INFO    Listening on port 43569
15:29:09.740 INFO - Detected dialect: W3C
15:29:09.949 INFO - Done: [new session: Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@7ee5a23, browserName=firefox, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.6.2, url=http://webdriver.io}}]]
15:29:10.068 INFO - Executing: [execute script: return (function getUserAgent() {
  return window.navigator.userAgent;
}).apply(null, arguments), []])
15:29:10.141 INFO - Done: [execute script: return (function getUserAgent() {
  return window.navigator.userAgent;
}).apply(null, arguments), []]
15:29:10.204 INFO - Executing: [get window size])
15:29:10.242 INFO - HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' (500 expected)
15:29:10.264 WARN - Exception thrown
org.openqa.selenium.WebDriverException: getWindowRect
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'c5992d5e282c', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.41-moby', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.imjQJSOHifRx, rotatable=false, timeouts={implicit=0.0, page load=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.3.0, platformVersion=4.9.41-moby, moz:processID=59.0, browserName=firefox, javascriptEnabled=true, platformName=linux}]
Session ID: b3c8a7d3-909c-45f9-bc5d-d84957a68ca7
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.getSize(RemoteWebDriver.java:901)
    at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWindow.getSize(EventFiringWebDriver.java:633)
    at org.openqa.selenium.remote.server.handler.GetWindowSize.call(GetWindowSize.java:31)
    at org.openqa.selenium.remote.server.handler.GetWindowSize.call(GetWindowSize.java:23)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
15:29:10.273 WARN - Exception: getWindowRect
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'c5992d5e282c', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.41-moby', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.imjQJSOHifRx, rotatable=false, timeouts={implicit=0.0, page load=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.3.0, platformVersion=4.9.41-moby, moz:processID=59.0, browserName=firefox, javascriptEnabled=true, platformName=linux}]
Session ID: b3c8a7d3-909c-45f9-bc5d-d84957a68ca7
15:29:10.314 INFO - Executing: [get window size])
15:29:10.328 INFO - HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' (500 expected)
15:29:10.331 WARN - Exception thrown
org.openqa.selenium.WebDriverException: getWindowRect
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'c5992d5e282c', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.41-moby', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.imjQJSOHifRx, rotatable=false, timeouts={implicit=0.0, page load=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.3.0, platformVersion=4.9.41-moby, moz:processID=59.0, browserName=firefox, javascriptEnabled=true, platformName=linux}]
Session ID: b3c8a7d3-909c-45f9-bc5d-d84957a68ca7
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.getSize(RemoteWebDriver.java:901)
    at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWindow.getSize(EventFiringWebDriver.java:633)
    at org.openqa.selenium.remote.server.handler.GetWindowSize.call(GetWindowSize.java:31)
    at org.openqa.selenium.remote.server.handler.GetWindowSize.call(GetWindowSize.java:23)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
15:29:10.332 WARN - Exception: getWindowRect
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'c5992d5e282c', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.41-moby', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.imjQJSOHifRx, rotatable=false, timeouts={implicit=0.0, page load=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.3.0, platformVersion=4.9.41-moby, moz:processID=59.0, browserName=firefox, javascriptEnabled=true, platformName=linux}]
Session ID: b3c8a7d3-909c-45f9-bc5d-d84957a68ca7
15:29:10.361 INFO - Executing: [take screenshot])
15:29:10.386 INFO - Done: [take screenshot]
15:29:10.513 INFO - Executing: [delete session: 784267c6-82ad-417b-9ef9-0eca706f3531])
15:29:10.526 INFO - HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' (500 expected)
15:29:12.615 INFO - Command failed to close cleanly. Destroying forcefully (v2). [/opt/geckodriver-0.18.0, --port=16109, -b, /opt/firefox-52.3.0esr/firefox][ {}]
15:29:13.644 ERROR - Unable to kill process with PID 51
15:29:14.076 WARN - Exception thrown
org.openqa.selenium.WebDriverException: quit
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'c5992d5e282c', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.41-moby', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.imjQJSOHifRx, rotatable=false, timeouts={implicit=0.0, page load=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.3.0, platformVersion=4.9.41-moby, moz:processID=59.0, browserName=firefox, javascriptEnabled=true, platformName=linux}]
Session ID: b3c8a7d3-909c-45f9-bc5d-d84957a68ca7
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
    at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:533)
    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.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:104)
    at com.sun.proxy.$Proxy6.quit(Unknown Source)
    at org.openqa.selenium.support.events.EventFiringWebDriver.quit(EventFiringWebDriver.java:202)
    at org.openqa.selenium.remote.server.handler.DeleteSession.call(DeleteSession.java:50)
    at org.openqa.selenium.remote.server.handler.DeleteSession.call(DeleteSession.java:29)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
15:29:14.078 WARN - Exception: quit
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'c5992d5e282c', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.41-moby', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.imjQJSOHifRx, rotatable=false, timeouts={implicit=0.0, page load=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.3.0, platformVersion=4.9.41-moby, moz:processID=59.0, browserName=firefox, javascriptEnabled=true, platformName=linux}]
Session ID: b3c8a7d3-909c-45f9-bc5d-d84957a68ca7
andreastt commented 7 years ago

This is a duplicate of https://github.com/mozilla/geckodriver/issues/875, and it’s a Selenium issue.

tjwelde commented 7 years ago

So you are saying, the getWindowRect endpoint gets called wrongfully by selenium? But why does it work with FF 55?

andreastt commented 7 years ago

Well that specifically is hard to tell because you didn’t include a trace-level log from geckodriver, like you were asked to in the issue template. But generally, a mapping error between types means Selenium isn’t up to date with the WebDriver standard.

whimboo commented 7 years ago

@andreastt, do we really support 52.0ESR with geckodriver 0.18? I thought the minium version for it is 54.0?

andreastt commented 7 years ago

@whimboo The recommended minimum version is indeed 54. This is clearly laid out in the README (my highlights):

Support is best in Firefox 54 and greater, although generally the more recent the Firefox version, the better the experience as they have more bug fixes and features. Some features will only be available in the most recent Firefox versions, and we strongly advise using the latest Firefox Nightly with geckodriver. Since Windows XP support in Firefox was dropped with Firefox 53, we do not support this platform.

whimboo commented 7 years ago

Alright, so @goldquest has to pick a release of geckodriver which supports the 52.0ESR release branch.

@andreastt could we get a document started (maybe here in the wiki) which lists which version of geckodriver is supposed to work for which releases of Firefox. This would help a lot when checking compatibility for older Firefox releases. Right now this is not obvious.

andreastt commented 7 years ago

@goldquest picked up Firefox 55 in #892 (comment), but I so far have no indication what’s wrong with getting the window rect from that version as we’re missing a trace-level log.

@whimboo This is off-topic, but since we don’t have any exhaustive testing against previous release channels I’m hesitant to set in stone which Firefox versions we support. For as long as geckodriver is pre-release software, Firefox support is going to be a little hit and miss as we adapt to the WebDriver protocol. Fortunately, the protocol will be frozen from next Thursday, which will make life easier for us as implementors.

whimboo commented 7 years ago
@goldquest picked up Firefox 55 in https://github.com/mozilla/geckodriver/issues/892#issuecomment-324151016, but I so far have no indication what’s wrong with getting the window rect from that version as we’re missing a trace-level log.

He said that this version is working correctly. That's why my comment regarding a backward-incompatible feature change in a geckodriver release later than the supported for 52.0.

All in all what should be done here is to downgrade geckodriver. Maybe then getWindowRect will not be present. If that's the case an upgrade of Firefox would have to be done.

andreastt commented 7 years ago

But why does it work with FF 55?

My bad, I misread a “not” into this sentence.

whimboo commented 7 years ago

Removing label Selenium given that it's a compat issue.

lock[bot] commented 5 years ago

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.