New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where to deploy puppeteer projects ? (question) #726

Closed
jasan-s opened this Issue Sep 9, 2017 · 9 comments

Comments

Projects
None yet
8 participants
@jasan-s
Copy link

jasan-s commented Sep 9, 2017

Heroku, GAE, AWS Beanstalk ? I'd prefer something like Google cloud functions, where I only pay for the usage the task runs. However I tried on Cloud functions, Heroku and GAE. But it failed on all three. With 502 Error on Heroku and GAE

@ebidel

This comment has been minimized.

Copy link
Member

ebidel commented Sep 9, 2017

My understanding with Google Cloud functions (and others) is that there are a couple of limitations:

  1. Their env is Node 6. Puppeteer now works on Node 6, but any async/await code that you write would need to be transpiled before it's deployed. AWS Lambda and Firebase Functions have a similar limitation atm.
  2. the version of Chromium that Puppeteer installs is missing shared libs on Linux and you have no way to install them. Unlock Docker, GCF only support node deps in a package.json.
  3. Running on Linux requires launching Chrome with the --no-sandbox flag (and possibly others).

The solution is to use something like Heroku, App Engine Flex, Google Compute Engine, or AWS where you have full control over the environment. Docker being an excellent choice.

We just put up an example Dockerfile that shows how to install the correct version of Chrome to make Puppeteer work with Chrome headless (Linux).

Related issues:

  • AWS Lambda Functions - #323
  • Firebase Functions - #557

@aslushnikov aslushnikov closed this Sep 9, 2017

@jasan-s

This comment has been minimized.

Copy link
Author

jasan-s commented Sep 9, 2017

Thanks @ebidel , I'm not familiar with Docker. but I also tried to deploy to Vultr Ubuntu 16.04 x64
today, and received the following error:

Error: Failed to launch chrome!
/root/mysite/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory
@Garbee

This comment has been minimized.

Copy link
Contributor

Garbee commented Sep 9, 2017

@jasan-s You need to make sure the requirements are installed. Check the docs/troubleshooting.md file for more details.

@timleland

This comment has been minimized.

Copy link
Contributor

timleland commented Oct 28, 2017

I wrote a simple guide that includes the steps to get an app running puppeteer on Heroku: https://timleland.com/headless-chrome-on-heroku/

@cemheren

This comment has been minimized.

Copy link

cemheren commented Mar 12, 2018

Not sure if anyone'd be interested but, I started providing Puppeteer as a service. Take a look at https://konvoy.io/. There is a good Free tier which is hopefully enough for most experimental workloads.

@ebidel

This comment has been minimized.

Copy link
Member

ebidel commented Mar 12, 2018

https://konvoy.io/playground/ looks familiar :p

@cemheren

This comment has been minimized.

Copy link

cemheren commented Mar 12, 2018

Haha, you were my inspiration :D

@Robula

This comment has been minimized.

@reco

This comment has been minimized.

Copy link

reco commented Aug 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment