node-export-server icon indicating copy to clipboard operation
node-export-server copied to clipboard

Puppeteer unable to launch chrome

Open anpool opened this issue 1 year ago • 4 comments

Expected behaviour

Puppeteer should be able to launch chrome successfully after installing highcharts-export-server.

Actual behaviour

On some of our servers, highcharts-export-server errors out because puppeteer is unable to launch chrome. image

And, if I try to launch chrome manually by double clicking the chrome.exe I see the following error: image

However, on other servers everything is working fine even though highcharts-export-server is installed the same way? Please advise, are we missing some dependency library or something?

anpool avatar Jan 30 '24 07:01 anpool

I think I've figured out the problem.

The servers where we are encountering this problem are using Windows Server 2012. Servers running a newer version (e.g Windows Server 2019) are fine. It appears during the npm install that highcharts-export-server automatically downloads the latest version of chrome rather than a version compatible with the OS. If I install chrome separately using windows installer it is version 109.0.5414.168, but when highcharts-export-server installs it, it is 121.0.6167.85.

Chrome app (via windows installer): image

Chrome downloaded by Highcharts-export-server: image

What are the options here? Is it possible to just download a copy of 109.x.x.x somewhere and replace the files or can I configure highchart-export-server to use the separately installed chrome app which is the correct version?

anpool avatar Jan 31 '24 07:01 anpool

i solved this issue by adding chrom path in package.json. "puppeteer": { "executablePath": "C:\Program Files\Google\Chrome\Application\chrome.exe" }, for IIS server.

naveedtechnisoft avatar Feb 03 '24 10:02 naveedtechnisoft

Which package.json, in highchart-export-server? Can't this be set in an environment variable?

Thanks

anpool avatar Feb 13 '24 08:02 anpool

Did anyone find any solution? @anpool

I'm facing this error when running it through docker. Please help

fzahraa avatar Sep 03 '24 17:09 fzahraa