BrandonTS on Wed, 30 Oct 2019 02:32:31

I've deployed a Nodejs(Typescript) app to an Azure Function App running Window OS however I get the following error when trying to launch Chrome:

 Error: spawn UNKNOWN
       at ChildProcess.spawn (internal/child_process.js:358:11)
       at Object.spawn (child_process.js:533:9)
       at Launcher.launch (D:\home\site\wwwroot\node_modules\puppeteer\lib\Launcher.js:132:40) errno: 'UNKNOWN', code: 'UNKNOWN', syscall: 'spawn' }

I've come across a few older articles stating that Azure Function apps run windows in sandbox mode with limitations. Are these limitations still active and do we know for sure this is the root cause of the unknown error?

Has anyone successfully ran puppeteer in an Azure Function App on Windows OS without using a Docker Image or Browserless?


KetanChawda-MSFT on Wed, 30 Oct 2019 05:02:49

Hello Brandon,

Yes the sandbox limitation are still applicable if you are running on windows box. The best way is to go with Azure Functions Docker image.

Srichakra on Wed, 12 Feb 2020 08:49:48

Hi ,

I am having similar issue and i implemented your suggestion above but still am getting the same error 

Error: spawn UNKNOWN
    at ChildProcess.spawn (internal/child_process.js:358:11)
    at Object.spawn (child_process.js:533:9)
    at BrowserRunner.start (D:\home\site\wwwroot\node_modules\puppeteer\lib\Launcher.js:77:30)
    at ChromeLauncher.launch (D:\home\site\wwwroot\node_modules\puppeteer\lib\Launcher.js:242:12)

I noticed the puppeteer version is 1.8.0 and the latest is 2.1.1. Can you give insights how to fix this issue?