heroku-buildpack-google-chrome
heroku-buildpack-google-chrome copied to clipboard
Headless Chrome blowing up on Heroku-16 and Cedar-14
I'm running an app on a heroku-16 stack with the heroku/heroku-buildpack-google-chrome
buildpack, and it appears to barf with:
remote: Running: rake assets:precompile
remote: I, [2018-01-30T03:22:12.590734 #1041] INFO -- : Writing /tmp/build_ec40d31506f51774e1843471db4e3a6e/public/assets/application-0fdddf6eb42efbc276a22bacd4ef1e878aa7a2f431a9558eabe4c3da0dad2034.js
remote: I, [2018-01-30T03:22:12.591212 #1041] INFO -- : Writing /tmp/build_ec40d31506f51774e1843471db4e3a6e/public/assets/application-0fdddf6eb42efbc276a22bacd4ef1e878aa7a2f431a9558eabe4c3da0dad2034.js.gz
remote: (node:1058) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!
remote: /tmp/build_ec40d31506f51774e1843471db4e3a6e/vendor/bundle/ruby/2.5.0/gems/critical-path-css-rails-2.3.0/node_modules/puppeteer/.local-chromium/linux-508693/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
remote: TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
remote: (node:1058) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
remote: rake aborted!
remote: Failed to get CSS for route /
Looks like heroku isn't getting the libX11
package?
I then ran heroku stack:set cedar-14
, and during deploy it confirmed the change with Purging Cache. Changing stack from heroku-16 to cedar-14
It then failed with a similar message,
remote: (node:4108) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!
remote: /tmp/build_c6db510c3ff20c9ea9b46e51c6122b51/vendor/bundle/ruby/2.5.0/gems/critical-path-css-rails-2.3.0/node_modules/puppeteer/.local-chromium/linux-508693/chrome-linux/chrome: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
This time looking for libXss
It appears as though the problem is that the headless chrome instance I'm attempting to run occurs in the precompilation step. It appears however that the needed library isn't available until after the precompilation step, and so it'll blow up.
This might be intended, but I thought I'd get feedback on this. Allowing heroku to take care of precompilation is a fantastic feature - and if it's able to run after the buildpacks are installed, that would be ideal in my usecase.
@JoeGaebel Have you seen this issue recently?