-
-
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
[4.0.0-alpha5] Selenium creates never ending Thread #8159
Comments
Yes, there are long-running threads, but they should not prevent stopping the VM. Can you please get a complete thread dump and attach it here for investigation? |
thread dump |
Hi, I have a use case for Selenium where I can't just use System.exit to close the JVM (like in JUnit), making this a significant issue for me. I've noticed this problem in all the 4.0.0-alpha's I've tried, including my last test using :
In my test I instantiated the driver using the ChromeDriverService, but output was identical to that described above. |
I am experiencing this never ending thread with Chromium edge and Selenium 4 alpha-4 and higher. Is there any way to gracefully close out a test besides killing the java processes? |
@Mdillon123 I believe Add shutdown hook to close AsyncHttpClient. #8763 has fixed the issue, at least in Chrome when I tested using alpha-7. It also allowed me to run the same Selenium script concurrently on 4 threads. Above that failures occurred with an interrupted sleep exception inside FluentWait, but that won't have anything to do with this problem. |
Closed by mistake, reopening. |
Can you please retest in Selenium 4.0-beta-1 (released today) if the issue is still actual. |
Seems |
🐛 Bug Report
After simply starting and quiting the webdriver, the browser started and quitted normally. But just the program never ends after running all the steps. I found that there is dead thread (AsyncHttpClient) left running.
Detail steps
My simple program:
Callstack before
![image](https://user-images.githubusercontent.com/25053707/78382173-fa565800-7608-11ea-9a83-37ca6d5acbc6.png)
WebDriver driver = new xxxxDriver();
:Callstack after
![image](https://user-images.githubusercontent.com/25053707/78382373-57eaa480-7609-11ea-8ccc-49e86a2158ab.png)
WebDriver driver = new xxxxDriver();
:Callstack after
![image](https://user-images.githubusercontent.com/25053707/78382958-30480c00-760a-11ea-9aa2-8de5a9b29014.png)
driver.quit();
:After program ends:
![image](https://user-images.githubusercontent.com/25053707/78383684-5b7f2b00-760b-11ea-8006-b0e7d8727535.png)
Console output: (e.g. Firefox driver)
I have tried for ChromeDriver, FirefoxDriver and EdgeDriver, in VS Code and Eclipse. Still the same problem.
This problem does not exist when running the same code with v3.14159.
Compare to the callstack from v3.14159 (after starting the driver):
![image](https://user-images.githubusercontent.com/25053707/78385988-56bc7600-760f-11ea-8b3e-4b1483fa957e.png)
Expected behavior
The program should ends.
Environment
OS: Windows 10
Browser:
Browser Driver version: All in respective versions
Language Bindings version: 4.0.0-alpha-5
IDE: Tried in VS Code and Eclipse
The text was updated successfully, but these errors were encountered: