-
Notifications
You must be signed in to change notification settings - Fork 34
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
can not use browser.close() method properly #41
Comments
Please add your code. If you get an error, the program stops but chrome does not. It may be caused by this. |
The whole logic is in try catch and finally block, and in finally block I have await browser.close(). |
Just run these two scripts together. Only run the second one, first one needs to be in the same path. ////FIRST SCRIPT import { connect } from 'puppeteer-real-browser' const main = async () => { main(); //SECOND SCRIPT import { fork } from 'child_process'; const maxForks = 5; // Maximum number of forks allowed const startFork = () => {
} // Start initial forks |
Hi, Puppeteer stops working when an error is received (even when closing the browser) but chromium does not. This causes the browser to hang as you mentioned. I am working on this bug and will fix it. |
@zfcsoftware is there any way I could help you with this to speed it up? This is the only thing that blocks me in using/testing this in my case. Thanks |
Hello, puppeteer-real-browser/src/index.js Line 166 in 2627cea
You can use the chrome.close() method. |
@zfcsoftware there is only chrome.kill() option. So you are telling me to get chrome instance back from connect method response and work with it as a temp solution? |
The chrome variable is already returned, yes you can use it that way. Normally this problem does not occur under normal conditions, but it may occur when an error is received, I need to examine it in detail. |
I am running multiple processes in parallel. Browser.close() does not have any effect which leads to multiple chrome processes hanging.
The text was updated successfully, but these errors were encountered: