Solvedvirtual environments puppeteer can't launch chromium, missing shared library libgbm.so

Describe the bug
My build actions involve running puppeteer tests with chromium. Today (April 16th, 2020) I started to get the following message:

Starting Chrome Headless
/opt/hostedtoolcache/Python/3.7.6/x64/share/jupyter/lab/browser_test/chrome-test.js:51
  throw up;
  ^

Error: Failed to launch the browser process!
/opt/hostedtoolcache/Python/3.7.6/x64/share/jupyter/lab/browser_test/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

Area for Triage:

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
The file should not be missing and chrome should be able to launch.

How to reproduce:
make an Jupyterlab extension with cookiecutter: https://github.com/jupyterlab/extension-cookiecutter-ts
upload it to github into a new repo, make a vanilla commit to trigger build.
Complete build log from my repo from 16.04.2020:
https://github.com/nandor-poka/ebml-tools-jl/runs/592321981?check_suite_focus=true

Log to successful build from 14.04.2020:
https://github.com/nandor-poka/ebml-tools-jl/actions/runs/78143605

14 Answers

✔️Accepted Answer

Both builds run on the same image version, the only difference is the puppeteer version puppeteer@2.1.1(success) vs puppeteer@3.0.0(fail) and it seems the new version requires additional libraries.
I've tried to install libgdm in runtime and it helped. Could you please add these lines to your yml file?

        sudo apt-get update
        sudo apt-get install -y libgbm-dev

Other Answers:

sudo apt-get update
sudo apt-get install -y libgbm-dev

That did the trick, thank you. I modified my build.yml to have this

- name: Install dependencies
      run: |
        python -m pip install jupyterlab
        sudo apt-get update
        sudo apt-get install -y libgbm-dev

and now it works again.
I think this can be closed.

@miketimofeev FYI the dependency to fix this is actually libgbm1. The development version libgbm-dev is not mandatory.

See puppeteer/puppeteer#5693.