DEV Community

Discussion on: Running headless Chromium in Azure Functions with Puppeteer and Playwright

Collapse
 
bennypowers profile image
Benny Powers 🇮🇱🇨🇦

Thanks for publishing this article it really helped me.

I went through the steps, except that I upload a zip from CI, since my function references files outside the functions root dir, and I get:

browserType.launch: Failed to launch browser: Error: spawn /home/site/wwwroot/node_modules/playwright/.local-browsers/chromium-827102/chrome-linux/chrome EACCES

I wonder if I'm missing a step to configure the user access.

Collapse
 
sujithsshetty profile image
Sujith Shetty

Hi @bennypowers , did you find fix for this?

Collapse
 
bennypowers profile image
Benny Powers 🇮🇱🇨🇦

IIRC you need to build it on the remote

func azure functionapp publish my-playwright-func  --build remote
Enter fullscreen mode Exit fullscreen mode

I think you may also need to set an ENV var which specifies that chromium should install in the repo working dir, or something like that