jontewks/puppeteer-heroku-buildpack

Library path problems with sassc

tslocke opened this issue · 2 comments

I've been using this buildpack along with a Heroku hosted Rails app for a good while and it's been working great, but since upgrading to Rails 6 (and a whole bunch of other upgrades) it seems to be causing a problem with library load paths.

This is showing up as a problem with sassc trying to load libstdc++.so.6.

LoadError: Could not open library '/app/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext/libsass.so': /app/.apt/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /app/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext/libsass.so)

LoadError: Could not open library '/app/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/lib/sassc/libsass.so': /app/.apt/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /app/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/lib/sassc/libsass.so)

Removing this buildpack solves the problem, but then I haven't got puppeteer of course :(

I've been going crazy trying to fix this, but I'm a bit out of my depth.

Any suggestions much appreciated

Hey @tslocke.

Have you tried the clearing cache suggestion from the readme? I don't have any exact idea of whats going on but thats always a good first shot. Other than that I wouldn't really know where to start but to dig into how Ruby is trying to use these libraries and see where the mixup is since it likely changed internally in Ruby since it only came about during an upgrade.

I think it may be best to split out the Puppeteer app from the rest of the Ruby app and utilize the Puppeteer app as a microservice instead of combining the two. Puppeteer can get pretty large with the chromium install so you may end up running into slug size issues in the future and would need to do that anyways.

Thanks for the advice. I came to the same conclusion and have started building the microservice. And thanks for this buildpack!