Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Thanks for sharing the error details. I understand you’re running Puppeteer on Azure App Service (Linux – Code) and Chromium is failing to start with the following message:
error while loading shared libraries: libnspr4.so
According to the official Puppeteer troubleshooting guidance, this type of error indicates that Chromium’s required system dependencies are missing on the host OS. Chromium relies on native Linux libraries such as libnspr4, libnss3, and related packages, and Puppeteer cannot function if these are unavailable on the runtime environment.
In Azure App Service (Linux – Code), this limitation is expected. The platform uses a managed Linux runtime, and OS‑level packages cannot be installed or modified. Because of this, missing Chromium dependencies cannot be added at startup or during deployment, which leads to browser launch failures like the one you’re seeing.
From a supportability standpoint, running headless Chromium is not an officially supported workload on App Service (Linux – Code). Microsoft recommends using container‑based hosting whenever your application requires custom system libraries or native dependencies.
Recommended (supported) approach: Run Puppeteer inside a custom Linux container, using one of the following:
- Azure App Service – Web App for Containers, or
- Azure Container Apps
With containers, you have full control over the base image and can install Chromium and all required libraries, which aligns with both Puppeteer’s requirements and Microsoft’s guidance for dependency‑heavy workloads.
reference:
https://pptr.dev/troubleshooting
https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#linux
If the answer is helpful, Please do click "Accept the answer” and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you