geckodriver
geckodriver copied to clipboard
Geckodriver does not evaluate defined properties before passing them back to Python
System
- Version: 0.26.0
- Platform: Linux/macOS
- Firefox: 74.0
Testcase
https://github.com/domoritz/vega_firefox_bug/blob/patch-1/test.py
import json
code = """
class Wrapper {
constructor(generator) {
Object.defineProperty(this, 'foo', {
enumerable: true,
get: generator
});
}
}
const f = new Wrapper(() => "Hello World")
const done = arguments[1];
done(f);
"""
for driver_name in ["chrome", "firefox"]:
if driver_name == "firefox":
from selenium.webdriver import Firefox as Driver
from selenium.webdriver.firefox.options import Options
else:
from selenium.webdriver import Chrome as Driver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("--headless")
driver = Driver(options=options)
try:
driver.get('about:blank')
output = driver.execute_async_script(code, {})
finally:
driver.close()
print("-------------------------------")
print(f"Full output for {driver_name}")
print(json.dumps(output, indent=2))
Output from this code on Geckodriver and Chromedriver
-------------------------------
Full output for chrome
{
"foo": "Hello World"
}
-------------------------------
Full output for firefox
{}
cc @jakevdp
@domoritz Could you provide a trace-level log for this script to help us investigate? (https://searchfox.org/mozilla-central/source/testing/geckodriver/doc/TraceLogs.md)
Thanks for the link to the instructions. Here are the logs
1583809614886 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofilehq4Qmk"
*** You are running in headless mode.
1583809615251 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583809615489 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583809615489 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583809615489 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583809615489 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583809616922 Marionette INFO Listening on port 62731
1583809616947 Marionette WARN TLS certificate errors will be ignored for this session
1583809617669 Marionette INFO Stopped listening on port 62731
1583809796971 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofileULEdAZ"
*** You are running in headless mode.
1583809797398 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583809797625 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583809797625 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583809797625 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583809797625 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583809799057 Marionette INFO Listening on port 62910
1583809799148 Marionette WARN TLS certificate errors will be ignored for this session
1583809799563 Marionette INFO Stopped listening on port 62910
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to remove
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to remove
1583809813043 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofilesPrQHo"
*** You are running in headless mode.
1583809813347 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583809813561 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583809813562 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583809813562 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583809813562 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583809814900 Marionette INFO Listening on port 62981
1583809814999 Marionette WARN TLS certificate errors will be ignored for this session
1583809815640 Marionette INFO Stopped listening on port 62981
1583809834254 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofileo25aKs"
*** You are running in headless mode.
1583809834568 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583809834781 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583809834781 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583809834781 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583809834781 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583809836144 Marionette INFO Listening on port 63055
1583809836213 Marionette WARN TLS certificate errors will be ignored for this session
1583809837562 Marionette INFO Stopped listening on port 63055
1583809848775 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofileINjwxF"
*** You are running in headless mode.
1583809849069 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583809849288 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583809849288 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583809849288 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583809849288 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583809850597 Marionette INFO Listening on port 63139
1583809850629 Marionette WARN TLS certificate errors will be ignored for this session
1583809850892 Marionette INFO Stopped listening on port 63139
1583809871617 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofileQ6I6HD"
*** You are running in headless mode.
1583809872030 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583809872308 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583809872309 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583809872309 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583809872309 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583809873766 Marionette INFO Listening on port 63222
1583809873795 Marionette WARN TLS certificate errors will be ignored for this session
1583809874068 Marionette INFO Stopped listening on port 63222
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to remove
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to remove
1583809880019 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofileLasHmH"
*** You are running in headless mode.
1583809880339 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583809880579 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583809880579 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583809880579 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583809880580 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583809881894 Marionette INFO Listening on port 63288
1583809881982 Marionette WARN TLS certificate errors will be ignored for this session
1583809882292 Marionette INFO Stopped listening on port 63288
1583810135623 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofilesNNdO6"
*** You are running in headless mode.
1583810135979 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583810136190 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583810136191 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583810136191 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583810136191 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583810137560 Marionette INFO Listening on port 63492
1583810137602 Marionette WARN TLS certificate errors will be ignored for this session
1583810137877 Marionette INFO Stopped listening on port 63492
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to remove
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to remove
1583810597316 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofile3t7pyV"
*** You are running in headless mode.
1583810597678 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583810597899 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583810597899 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583810597899 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583810597899 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583810599194 Marionette INFO Listening on port 63774
1583810599294 Marionette WARN TLS certificate errors will be ignored for this session
1583810599561 Marionette INFO Stopped listening on port 63774
1583811894741 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofile17P23j"
*** You are running in headless mode.
1583811895089 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583811895286 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583811895287 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583811895287 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583811895287 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583811896583 Marionette INFO Listening on port 64353
1583811896599 Marionette WARN TLS certificate errors will be ignored for this session
1583811896643 Marionette INFO Stopped listening on port 64353
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to remove
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to remove
1583811912901 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofilej0omB2"
*** You are running in headless mode.
1583811913184 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583811913392 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583811913392 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583811913392 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583811913393 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583811914586 Marionette INFO Listening on port 64412
1583811914658 Marionette WARN TLS certificate errors will be ignored for this session
1583811914704 Marionette INFO Stopped listening on port 64412
1583865750061 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "--vv" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofilebMbjyj"
*** You are running in headless mode.
1583865751441 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583865751782 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583865751782 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583865751782 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583865751782 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583865753254 Marionette INFO Listening on port 59881
1583865753286 Marionette WARN TLS certificate errors will be ignored for this session
1583865753359 Marionette INFO Stopped listening on port 59881
1583865833725 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofileGsfGpC"
1583865833726 geckodriver::marionette DEBUG Waiting 60s to connect to browser on 127.0.0.1:59977
*** You are running in headless mode.
1583865834111 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: networkStatus
1583865834486 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: mozillaAddons
1583865834486 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: telemetry
1583865834486 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: resource://pdf.js/
1583865834486 [email protected] WARN Loading extension '[email protected]': Reading manifest: Invalid extension permission: about:reader*
1583865834527 Marionette TRACE Received observer notification profile-after-change
1583865834595 Marionette TRACE Received observer notification command-line-startup
1583865834595 Marionette DEBUG Init aborted (running=false, enabled=true, finalUIStartup=false)
1583865834689 Marionette TRACE Received observer notification toplevel-window-ready
1583865835746 Marionette TRACE Received observer notification marionette-startup-requested
1583865835746 Marionette TRACE Waiting until startup recorder finished recording startup scripts...
1583865835764 Marionette TRACE All scripts recorded.
1583865835764 Marionette DEBUG Setting recommended pref apz.content_response_timeout to 60000
1583865835764 Marionette DEBUG Setting recommended pref browser.contentblocking.introCount to 99
1583865835764 Marionette DEBUG Setting recommended pref browser.download.panel.shown to true
1583865835764 Marionette DEBUG Setting recommended pref browser.newtabpage.enabled to false
1583865835765 Marionette DEBUG Setting recommended pref browser.pagethumbnails.capturing_disabled to true
1583865835765 Marionette DEBUG Setting recommended pref browser.search.update to false
1583865835765 Marionette DEBUG Setting recommended pref browser.tabs.disableBackgroundZombification to false
1583865835765 Marionette DEBUG Setting recommended pref browser.tabs.remote.separatePrivilegedContentProcess to false
1583865835765 Marionette DEBUG Setting recommended pref browser.tabs.unloadOnLowMemory to false
1583865835765 Marionette DEBUG Setting recommended pref browser.tabs.warnOnCloseOtherTabs to false
1583865835765 Marionette DEBUG Setting recommended pref browser.tabs.warnOnOpen to false
1583865835765 Marionette DEBUG Setting recommended pref browser.usedOnWindows10.introURL to
1583865835766 Marionette DEBUG Setting recommended pref browser.urlbar.suggest.searches to false
1583865835766 Marionette DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1583865835766 Marionette DEBUG Setting recommended pref dom.disable_beforeunload to true
1583865835766 Marionette DEBUG Setting recommended pref dom.disable_open_during_load to false
1583865835767 Marionette DEBUG Setting recommended pref dom.file.createInChild to true
1583865835767 Marionette DEBUG Setting recommended pref dom.max_chrome_script_run_time to 0
1583865835767 Marionette DEBUG Setting recommended pref dom.max_script_run_time to 0
1583865835767 Marionette DEBUG Setting recommended pref dom.push.connection.enabled to false
1583865835767 Marionette DEBUG Setting recommended pref extensions.getAddons.cache.enabled to false
1583865835767 Marionette DEBUG Setting recommended pref extensions.webservice.discoverURL to http://%(server)s/dummy/discoveryURL
1583865835767 Marionette DEBUG Setting recommended pref network.http.prompt-temp-redirect to false
1583865835767 Marionette DEBUG Setting recommended pref network.http.speculative-parallel-limit to 0
1583865835768 Marionette DEBUG Setting recommended pref privacy.trackingprotection.enabled to false
1583865835768 Marionette DEBUG Setting recommended pref security.fileuri.strict_origin_policy to false
1583865835768 Marionette DEBUG Setting recommended pref security.notification_enable_delay to 0
1583865835768 Marionette DEBUG Setting recommended pref signon.autofillForms to false
1583865835768 Marionette DEBUG Setting recommended pref signon.rememberSignons to false
1583865835768 Marionette DEBUG Setting recommended pref toolkit.cosmeticAnimations.enabled to false
1583865835798 Marionette INFO Listening on port 59977
1583865835798 Marionette DEBUG Marionette is listening
1583865835900 Marionette DEBUG Accepted connection 0 from 127.0.0.1:60012
1583865835900 geckodriver::marionette DEBUG Connection to Marionette established on 127.0.0.1:59977.
1583865835901 Marionette DEBUG 0 -> [0,1,"WebDriver:NewSession",{"acceptInsecureCerts":true,"browserName":"firefox"}]
1583865835901 Marionette WARN TLS certificate errors will be ignored for this session
1583865835919 Marionette TRACE [18] Frame script loaded
1583865835920 Marionette TRACE [18] Frame script registered
1583865835923 Marionette DEBUG 0 <- [1,1,null,{"sessionId":"8db1bb8c-98d5-8b47-b195-24584b549156","capabilities":{"browserName":"firefox","browserVersion":"75.0" ... /rust_mozprofileGsfGpC","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}]
1583865835926 webdriver::server DEBUG <- 200 OK {"value":{"sessionId":"8db1bb8c-98d5-8b47-b195-24584b549156","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"75.0","moz:accessibilityChecks":false,"moz:buildID":"20200309155231","moz:geckodriverVersion":"0.26.0","moz:headless":true,"moz:processID":45450,"moz:profile":"/var/folders/73/7f2yqjhs57d56ljtlfrxsjvm0000gn/T/rust_mozprofileGsfGpC","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"mac","platformVersion":"19.4.0","rotatable":false,"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"}}}
1583865835927 webdriver::server DEBUG -> POST /session/8db1bb8c-98d5-8b47-b195-24584b549156/url {"url": "about:blank"}
1583865835929 Marionette DEBUG 0 -> [0,2,"WebDriver:Navigate",{"url":"about:blank"}]
1583865835933 Marionette TRACE [18] Received DOM event beforeunload for about:blank
1583865835933 Marionette TRACE [18] Received DOM event pagehide for about:blank
1583865835936 Marionette TRACE [18] Received DOM event DOMContentLoaded for about:blank
1583865835953 Marionette TRACE [18] Received DOM event pageshow for about:blank
1583865835956 Marionette DEBUG 0 <- [1,2,null,{"value":null}]
1583865835958 webdriver::server DEBUG <- 200 OK {"value":null}
1583865835959 webdriver::server DEBUG -> POST /session/8db1bb8c-98d5-8b47-b195-24584b549156/execute/async {"script": "\nclass Wrapper {\n constructor(generator) {\n Object.defineProperty(this, 'foo', {\n enumerable: true,\n get: generator\n });\n }\n}\n\nconst f = new Wrapper(() => \"Hello World\")\n\nconst done = arguments[1];\ndone(f);\n", "args": [{}]}
1583865835960 Marionette DEBUG 0 -> [0,3,"WebDriver:ExecuteAsyncScript",{"args":[{}],"script":"\nclass Wrapper {\n constructor(generator) {\n Object.definePr ... get: generator\n });\n }\n}\n\nconst f = new Wrapper(() => \"Hello World\")\n\nconst done = arguments[1];\ndone(f);\n"}]
1583865835962 Marionette DEBUG 0 <- [1,3,null,{"value":{}}]
1583865835963 webdriver::server DEBUG <- 200 OK {"value":{}}
1583865835964 webdriver::server DEBUG -> DELETE /session/8db1bb8c-98d5-8b47-b195-24584b549156/window
1583865835964 Marionette DEBUG 0 -> [0,4,"WebDriver:CloseWindow",{}]
1583865835964 Marionette DEBUG 0 <- [1,4,null,[]]
1583865835965 webdriver::server DEBUG Last window was closed, deleting session
1583865835965 webdriver::server DEBUG Deleting session
1583865835966 Marionette DEBUG 0 -> [0,5,"Marionette:Quit",{"flags":["eForceQuit"]}]
1583865835966 Marionette INFO Stopped listening on port 59977
1583865836256 Marionette TRACE Received observer notification quit-application
1583865836259 Marionette DEBUG 0 <- [1,5,null,{"cause":"shutdown"}]
1583865836288 Marionette DEBUG Closed connection 0
1583865836300 addons.xpi WARN Addon with ID [email protected] already installed, older version will be disabled
1583865836300 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2348:10
[email protected]:2275:12
[email protected]:4320:27
[email protected]:2054:13
1583865836301 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2278:10
[email protected]:4320:27
[email protected]:2054:13
1583865836314 addons.xpi WARN Addon with ID [email protected] already installed, older version will be disabled
1583865836314 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2348:10
[email protected]:2275:12
[email protected]:4320:27
[email protected]:2054:13
1583865836315 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2278:10
[email protected]:4320:27
[email protected]:2054:13
1583865836328 addons.xpi WARN Addon with ID [email protected] already installed, older version will be disabled
1583865836329 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2348:10
[email protected]:2275:12
[email protected]:4320:27
[email protected]:2054:13
1583865836329 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2278:10
[email protected]:4320:27
[email protected]:2054:13
1583865836340 addons.xpi WARN Addon with ID [email protected] already installed, older version will be disabled
1583865836341 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2348:10
[email protected]:2275:12
[email protected]:4320:27
[email protected]:2054:13
1583865836341 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2278:10
[email protected]:4320:27
[email protected]:2054:13
1583865836354 addons.xpi WARN Addon with ID [email protected] already installed, older version will be disabled
1583865836355 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2348:10
[email protected]:2275:12
[email protected]:4320:27
[email protected]:2054:13
1583865836355 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2278:10
[email protected]:4320:27
[email protected]:2054:13
1583865836384 addons.xpi WARN Addon with ID [email protected] already installed, older version will be disabled
1583865836385 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2348:10
[email protected]:2275:12
[email protected]:4320:27
[email protected]:2054:13
1583865836385 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2278:10
[email protected]:4320:27
[email protected]:2054:13
1583865836397 addons.xpi WARN Addon with ID [email protected] already installed, older version will be disabled
1583865836398 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2348:10
[email protected]:2275:12
[email protected]:4320:27
[email protected]:2054:13
1583865836398 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1545:17) JS Stack trace: [email protected]:1545:17
[email protected]:2278:10
[email protected]:4320:27
[email protected]:2054:13
1583865838394 Marionette TRACE Received observer notification xpcom-will-shutdown
1583865838394 Marionette DEBUG Resetting recommended pref apz.content_response_timeout
1583865838394 Marionette DEBUG Resetting recommended pref browser.contentblocking.introCount
1583865838394 Marionette DEBUG Resetting recommended pref browser.download.panel.shown
1583865838394 Marionette DEBUG Resetting recommended pref browser.newtabpage.enabled
1583865838394 Marionette DEBUG Resetting recommended pref browser.pagethumbnails.capturing_disabled
1583865838394 Marionette DEBUG Resetting recommended pref browser.search.update
1583865838394 Marionette DEBUG Resetting recommended pref browser.tabs.disableBackgroundZombification
1583865838395 Marionette DEBUG Resetting recommended pref browser.tabs.remote.separatePrivilegedContentProcess
1583865838395 Marionette DEBUG Resetting recommended pref browser.tabs.unloadOnLowMemory
1583865838395 Marionette DEBUG Resetting recommended pref browser.tabs.warnOnCloseOtherTabs
1583865838395 Marionette DEBUG Resetting recommended pref browser.tabs.warnOnOpen
1583865838395 Marionette DEBUG Resetting recommended pref browser.usedOnWindows10.introURL
1583865838395 Marionette DEBUG Resetting recommended pref browser.urlbar.suggest.searches
1583865838395 Marionette DEBUG Resetting recommended pref datareporting.policy.dataSubmissionPolicyAccepted
1583865838395 Marionette DEBUG Resetting recommended pref dom.disable_beforeunload
1583865838396 Marionette DEBUG Resetting recommended pref dom.disable_open_during_load
1583865838396 Marionette DEBUG Resetting recommended pref dom.file.createInChild
1583865838396 Marionette DEBUG Resetting recommended pref dom.max_chrome_script_run_time
1583865838396 Marionette DEBUG Resetting recommended pref dom.max_script_run_time
1583865838396 Marionette DEBUG Resetting recommended pref dom.push.connection.enabled
1583865838396 Marionette DEBUG Resetting recommended pref extensions.getAddons.cache.enabled
1583865838396 Marionette DEBUG Resetting recommended pref extensions.webservice.discoverURL
1583865838396 Marionette DEBUG Resetting recommended pref network.http.prompt-temp-redirect
1583865838396 Marionette DEBUG Resetting recommended pref network.http.speculative-parallel-limit
1583865838396 Marionette DEBUG Resetting recommended pref privacy.trackingprotection.enabled
1583865838396 Marionette DEBUG Resetting recommended pref security.fileuri.strict_origin_policy
1583865838396 Marionette DEBUG Resetting recommended pref security.notification_enable_delay
1583865838396 Marionette DEBUG Resetting recommended pref signon.autofillForms
1583865838397 Marionette DEBUG Resetting recommended pref signon.rememberSignons
1583865838397 Marionette DEBUG Resetting recommended pref toolkit.cosmeticAnimations.enabled
1583865838397 Marionette DEBUG Marionette stopped listening
1583865838557 geckodriver::marionette DEBUG Browser process stopped: exit code: 0
1583865838568 webdriver::server DEBUG <- 200 OK {"value":[]}
Excellent, thanks.
@domoritz Does this also happen with driver.execute_script
?
No, it does not
import json
code = """
class Wrapper {
constructor(generator) {
Object.defineProperty(this, 'foo', {
enumerable: true,
get: generator
});
}
}
const f = new Wrapper(() => "Hello World")
return f;
"""
for driver_name in ["chrome", "firefox"]:
if driver_name == "firefox":
from selenium.webdriver import Firefox as Driver
from selenium.webdriver.firefox.options import Options
else:
from selenium.webdriver import Chrome as Driver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("--headless")
if driver_name == "firefox":
options.log.level = "trace"
driver = Driver(options=options)
try:
driver.get('about:blank')
output = driver.execute_script(code, {})
finally:
driver.close()
print("-------------------------------")
print(f"Full output for {driver_name}")
print(json.dumps(output, indent=2))
Output
-------------------------------
Full output for chrome
{
"foo": "Hello World"
}
-------------------------------
Full output for firefox
{
"foo": "Hello World"
}
+1 seeing the same issue using WebDriverJS. executeAsyncScript doesn't return object properties that have been defined with a getter. If the property is defined with a simple "value," then it's fine. Also, executeScript works fine in all cases.
Sorry for the delay on our side but this issue slipped through. I've filed https://bugzilla.mozilla.org/show_bug.cgi?id=1830839 to track the underlying work in Marionette.