This is a repository to demonstrate a chromedriver's bug that it crashes while executing a command.
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
Reproducible scenario in main.js:
- webdriver visits https://autifyhq.github.io/chromedriver-issue-close-tab/
- open a new tab by clicking the link
- switch window to the new tab
- click the "Close tab" button, which close the tab after 1 second
- send many Screenshot commands so that the tab is closed while executing one of them
You can try it on the following instructions:
- clone the repository
- run
npm install
- 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=""
- or you can run it with docker:
- run
node main.js
- 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.