You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using selenium-webdriver 4.25.0 or 4.26.0, Ruby 3.2.2 (or 3.3.5), and teaspon 1.4.0, we run into an issue where Webdriver tries to terminate its child process and throws an exception because the process doesn't exist. (see log output)
This is slightly different than, but seemingly related to #14032, in that ErrNo::ERSCH is thrown, rather than Errno::ECHILD in #14032.
We are able to work around this by creating a small money patch to override the terminate method (as an initializer since this is a Rails app):
# config/initializers/selenium_monkey_patch.rbrequire'selenium-webdriver'# Ensure selenium-webdriver is loadedmoduleSeleniummoduleWebDriverclassChildProcess# Monkey patch the terminate method to rescue from the browser# process already having been terminated for hashtag reasons.# Is similar but not exactly the same as the problem described# in https://github.com/SeleniumHQ/selenium/issues/14032defterminate(pid)Process.kill('SIGTERM',pid)rescueErrno::ECHILD,Errno::ESRCH# Process is already dead, no action neededp"MONKEYPATCH: Process is already dead, no action needed"p"MONKEYPATCH: Don't leave me this way!"endendendend
How can we reproduce the issue?
Run `bundle exec teaspoon` under Ruby 3.2.2 or Ruby 3.3.5, with `selenium-webdriver` 4.25.0 or 4.26.0
Relevant log output
Teaspoon running default suite at http://127.0.0.1:43075/teaspoon/default
.........................
Finished in 0.03000 seconds
25 examples, 0 failures
bundler: failed to load command: teaspoon (/home/runner/work/elements/elements/vendor/bundle/ruby/3.2.0/bin/teaspoon)
/home/runner/work/elements/elements/vendor/bundle/ruby/3.2.0/gems/selenium-webdriver-4.25.0/lib/selenium/webdriver/common/child_process.rb:114:in `kill': No such process (Errno::ESRCH) from /home/runner/work/elements/elements/vendor/bundle/ruby/3.2.0/gems/selenium-webdriver-4.25.0/lib/selenium/webdriver/common/child_process.rb:114:in `terminate' from /home/runner/work/elements/elements/vendor/bundle/ruby/3.2.0/gems/selenium-webdriver-4.25.0/lib/selenium/webdriver/common/child_process.rb:68:in `stop' from /home/runner/work/elements/elements/vendor/bundle/ruby/3.2.0/gems/selenium-webdriver-4.25.0/lib/selenium/webdriver/common/service_manager.rb:110:in `stop_process'
from /home/runner/work/elements/elements/vendor/bundle/ruby/3.2.0/gems/selenium-webdriver-4.25.0/lib/selenium/webdriver/common/service_manager.rb:71:in `stop' from /home/runner/work/elements/elements/vendor/bundle/ruby/3.2.0/gems/selenium-webdriver-4.25.0/lib/selenium/webdriver/common/service_manager.rb:53:in `block in start' from /home/runner/work/elements/elements/vendor/bundle/ruby/3.2.0/gems/selenium-webdriver-4.25.0/lib/selenium/webdriver/common/platform.rb:152:in `block in exit_hook'
### Operating System
macOS, Linux
### Selenium version
4.25.0
### What are the browser(s) and version(s) where you see this issue?
Headless chrome, firefox
### What are the browser driver(s) and version(s) where you see this issue?
latest as invoked by selenium-manager
### Are you using Selenium Grid?
n/a
The text was updated successfully, but these errors were encountered:
@johlym, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
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.
What happened?
Using
selenium-webdriver
4.25.0 or 4.26.0, Ruby 3.2.2 (or 3.3.5), andteaspon
1.4.0, we run into an issue where Webdriver tries to terminate its child process and throws an exception because the process doesn't exist. (see log output)This is slightly different than, but seemingly related to #14032, in that
ErrNo::ERSCH
is thrown, rather thanErrno::ECHILD
in #14032.We are able to work around this by creating a small money patch to override the
terminate
method (as an initializer since this is a Rails app):How can we reproduce the issue?
Relevant log output
The text was updated successfully, but these errors were encountered: