puppeteer runtime error:
UnhandledPromiseRejectionWarning: Error: Protocol error (Page.getLayoutMetrics): Target closed.
solve:
in
await browser.close();
Before adding the waiting time
await page.waitFor(1000);
ps: Although the problem has been solved, but still do not quite understand why. Since the other file before closing the browser did not increase the waiting time does not complain.