cloud-run-puppeteer

Deploy Puppeteer with headless Chrome to Cloud Run gen2.

70|42|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/tranhieutt/software_development_department --skill cloud-run-puppeteer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-run-puppeteer
Source: https://github.com/tranhieutt/software_development_department/tree/main/.claude/skills/cloud-run-puppeteer
Command: npx skills add https://github.com/tranhieutt/software_development_department --skill cloud-run-puppeteer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Running Puppeteer on Cloud Run fails silently when gen1, missing Chrome libraries, or misconfigured secret mounts block headless Chrome; this guide pinpoints the correct environment, dependencies, and launch settings to fix that.

Core Features & Use Cases

  • Gen2 Execution Environment: Force Cloud Run gen2 to avoid gVisor restrictions that hang Chrome.
  • System Dependency Installation: Install the exact apt packages so Puppeteer can launch without missing libraries.
  • Secret Manager Mounting: Mount service account secrets outside the WORKDIR and expose a stable environment variable instead of relying on CLI path conversions.
  • Puppeteer Launch & Timing: Use headless 'new', extended timeouts, Chrome flags, request interception, and valid waitUntil modes to stream content from distant servers while blocking heavy assets.
  • Deployment Command Template: Apply the recommended gcloud deploy command with gen2, 2Gi RAM, generous timeout, and secret mounts to keep the Chrome process healthy.

Quick Start

Deploy a Node.js Puppeteer service to Cloud Run gen2 with the required Chrome libraries, a separate secret mount path, and tuned launch arguments for reliable headless execution.

Frequently Asked Questions about cloud-run-puppeteer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does Puppeteer fail silently when deploying headless Chrome on Cloud Run?

Puppeteer fails silently on Cloud Run when using gen1 environments, missing Chrome apt libraries, or misconfigured secret mounts. You must deploy to Cloud Run gen2 to avoid gVisor restrictions that hang headless Chrome processes.

How do I deploy a Node.js Puppeteer scraping service to Cloud Run?

Deploy Puppeteer to Cloud Run by forcing gen2 execution, installing exact apt packages for Chrome, mounting Secret Manager outside the workdir, and using tuned launch arguments with 2Gi RAM and generous timeouts.

Does Cloud Run gen1 support headless Chrome automation?

Cloud Run gen1 does not reliably support headless Chrome automation due to gVisor restrictions that silently hang the browser. You need to configure the gen2 execution environment to ensure reliable Puppeteer launches.

How do I mount Secret Manager keys for a Puppeteer Cloud Run deployment?

Mount Secret Manager keys outside the Docker WORKDIR and expose the path as a stable environment variable. This avoids CLI path conversion issues when authenticating the Puppeteer service account.

What launch arguments and timeout settings does Puppeteer need for Cloud Run?

Puppeteer on Cloud Run requires headless 'new' mode, specific Chrome flags, extended timeouts, request interception to block heavy assets, and valid waitUntil modes to stream content reliably from distant servers.