Skip to content
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

Handle when underlying chromedriver process is closed #20

Open
matthewmcgarvey opened this issue Jan 13, 2022 · 1 comment
Open

Handle when underlying chromedriver process is closed #20

matthewmcgarvey opened this issue Jan 13, 2022 · 1 comment

Comments

@matthewmcgarvey
Copy link
Collaborator

I was running a spec suite that used a mix of headless and non-headless specs. I think they use the same process so when the suite finished and it went through the drivers to close them, the first successfully closed the process but the next one raised an error.

Unhandled exception: Error connecting to 'localhost:9515': Connection refused (Socket::ConnectError)
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/socket/addrinfo.cr:73:15 in 'initialize'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/socket/tcp_socket.cr:27:3 in 'new'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/http/client.cr:779:5 in 'io'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/http/client.cr:664:5 in 'send_request'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/http/client.cr:599:5 in 'exec_internal_single'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/http/client.cr:586:5 in 'exec_internal'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/http/client.cr:581:7 in 'exec'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/http/client.cr:706:5 in 'exec'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/http/client.cr:738:7 in 'exec'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/http/client.cr:406:3 in 'delete'
  from lib/selenium/src/selenium/http_client.cr:19:5 in 'delete'
  from lib/selenium/src/selenium/command_handler.cr:20:7 in 'execute'
  from lib/selenium/src/selenium/command_handler.cr:12:5 in 'execute'
  from lib/selenium/src/selenium/session.cr:30:5 in 'delete'
  from src/lucky_flow/driver.cr:17:20 in 'shutdown'
  from src/lucky_flow/registry.cr:18:38 in 'shutdown_all'
  from src/lucky_flow.cr:202:5 in 'shutdown'
  from spec/spec_helper.cr:29:3 in '->'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/int.cr:541:7 in 'run_after_all_hooks'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/spec/context.cr:19:7 in 'internal_run'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/spec/context.cr:147:7 in 'run'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/spec/dsl.cr:274:7 in '->'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/primitives.cr:255:3 in 'run'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/crystal/main.cr:45:14 in 'main'
  from /Users/matthew/.asdf/installs/crystal/0.36.1/src/crystal/main.cr:119:3 in 'main'
@matthewmcgarvey
Copy link
Collaborator Author

The error is pointing towards the more important issue of #21 but it still should not fail like this. If the process is dead, there's nothing to stop. Job done 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant