Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppeteer can't launch chromium, missing shared library libgbm.so #732

Closed
1 of 5 tasks
nandor-poka opened this issue Apr 16, 2020 · 14 comments · Fixed by mermaid-js/mermaid-cli#118
Closed
1 of 5 tasks

Comments

@nandor-poka
Copy link

nandor-poka commented Apr 16, 2020

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

@al-cheb al-cheb added OS: Ubuntu Area: Python investigate Collect additional information, like space on disk, other tool incompatibilities etc. and removed needs triage labels Apr 16, 2020
@miketimofeev
Copy link
Contributor

@nandor-poka could you please provide a link to successful build?

@miketimofeev
Copy link
Contributor

Looks like it's all about puppeteer 3.0.0
puppeteer/puppeteer#5661

@nandor-poka
Copy link
Author

@nandor-poka could you please provide a link to successful build?

Edited issue with link to successful build from 2 days ago (there were no builds yesterday)

@miketimofeev
Copy link
Contributor

miketimofeev commented Apr 16, 2020

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

@nandor-poka
Copy link
Author

nandor-poka commented Apr 17, 2020

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
Copy link
Contributor

@nandor-poka glad to hear! We're going to add libgbm library to the Ubuntu images, so let's leave this issue open until that if you don't mind.

@miketimofeev miketimofeev added awaiting-deployment Code complete; awaiting deployment and/or deployment in progress and removed investigate Collect additional information, like space on disk, other tool incompatibilities etc. labels Apr 17, 2020
@nandor-poka
Copy link
Author

@nandor-poka glad to hear! We're going to add libgbm library to the Ubuntu images, so let's leave this issue open until that if you don't mind.

I don't mind at all, I was merely looking at the issue from my perspective :)

@fcollonval
Copy link

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

See puppeteer/puppeteer#5693.

@miketimofeev
Copy link
Contributor

The image with libgbm has been deployed.
@nandor-poka feel free to ping me if you have any concerns.
Thank you!

@miketimofeev miketimofeev removed the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label May 14, 2020
vowstar added a commit to vowstar/svg2pdf-cli that referenced this issue Sep 15, 2020
to fix puppeteer can't launch chromium, missing shared library libgbm.so
actions/runner-images#732

Signed-off-by: Huang Rui <vowstar@gmail.com>
@fcastrocs
Copy link

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

See puppeteer/puppeteer#5693.

Thank you. I had libgbm-dev and chromium was really slow. Replacing it for libgbm1 fixed it.

@1neye
Copy link

1neye commented Jan 30, 2021

Thank you very much.

It works

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

@vikramparihar
Copy link

Finally issue fixed by
#732

@amandeep-recur
Copy link

Thanks it worked like a charm :)

@pabloalmeidac
Copy link

Thank you very much.

It works

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants