puppeteer: [Bug]: Browser.close() doesn't close Chromium if there are open pages
Bug description
Steps to reproduce the problem (Windows only):
- Launch browser in headless mode with options
--in-process-gpuand--use-gl=swiftshader. - Open a new page and go to some URL.
- browser.close() - hangs and doesn’t exit.
It works as expected when headless is false or above options are used alone (not together) or using Linux.
Workaround: close all pages before call to browser.close().
Puppeteer version
13.1.1
Node.js version
17
npm version
8.3.1
What operating system are you seeing the problem on?
Windows
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 18
Commits related to this issue
- implement workaround for hung browser close https://github.com/puppeteer/puppeteer/issues/7922 — committed to mifi/reactive-video by mifi 2 years ago
Hi , may try to close all the pages first before browser.close()
I could not get Puppeteer Browser to close even after trying to close its pages first. The only thing I got to work was to kill the child process:
We’re marking this issue as unconfirmed because it has not had recent activity and we weren’t able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.
Same. No issues after removing the argument. Really strange behavior for puppeteer and most importantly for its team who wouldn’t respond for months to an incredibly confusing bug.
Same issue here.
await browser.close()got stuck if it’s in headless mode, and with--single-processoption.I had the same issue, my endpoint return timeout after 30 sec but continue working on the background. I put a console.log before and after browse.close() and have more than 1 minute of difference between them.
I tried to do page.close() but not changes. Finally, killing the child process work for me.
Why its not fixed yet?
Any updates on this ?