Skip to content
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

Bumped Puppeteer to the latest version and switched to the new headless mode #918

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
10 changes: 7 additions & 3 deletions packages/ckeditor5-dev-web-crawler/lib/runcrawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,14 @@ async function createBrowser( options ) {

const browser = await puppeteer.launch( browserOptions );

const [ defaultBlankPage ] = await browser.pages();
// For unknown reasons, in order to be able to visit pages in Puppeteer on CI, we must close the default page that is opened when the
// browser starts.
if ( process.env.CI ) {
const [ defaultBlankPage ] = await browser.pages();

if ( defaultBlankPage ) {
await defaultBlankPage.close();
if ( defaultBlankPage ) {
await defaultBlankPage.close();
}
}

return browser;
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-dev-web-crawler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"chalk": "^4.1.0",
"ora": "^5.2.0",
"puppeteer": "^19.7.5",
"puppeteer": "^21.3.6",
"strip-ansi": "^6.0.0"
},
"engines": {
Expand Down