Missing Libraries for Headless Chromium

We are missing some libraries requrired to launch the chrome/chromium process via node.js. With NPM, we have been able to install the Puppeteer library. We can also call node via Symfony Process, but Puppeteer fails to complete the process as some of the libraries required to launch the Chrome subprocess are missing in the runtime container. Is there a procedure available to add the following shared libraries?

  • libatk-1.0.so.0
  • libatk-bridge-2.0.so.0
  • libatspi.so.0
  • libXcomposite.so.1
  • libgbm.so.1

I’m also aware of the headless chrome service PSH offers, but using that requires us to have pretty significantly different setups for our local development vs staging/production environments.

In the short-term, I’ve set up logic to determine whether certain environment variables and relationships exist to choose between local chrome or the chrome-headless service.

I’m still hoping to find a more environment agnostic solution for the future.

Hi @soleson - tools like apt get aren’t going to be available in a Platform.sh container, given our protections of the filesystem. However, if you can put a script together to install those libraries via wget/curl, there aren’t any restrictions to what you can install in the build hook.

You could use Headless Chrome | Platform.sh Docs no?