v3.0.0 does not work in google cloud funtions node10 runtime
See original GitHub issueTell us about your environment:
- Puppeteer version: 3.0.0
- Platform / OS version: GCP functions
- URLs (if applicable):
- Node.js version: 10 (beta - in cloud functions)
I see that the latest release 3.0.0 does not support node8 anymore. So, I changed the runtime to 10 (beta) in my cloud functions and got this below error in the logs
Failed to launch the browser process!
/workspace/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
I tried puppeteer v2.1.1 with node10 runtime and it worked.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:33
- Comments:42 (6 by maintainers)
Top Results From Across the Web
Troubleshooting Cloud Functions - Google Cloud
... deploying an event-driven function; Default runtime service account does not exist ... Logs too large in Node.js 10+, Python 3.8, Go 1.13,...
Read more >Puppeteer not working with google cloud functions in Node 10 ...
I am using puppeteer v3.0.0 with nodejs 10 runtime. How can i resolve this error? Google Cloud Collective. node.js ...
Read more >Manage functions | Cloud Functions for Firebase - Google
Deploy functions; Delete functions; Modify a function's name, region or trigger ... Cloud Functions 2.0.0 and higher allows a selection of Node.js runtime....
Read more >Getting started with Cloud Functions (2nd gen)
In this codelab, you will learn about Google Cloud Functions (2nd gen). ... of your application does not impact the application performance.
Read more >Incidents - Google Cloud Service Health
Cloud Billing usage reporting is experiencing issues, and Cost Management experience may show incomplete data. 25 Jul 2022. 9 days, 3 hours ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, I’m a PM on Google Cloud.
All OS packages available in Cloud Functions are listed on this page,
libgbm1
is indeed not listed.I will follow up with the Cloud Functions team to add it (internal bug number: 156270284)
I’d like to share a somehow-dirty-but-working fix, hoping it might help people like me that would like to try newer versions of Chromium on GCF (Google Cloud Functions) without waiting for the platform’s update.
It’s known from this page that the Node.js 8 & 10 environments on GCF use Ubuntu 18.04, on which the
libgbm.so.1
binary is provided by packagelibgbm1
.By analyzing the package dependencies, examining the list of system packages of the Node.js environment on GCF, and some live inspection of the function execution environment, it’s known that there are (only) two additional packages that we need:
libgbm1
andlibwayland-server0
.Due to privilege limits we may not install system packages directly. However it’s okay to fetch the binaries at function deployment time (via npm’s pre/post script hooks) and explicitly ask the dynamic linker to use such binaries (via the
LD_LIBRARY_PATH
environment variable).Please find below the proof-of-concept code that works for me (using the
nodejs10
runtime):The checksum values above are obtained from the respective package pages:
libgdm1
/libwayland-server0
.