stereobooster / react-snap

👻 Zero-configuration framework-agnostic static prerendering for SPAs
MIT License
5.04k stars 391 forks source link

Fails on heroku (I believe because it needs --no-sandbox) flag #439

Closed jisaacks closed 4 years ago

jisaacks commented 4 years ago

Bug Report

Current Behavior A clear and concise description of the behavior.

I am getting error in the build logs in heroku:

Error: Failed to launch chrome!
[0202/062515.587363:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.

Possible Solution

According to this the --no-sandbox option should be set, it is also implied in the error above. Is there a way I can turn that on?

Additional context/Screenshots My heroku stack is heroku-18 and my buildpacks are:

  1. heroku/nodejs
  2. https://github.com/jontewks/puppeteer-heroku-buildpack.git
  3. https://github.com/heroku/heroku-buildpack-static.git
jisaacks commented 4 years ago

I needed to add this to package.json

"reactSnap": {
    "puppeteerArgs": ["--no-sandbox", "--disable-setuid-sandbox"]
  },