Snehal
Snehal

Reputation: 1

Error Running Puppeteer in Docker Container on Google Cloud Platform (GCP) with hapi.js Microservice: PDF Generation and Download Failure

I've successfully generated and downloaded a PDF file using Puppeteer in my local environment. However, when attempting the same process within a Docker container on Google Cloud Platform (GCP) using a hapi.js microservice, I encounter issues. We've defined multiple steps in our Dockerfile to run the microservice, with the final step being 'npm start'. I'm utilizing Puppeteer version ^21.1.1, hapi.js version ^20.0.3, and Node.js version 16.17.0. Can you assist me in resolving these issues? Below is the error stack I am getting DEFAULT 2024-04-15T10:22:50.209346Z Error: Could not find Chrome (ver. 117.0.5938.92). This can occur if either DEFAULT 2024-04-15T10:22:50.209353Z 1. you did not perform an installation before running the script (e.g. npm install) or DEFAULT 2024-04-15T10:22:50.209357Z 2. your cache path is incorrectly configured (which is: /home/.cache/puppeteer).

I tried to download & install chrome in docker file in one of step. I wanted to download pdf file in chrome browser.

Upvotes: 0

Views: 238

Answers (0)

Related Questions