Closed marekma-gloat closed 3 weeks ago
@marekma-gloat, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
Never mind, I guess it's because I'm using pytest-xdist, which seems to be running tests in multiple processes, not threads. I solved it by using FileLock for browser and driver download/creation, maybe it would be nice if it would be built in Selenium for python...
What happened?
On the machine where I'm executing the code the correct version of the browser and driver is not preinstalled. I want to automatically download the browser and driver which matches the set version in Options(). It works perfectly if I run the code only in one thread. But if I run it in 4 threads each thread is starting to download the browser. I believe it should be downloaded only by one thread and then reused by other 3 threads. Because of this I'm getting this exception:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited abnormally.
on 3 of the threads and only 1 is successful. All tests executed after these first four are successful and I can see in the log that they're reusing the cached downloaded version. I guess it could be fixed by adding thread synchronizationHow can we reproduce the issue?
Relevant log output
Operating System
Debian
Selenium version
Python 4.21.0
What are the browser(s) and version(s) where you see this issue?
Chrome 125
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 125.0.6422.141
Are you using Selenium Grid?
-