Getting Pupeteer to work in Replit?

I’m trying to extract metadata from a Spotify podcast episode page (https://app.podfolio.me) and it’s not working. Here’s how Replit Agent described the problem:

Getting Puppeteer to work in the Replit environment is more complicated than expected for several reasons:

  1. Environment Constraints: Replit has limited resources and doesn’t include Chrome/Chromium by default. Puppeteer needs Chromium to run properly, which isn’t readily available in the Replit container environment.
  2. Sandbox Limitations: Replit’s security model restricts launching browser instances. Even with the correct flags like --no-sandbox, Chromium often can’t initialize properly because of the container restrictions.
  3. Memory Requirements: Headless browsers are resource-intensive. They require significant RAM (300-500MB minimum), which can exceed the limits of standard Replit environments.
  4. Dependency Issues: Installing Puppeteer automatically downloads Chromium (~170MB), but this download often fails in restricted environments like Replit, or the browser can’t be executed properly afterward.

Does this seem accurate?

Replit has all of those and you can use nix binaries for installing the chromium packages, that’s a hallucination by Agent

2 Likes

Thanks! I’ll try again!

1 Like

I went down a path of installing puppeteer and had to revert - after 10-12 checkpoints it still wasn’t working. It seems I can’t go back and review the chat after rolling back to determine what might have caused the loop, but I ended up outsourcing the work to an external API (PDF generation).

I used CloudConvert API when I couldn’t get puppeteer installed.