-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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]: Parallel Test Execution Fails With "Unable to obtain chrome using Selenium Manager" #13686
Comments
@dcdraper, 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! |
@bonigarcia, I think you have already done some research on this. I am trying to remember. @dcdraper are the contents from your comment already having debug level enabled? |
Indeed, there is another related open issue: #13511. Both issues happen in different operating systems (Windows - Linux), and the error codes differ. But it seems both occur due to concurrent access to the drivers in the cache:
The solution discussed for avoiding this kind of problem is to use some lock to allow cross-process, cross-language access to resources. Simon told me about a lock mechanism based on a local port (SocketLock). However, as I said in #13511, I am unsure about that solution. My current idea is to try a lock file to prevent this file system data race, but I haven't looked into that yet. @dcdraper In addition to having the DEBUG traces, as @diemol said, it would also be interesting to get the complete stack trace from Selenium Manager. To get that, can you please use the Selenium Manager debug binary in your tests? This binary can be downloaded from here: selenium-manager-windows-debug.exe Then, there are two options:
|
@diemol Debug logging is not currently implemented Is there a way to just opt out of this selenium manager completely, so we are not forced into such a big fix/refactor for us? How can we make it not run at all? I fear we may hit a dead end and would need to abandon selenium completely, which would have a huge impact on our QA process. I'm hoping to get a sample project together that shows how we use selenium. I'm not sure if that would help you understand our issue or if you would see that as us asking for support, which goes against the guidelines here. |
@bonigarcia the link to the doc for the Selenium Manager binary path is not working for me. |
You can put the required driver(s) (e.g., chromedriver) in the PATH. That will prevent Selenium Manager from downloading new drivers. In addition, there was another way to turn off the use of Selenium Manager entirely in the bindings, but I am unsure how. @titusfortner How was that? It may be worth explaining that way on the Selenium Manager page.
Yes, the link was broken. It is fixed now. |
@bonigarcia As a workaround as of I think 4.15 we run the command "selenium-manager.exe --browser chrome --debug" on the test agent in the pipeline after building the solution and before the tests start running. This allows us to still take advantage of Selenium Manager to automate browser and driver management. I was able to repro the issue using Selenium 4.18.1 in debug logging mode (@diemol) and also replace selenium-manager.exe with the debug version in the pipeline by copying it into the build directory (option 2 from @bonigarcia). Here is the output:
|
I tried reproducing this by running 100 SM processes and I don't see any errors. Is this still a problem?
|
@p0deje Yes, I am still able to repro the issue using Selenium 4.20. |
Is the solution for this the same as #13511 ? |
@dcdraper: I implemented a fix for this issue. It would be very helpful if you could try the new Selenium Manager binary. It can be downloaded from the following page -thanks! https://github.com/SeleniumHQ/selenium/actions/runs/12325569526 |
@bonigarcia shoot! I'm not at that company any longer where we had the issue. If I end up using this again in a future project I'll let you know of any issues. |
and #13686) * [rust] Use file lock to protect concurrent accesses to cache * [rust] Fix several problems related to file manipulation * [rust] Improve logic for handling unstable edge bad links * [rust] Ensure lock file exists and content of target folder after acquiring lock * [rust] Refactor lock logic in a separate module * [rust] Acquire file lock before downloading driver and browser
No problem, @dcdraper; thanks for letting us know. In any case, the fix for this issue is merged now. It will be shipped with Selenium 4.28. |
What happened?
This is a duplicate of the following issue that was closed: #13342
If this is addressed like it says in the other issue, what version is that fixed in?
How can we reproduce the issue?
Relevant log output
Operating System
Windows 10
Selenium version
4.18.1
What are the browser(s) and version(s) where you see this issue?
Chrome managed by selenium manager
What are the browser driver(s) and version(s) where you see this issue?
Chrome managed by selenium manager
Are you using Selenium Grid?
no
The text was updated successfully, but these errors were encountered: