Skip to content

autifyhq/chromedriver-issue-close-tab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chromedriver-issue-close-tab

This is a repository to demonstrate a chromedriver's bug that it crashes while executing a command.

Issue Description

When the tab the webdriver focuses on is closed in the middle of executing a command, chromedriver unexpectedly terminates.

In the example this repository shows we send a Screenshot command, but you can reproduce it with other commands.

Environment

  • chromedriver 107.0.5304.62
  • reproduced on Mac

How to reproduce it

Reproducible scenario in main.js:

  1. webdriver visits https://autifyhq.github.io/chromedriver-issue-close-tab/
  2. open a new tab by clicking the link
  3. switch window to the new tab
  4. click the "Close tab" button, which close the tab after 1 second
  5. send many Screenshot commands so that the tab is closed while executing one of them

You can try it on the following instructions:

  1. clone the repository
  2. run npm install
  3. run npx chromedriver to launch chromedriver
    • or you can run it with docker: docker run --rm -it -p 9515:9515 selenium/standalone-chrome:4.6.0-20221104 chromedriver --allowed-ips=""
  4. run node main.js
  5. you will see the script fails because chromedriver terminates during the script
Screen.Recording.2022-11-29.at.17.45.12.mov

If you run chromedriver with docker, you will see the error message Segmentation fault on terminating chromedriver.