Puppeteer cluster launches blank chrome tabs

102 Views Asked by At

I am facing an issue with Puppeteer-cluster launching additional chrome black blank pages, even though the puppeteer itself is headless: true. I wonder if I can prevent this behaviour? Or maybe the blank pages won't be shown when the app will be deployed?

enter image description here

Here is my cluster initialisation:

    const initCluster = async () => {
        process.setMaxListeners(Infinity);
        return await Cluster.launch({
            concurrency: Cluster.CONCURRENCY_CONTEXT,
            maxConcurrency: 4,
            timeout: 10000,
            puppeteerOptions: {
                headless: true,
                args: [
                    '--no-sandbox',
                    '--disable-notifications',
                    '--disable-extensions',
                    '--disable-gpu',
                    '--disable-setuid-sandbox'
                ]
            }
        });
    };

I tried using various puppeteer options and cluster options, so I hoped one of them will stop the blank pages from showing, but nothing helped, and there is no info on the internet.

0

There are 0 best solutions below