-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[🐛 Bug]: Selenium fails to find chrome binary after 4.20.1 #13918
Comments
@shouichi, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
@titusfortner do you know if this is correct? |
I am running into the same thing. Unless I pin to 4.19.0 I get |
Ideally, Rails would not attempt to preload drivers/browsers via a direct API call of Selenium. Reading through the code, this is done to avoid race conditions when running tests in parallel. I think that Selenium should handle this internally so that concurrent attempts to preload the driver/browser would ensure there are no race conditions and wait for the first process to finish downloading, then yield to other binary calls. With this implementation in place, the related part of Rails code can be removed: It's a fairly simple change that I can do both in Selenium and Rails, but I am not sure if that suits the Rails users. @searls Do you happen to know if it would be fine for Rails to pin Selenium to say |
I'm not on Rails core so it's not for me to say, but I would wager that simply releasing a fix in Selenium to allow anyone who runs into this to receive the fix via |
It's a hacky way to solve #13918. The follow-up is to ensure Rails don't preload the drivers/browsers (assuming Selenium-Manager doesn't have race conditions) and make DriverFinder a private API.
@p0deje 4.21.1 solved the problem. Thank you! |
Great! |
Confirm: fixed me too |
We're using |
@amcmillion3 This is correct, the deprecation will go away in the newer version of Rails. |
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs. |
What happened?
Selenium fails to find chrome binary after 4.20.1. Reverting to 4.19.0 solves the problem.
The key difference here seems to be the presence of
:browser_path
. 4.19.0 always callsSeleniumManager
and:browser_path
is present. 4.20.1 does not always callSeleniumManager
and:browser_path
can be absent 1. FYI: Rails setsSelenimu::WebDriver::Service.driver_path
2.I tried modifying
driver_finder.rb
line 53 3 toif path && false
to force invokeSeleniumManager
, it worked correctly in 4.20.1.See also #13386.
Thank you.
How can we reproduce the issue?
- No system-level installation of chrome or chromium. - Create a fresh new rails app (the rails version is 7.1) - Run a system test
Relevant log output
Operating System
ubuntu
Selenium version
ruby 4.20.1
What are the browser(s) and version(s) where you see this issue?
chrome 124.0.6367.155
What are the browser driver(s) and version(s) where you see this issue?
chromedriver 124.0.6367.155
Are you using Selenium Grid?
No response
Footnotes
https://github.com/SeleniumHQ/selenium/blob/0345a23bebf54aead25bb0f11c9c5c9d63112adc/rb/lib/selenium/webdriver/common/driver_finder.rb#L48-L64 ↩
https://github.com/rails/rails/blob/dcfabdbe4e7e53fc757d0ebf89c77349899a35bb/actionpack/lib/action_dispatch/system_testing/browser.rb#L77 ↩
https://github.com/SeleniumHQ/selenium/blob/0345a23bebf54aead25bb0f11c9c5c9d63112adc/rb/lib/selenium/webdriver/common/driver_finder.rb#L53 ↩
The text was updated successfully, but these errors were encountered: