-
-
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 uses a browser downloaded by Selenium Manager instead of the system one #12828
Comments
@lugi0, 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! |
Selenium does not download a browser if it doesn't need to. Set the browser version in your options class. If it doesn't match what is present, selenium will download it. You can use 'stable' if you want it to keep up dynamically. |
Just reread the issue. That log output should not be what you see with 4.13. It should not complain if the major versions match |
that's exactly the problem @titusfortner , I have chromedriver and chromium set up in my container at matching versions, but then Selenium ends up using my chromedriver (116) and its own managed google chrome (117), thus the mismatch and warning. Is there any way to disable selenium manager? I don't want it to mess with my container! |
Furthermore, I am using Selenium through Robot Framework and its SeleniumLibrary - I am using the |
I've also tried to set up the environment variables mentioned here: https://www.selenium.dev/documentation/selenium_manager/#configuration
But Selenium still tries to use Chrome 117 (even after deleting it from |
Small update: The environment variables did indeed work, I just forgot to export them before running the code :D |
It is finding Chrome v117 on your system somewhere, even if it isn't showing up in that list. You can turn on logging to see where it finds it and you can remove it if you don't want it to use that. If you want v116, specify "116" as |
It's downloading it by itself in |
where is your chromium installed? I think Selenium Manager is supposed to locate both Chromium and Chrome, but if it can't find it, then it will download it. |
Oh, I thought we supported Chromium already, we do not: #12511 To use the installed version of Chromium instead of Chrome for Testing, you will need to pass in the location of the driver in the service class as specified above. |
To give some more food for though, I managed to solve it in my environment, but when running inside an OpenShift container I'm getting a weird error and I wasn't able to trace it back in the selenium-manager code, but you might want to take a look. I managed to fix this one as well by not using the |
The DevToolsActivePort bug is something known and being worked on by Google, I'm not sure the status. |
However it does look like selenium-manager is triggering a Warning with
|
@bonigarcia what is that warning saying? Looks like it continues just fine after. |
It is hard to say. This error concerns some operation in the file system, but unfortunately, Rust does not point to the line in which it happens. If this is problematic, we can try to trace the execution of Selenium Manager in that machine using the binary directly. |
Does selenium-manager try to |
Also, would a |
"DevToolsActivePort not found" bug fix: https://bugs.chromium.org/p/chromedriver/issues/detail?id=4403#c35 |
I created a new version of Selenium Manager to troubleshoot the warning message about @lugi0: To trace it, please download the selenium-manager binary (for Linux) from here: selenium-manager_linux-x64 Please execute the following command in the shell using the uncompressed binary and share the output here. Thanks:
|
@lugi0 Please use this new binary: selenium-manager_linux-x64, as follows:
|
Hello @bonigarcia, I ran the command in the Pod, with the latest binary (and the previous one), but it doesn't seem to give any interesting insight :/
(link to the execution trace and to the output of |
@bonigarcia anything else we can do? the backtrace didn't reveal much. |
@kpouget Thanks for the test.
|
we have a backtrace this time ... but it's not really informative 🙃
|
@kpouget Thanks a lot for the test. I checked it and discovered the debug symbols were not included in the release artifact, so the gathered backtrace is empty. I changed the build configuration to include the debug symbols. Please use the following binary selenium-manager_linux-x64 with the following command (notice now the
|
@bonigarcia , eventually, here is the stack \o/
|
so the permission error comes from there:
@lugi0 saw that this path is |
Thanks for your effort in debugging this, @kpouget and @lugi0. That's definitively the source of the problem. The home is supposed to be writable since Selenium Manager stores the downloaded drivers, browsers, and even the metadata (i.e., the discovered versions made by requesting online repositories). So, in your case, it is just a warning since both the driver and browser are in the PATH. |
in our case, everything is prefetched during the image build, so Selenium Manager has nothing to store in HOME. Proof is that everything works well without the write access. Maybe this warning could be muted with something like
This use case might be common in the case of container execution |
@kpouget I created a new Selenium Manager binary that handles a non-writable cache path. Please use the following binary selenium-manager_linux-x64 with the following command:
|
Closing as did not get further response. Please open a new issue if the problem still exists. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
After upgrading to Selenium 4.13, my code started warning me that the chromedriver and chrome versions were not matching.
I made sure that my container had matching versions for the browser and webdriver I wanted to use
After much head scratching, I found this page: https://www.selenium.dev/documentation/selenium_manager/#automated-browser-management
It looks like newer version of Selenium come with selenium manager by default, and there's no way to stop Selenium from using the browser(s) managed and cached by Selenium Manager
How can we reproduce the issue?
Relevant log output
Operating System
Fedora 38 / CentOS Stream 9
Selenium version
4.13 / 4.11.2
What are the browser(s) and version(s) where you see this issue?
Chromium 116 / Chrome 117
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 116
Are you using Selenium Grid?
No
The text was updated successfully, but these errors were encountered: