We were having the same issue after upgrade our puppeteer and MacOS. One solution we have is to instruct puppeteer to use our own Chrome instead of the bundled chromium by specifying the executablePath
. Below is a Typescript snippet how we specify it. Same thing if you use vanilla JS
.
Sometimes that still is not enough, we have to make headless
option false to make it consistently work, which is really annoying.
/**
* create a puppeteer 'Browser' object.
*/
public static createBrowser(): Promise<Browser> {
return puppeteer.launch({
// ... other options
headless: false,
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
});
}
Hope it also works for you. 🙂