Open Siddharthosatwal opened 4 years ago
@Siddharthosatwal Can you please share your sample code here. So that I will help you. Thanks
@Siddharthosatwal Are you facing the same error in local?
@Siddharthosatwal Are you facing the same error in local?
@mrafiqk No facing the same error on local.
@Siddharthosatwal Are you facing the same error in local?
@mrafiqk No facing the same error on local.
@Siddharthosatwal Do you mean Not facing
?
@Siddharthosatwal Are you facing the same error in local?
@mrafiqk No facing the same error on local.
@Siddharthosatwal Do you mean
Not facing
?
Yes sorry for the typo. Not facing issues in local.
@Siddharthosatwal We have using the same package in our project and deployed in Heroku server. We had faced the same issue. We just added the puppeteer buildpack in Heroku server, it got worked.
FYI:
@Siddharthosatwal We have using the same package in our project and deployed in Heroku server. We had faced the same issue. We just added the puppeteer buildpack in Heroku server, it got worked.
FYI:
We tried installing puppeteer on our cloud run instance but the issue was not resolved.
@Siddharthosatwal I was facing the same issue a month before. I was using heroku server. I found that there is some problem with opening browser in heroku server. For that i added puppeteer build pack as below. This solved my problem. And it is working in server
We tried installing puppeteer on our cloud run instance but the issue was not resolved.
you need to install all the missing dependencies to the machine yourself. In our case, aws ec2 with ubuntu it was the following (maybe you don't need all of them):
That's probably because your server/container is missing dependencies. See here to see which dependencies you need for your server: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix
For example, run this for ubuntu:
sudo apt-get install ca-certificates \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgbm1 \
libgcc1 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstdc++6 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
lsb-release \
wget \
xdg-utils
https://stackoverflow.com/a/62383642/10098625 Follow this stackoverflow. This will save your days.
The thing is install headless chrome on your server / container.
This works for me:
AWS- EC2 Amazon Linux Node JS
Encountered this issue on Google Cloud Run.
Here I have a Node application in which HTML needs to be converted into PDF.