Apify Discord Mirror

Updated 5 months ago

Running out of space with pupeteers user profiles on a long running scrape.

At a glance

The post describes an issue with launching a browser, specifically the error "ENOSPC: no space left on device". Community members suggest checking the provided executable path, installing a browser if missing, and using the npx @puppeteer/browsers install chromium --path [path] command to download the Chromium executable.

In the comments, a community member asks for more context, such as the available space for user profiles, the amount of space used by the scraped websites, and any optimizations tried. Another community member provides a solution by using the exec() function to remove the /tmp/puppeteer* directory.

There is no explicitly marked answer in the provided information.

Useful resources
Plain Text
"Failed to launch browser. Please check the following:\n- Check whether the provided executable path \"/usr/bin/google-chrome\" is correct.\n- Try installing a browser, if it's missing, by running `npx @puppeteer/browsers install chromium --path [path]` and pointing `executablePath` to the downloaded executable (https://pptr.dev/browsers-api)\n\nThe original error is available in the `cause` property. Below is the error received when trying to launch a browser:\n​","stack":"Failed to launch browser. Please check the following:\n- Check whether the provided executable path \"/usr/bin/google-chrome\" is correct.\n- Try installing a browser, if it's missing, by running `npx @puppeteer/browsers install chromium --path [path]` and pointing `executablePath` to the downloaded executable (https://pptr.dev/browsers-api)\n\nThe original error is available in the `cause` property. Below is the error received when trying to launch a browser:\n​\nError: ENOSPC: no space left on device, mkdtemp '/tmp/puppeteer_dev_profile-pXEfmi'\nError thrown at:\n\n    at PuppeteerPlugin._throwAugmentedLaunchError (/home/app/node_modules/@crawlee/browser-pool/abstract-classes/browser-plugin.js:145:15)\n    at PuppeteerPlugin._launch (/home/app/node_modules/@crawlee/browser-
A
b
P
5 comments
just advanced to level 4! Thanks for your contributions! πŸŽ‰
ENOSPC: no space left on device
Hi ,
Can you provide little bit more context? How much space is there available for the user-profiles? How mauch are the scraped websites using? What kind of user-profiles related files, takes the most space for you? How you tried any optimizations - like blocking some heavy not important requests? etc.
I fixed this btw using code below
Plain Text
        exec('rm -rf /tmp/puppeteer*', (error: Error | null, stdout: string, stderr: string) => {
          if (error) {
            console.error(`exec error: ${error}`);
            return;
          }
          console.log(`stdout: ${stdout}`);
          console.error(`stderr: ${stderr}`);
        });
Add a reply
Sign up and join the conversation on Discord