An Azure service that provides an event-driven serverless compute platform.
Hi @Anupam Dutta Roy ,
Thanks for the confirmation.
You're correct. With Flex Consumption, it’s currently not possible to deploy or install additional native OS libraries such as libglib-2.0.so.0 the way it was sometimes feasible with the classic Consumption plan. Flex runs on a more restricted base image and doesn’t support customizing the underlying OS layer.
Because Puppeteer/Chromium depends on native system libraries, this becomes a platform limitation rather than a configuration issue. Falling back to Azure Container Apps or App Service / Premium Functions is the recommended and supported approach when those dependencies are required.
Failed to launch the browser process: Code: 127 stderr: /home/site/wwwroot/.cache/puppeteer/chrome/linux-143.0.7499.192/chrome-linux64/chrome: error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory
The error message indicates that the libglib-2.0.so.0 library is missing.
Unlike the Consumption plan, the Flex Consumption plan may have different library support and restrictions.
Here's what you can try to resolve the issue:
- Check Library Dependencies: Make sure that your code or Puppeteer configuration isn't relying on libraries that aren't available in the Flex Consumption environment. Since the error mentions a missing library, you may need to include it as part of your deployment package or find a compatible version that doesn't require that library.
- Use Docker: If you have the option, consider deploying your function inside a Docker container. This way, you have full control over the environment, and you can install any dependencies your application needs. This approach works well for running Puppeteer since you can install all required libraries and dependencies.
- Explore Alternative Plans: If possible, evaluate whether another hosting option (like the Premium plan) might suit your needs better if the Flex Consumption plan's library limitations are too restrictive for your requirements.
- Check Azure Documentation: You might want to review specific guidelines from Microsoft on Flex Consumption Plan Hosting to see if there are any additional constraints related to library support.
- Function App Logs: Check your function app's logs on Azure to gather more insights into any other potential issues that might be feeding into this error.
Hope this helps!
If the resolution was helpful, kindly take a moment to click on
and click on Yes for was this answer helpful. And, if you have any further query do let us know.