Get an error "Failed to launch the browser process!
/tmp/chromium: /tmp/chromium: cannot execute binary file
TROUBLESHOOTING: https://pptr.dev/troubleshooting" when running 'puppeteer.launch()'
I don't have a solution, I just can say what I have already done to narrow down the search.
First I've run my test locally and during the local test I was able to receive pdf file.
Also I've checked that /tmp folder contains all neccesary executables, so seems they was unarchived are present in /tmp folder (see logs above)
Also it's worth notice that we use serverless + serverless-layer plugin. But 99% it doesn't affects this issue as I performed necessary checks. First I checked that the layer contains @Sparticuz/chromium, secondly it was imported from the layer, and thirdly the files were successfully unzipped into /tmp during the first call to executablePath() (see logs above).
Environment
chromium
Version: ^121.0.0puppeteer
/puppeteer-core
Version: ^21.11.0nodejs16
Expected Behavior
Run chrome, load html page and store as PDF
Current Behavior
Get an error "Failed to launch the browser process! /tmp/chromium: /tmp/chromium: cannot execute binary file TROUBLESHOOTING: https://pptr.dev/troubleshooting" when running 'puppeteer.launch()'
Steps to Reproduce
Possible Solution
I don't have a solution, I just can say what I have already done to narrow down the search.
First I've run my test locally and during the local test I was able to receive pdf file.
Also I've checked that /tmp folder contains all neccesary executables, so seems they was unarchived are present in /tmp folder (see logs above)
Also it's worth notice that we use serverless + serverless-layer plugin. But 99% it doesn't affects this issue as I performed necessary checks. First I checked that the layer contains @Sparticuz/chromium, secondly it was imported from the layer, and thirdly the files were successfully unzipped into /tmp during the first call to executablePath() (see logs above).