Share via

The Chromium binary fails to start in Azure App Service (Linux)

Cesar Jimenez 0 Reputation points
2026-02-19T12:55:40.4833333+00:00

I am running a Node.js application on Azure App Service (Linux Web App – Code, not container).

In my application, I am using Puppeteer to generate PDFs.

During browser launch, I am getting the following error:

Error: Failed to launch the browser process: Code: 127

/tmp/chromium: error while loading shared libraries: libnspr4.so: 
cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://pptr.dev/troubleshooting

Stack trace excerpt:

at ChildProcess.onClose (.../node_modules/@puppeteer/browsers/lib/esm/launch.js:339:24)
at ChildProcess.emit (node:events:536:35)
at ChildProcess._handle.onexit (node:internal/child_process:293:12)

My Questions

Does Azure App Service (Linux – Code) support running Puppeteer/Chromium?

  1. Is there a way to install required shared libraries like libnspr4 in this environment?
  2. Does Microsoft provide any official base image for App Service that supports headless Chromium?

I would like guidance on the officially supported way to run Puppeteer (headless Chromium) in Azure App Service Linux without browser launch failures.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

{count} votes

1 answer

Sort by: Most helpful
  1. Praneeth Maddali 5,730 Reputation points Microsoft External Staff Moderator
    2026-02-19T13:29:34.85+00:00

    Hi @cesar jimenez

    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://learn.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux&tabs=debian

    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

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.