Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Puppeteer on Linux Azure Web Apps

I am trying to run the Puppeteer on Linux Azure Web Apps. But log shows

/node_modules/puppeteer/.local-chromium/linux-782078/chrome-linux/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory

I think it is due to the Linux distribution on Azure. And my question: Is it a dead end or is there something I can do about it?

like image 313
Marek Avatar asked Mar 02 '23 01:03

Marek


1 Answers

Looks like the default environments in App Service do not have the necessary dependencies for running headless Chromium. You can, however, run your app on App Service in a custom Docker image the dependencies installed. Here's a good starting point: https://github.com/buildkite/docker-puppeteer

like image 170
Anthony Chu Avatar answered Mar 05 '23 17:03

Anthony Chu