You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No specific details to reproduce. Here is my configuration though that might be able to help replicate the problem.
# Driver setup
Capybara.register_driver :selenium_chrome_headless do|app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
acceptInsecureCerts: true,
'goog:chromeOptions': {
args: %W[
headless
proxy-server=#{ENV['CI'] ?'localhost': ENV.fetch('NGINX_IP')}:#{Billy.proxy.port}
window-size=1440,900
],
prefs: {
download: {
default_directory: DownloadSpecHelpers::CHROME_PATH
}
},
w3c: false
},
'goog:loggingPrefs': {
browser: 'ALL'
}
)
options = {
browser: ENV['CI'] ? :chrome : :remote,
capabilities: capabilities,
url: 'http://localhost:4445/wd/hub'
}
Capybara::Selenium::Driver.new(app, options).tap do|d|
unless ENV['CI']
d.browser.file_detector = lambda do|args|
str = args.first.to_s
str if File.exist?(str)
end
end
end
end
Relevant log output
Deeper Stacktrace triggered in rspec run:
1.1) Failure/Error: Capybara.reset! unless example.exception (rails_helper.rb:89)
Selenium::WebDriver::Error::ScriptTimeoutError:
Unable to execute request for an existing session: POST /session/71459489cd31d6928048675764dc467b/goog/cdp/execute
Build info: version: '4.1.0', revision: '87802e897b'
System info: host: 'c202f6697df7', ip: '172.18.0.11', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.47-linuxkit', java.version: '11.0.11'
Driver info: driver.version: unknown
# java.lang.RuntimeException: Unable to execute request for an existing session: POST /session/71459489cd31d6928048675764dc467b/goog/cdp/execute# Build info: version: '4.1.0', revision: '87802e897b'# System info: host: 'c202f6697df7', ip: '172.18.0.11', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.47-linuxkit', java.version: '11.0.11'# Driver info: driver.version: unknown# at org.openqa.selenium.grid.router.HandleSession.execute(HandleSession.java:139)# at org.openqa.selenium.remote.http.Route$PredicatedRoute.handle(Route.java:373)# at org.openqa.selenium.remote.http.Route.execute(Route.java:68)# at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)# at org.openqa.selenium.remote.http.Route.execute(Route.java:68)# at org.openqa.selenium.grid.router.Router.execute(Router.java:91)# at org.openqa.selenium.grid.web.EnsureSpecCompliantResponseHeaders.lambda$apply$0(EnsureSpecCompliantResponseHeaders.java:34)# at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)# at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)# at org.openqa.selenium.remote.http.Route.execute(Route.java:68)# at org.openqa.selenium.remote.http.Route$NestedRoute.handle(Route.java:270)# at org.openqa.selenium.remote.http.Route.execute(Route.java:68)# at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)# at org.openqa.selenium.remote.http.Route.execute(Route.java:68)# at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)# at org.openqa.selenium.remote.http.Route.execute(Route.java:68)# at org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)# at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)# at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)# at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)# at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)# at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)# at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)# at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)# at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)# at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)# at java.base/java.lang.Thread.run(Thread.java:829)# ./spec/rails_helper.rb:200:in `block (2 levels) in <top (required)>'
Relevant Selenium Logger Output:
2022-03-16 09:49:28 INFO Selenium -> POST session/bb0994cc75b38f0e33f96c2620f47680/url
2022-03-16 09:49:28 INFO Selenium >>> http://localhost:4445/wd/hub/session/bb0994cc75b38f0e33f96c2620f47680/url | {"url":"about:blank"}
2022-03-16 09:49:28 INFO Selenium <- {
"value": null
}
2022-03-16 09:49:28 INFO Selenium -> POST session/bb0994cc75b38f0e33f96c2620f47680/elements
2022-03-16 09:49:28 INFO Selenium >>> http://localhost:4445/wd/hub/session/bb0994cc75b38f0e33f96c2620f47680/elements | {"using":"xpath","value":"/html/body/*"}
2022-03-16 09:49:28 INFO Selenium <- {
"value": [
]
}
2022-03-16 09:49:28 INFO Selenium -> POST session/bb0994cc75b38f0e33f96c2620f47680/goog/cdp/execute
2022-03-16 09:49:28 INFO Selenium >>> http://localhost:4445/wd/hub/session/bb0994cc75b38f0e33f96c2620f47680/goog/cdp/execute | {"cmd":"Storage.clearDataForOrigin","params":{"origin":"*","storageTypes":"cookies,local_storage"}}
2022-03-16 09:49:28 INFO Selenium <- {
"value": {
"error": "script timeout",
"message": "Unable to execute request for an existing session: POST \u002fsession\u002fbb0994cc75b38f0e33f96c2620f47680\u002fgoog\u002fcdp\u002fexecute\nBuild info: version: '4.1.0', revision: '87802e897b'\nSystem info: host: '4b975b71dd55', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.47-linuxkit', java.version: '11.0.11'\nDriver info: driver.version: unknown",
"stacktrace": "java.lang.RuntimeException: Unable to execute request for an existing session: POST \u002fsession\u002fbb0994cc75b38f0e33f96c2620f47680\u002fgoog\u002fcdp\u002fexecute\nBuild info: version: '4.1.0', revision: '87802e897b'\nSystem info: host: '4b975b71dd55', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.47-linuxkit', java.version: '11.0.11'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.grid.router.HandleSession.execute(HandleSession.java:139)\n\tat org.openqa.selenium.remote.http.Route$PredicatedRoute.handle(Route.java:373)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.grid.router.Router.execute(Router.java:91)\n\tat org.openqa.selenium.grid.web.EnsureSpecCompliantResponseHeaders.lambda$apply$0(EnsureSpecCompliantResponseHeaders.java:34)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.remote.http.Route$NestedRoute.handle(Route.java:270)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)\n\tat org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)\n\tat java.base\u002fjava.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base\u002fjava.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base\u002fjava.lang.Thread.run(Thread.java:829)\n"
}
}
Related Selenium Issue:
Originally opened the initial issue with selenium and they redirected me here.
Meta
Capybara Version: 3.36.0
Driver Information: selenium-webdriver 4.1.0 with Google Chrome 96.0.4664.93
OS: macOS Big Sur
Expected Behavior
Capybara.current_session.driver.reset!
does not throw an exception when trying to clear cookies and local storage.Actual Behavior
Steps to reproduce
Relevant log output
Relevant Selenium Logger Output:
Related Selenium Issue:
The text was updated successfully, but these errors were encountered: