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

ubuntu shows some errors. release V19.0.0 #9218

Closed
xcbaojian opened this issue Nov 5, 2022 · 8 comments
Closed

ubuntu shows some errors. release V19.0.0 #9218

xcbaojian opened this issue Nov 5, 2022 · 8 comments
Labels

Comments

@xcbaojian
Copy link

Bug description

after update to V19.0.0,ubuntu shows some errors when running.
This seems to be a problem with the chrome path.
The error that is eventually reported after relying on the installation is difficult to solve.
Note that this is the case with Ubuntu.

Puppeteer version

19.0.0

Node.js version

16.7.1

npm version

8.15.0

What operating system are you seeing the problem on?

Linux

Configuration file

const puppeteer = require('puppeteer');
const moment = require('moment');
console.log(moment().format("YYYY-MM-DD HH:mm:ss"));  

(async () => {
  // const browser = await puppeteer.launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] })

const pathToExtension = '/root/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome';
const browser = await puppeteer.launch({
   headless: true,
   timeout: 0, 
   devtools: true, 
   executablePath: pathToExtension,
   args:['--disable-infobars','--no-sandbox','--disable-setuid-sandbox']
   });
  const page = await browser.newPage();
  await page.goto('https://www.google.com');
  await page.screenshot({path: 'example110401.png'});

  await browser.close();
})();

Relevant log output

[00:16:30] /root/workspace/pupperteer_WcJ8/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:299
[00:16:30]             reject(new Error([
[00:16:30]                    ^
[00:16:30] 
[00:16:30] Error: Failed to launch the browser process!
[00:16:30] /root/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /root/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome)
[00:16:30] /root/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome: /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0: no version information available (required by /root/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome)
[00:16:30] /root/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome: symbol lookup error: /root/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome: undefined symbol: gbm_bo_get_modifier
[00:16:30] 
[00:16:30] 
[00:16:30] TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
[00:16:30] 
[00:16:30]     at onClose (/root/workspace/pupperteer_WcJ8/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:299:20)
@xcbaojian xcbaojian added the bug label Nov 5, 2022
@jrandolf
Copy link
Contributor

jrandolf commented Nov 7, 2022

Please check our guide on troubleshooting on https://pptr.dev. You are missing some libraries.

@jrandolf jrandolf closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2022
@xcbaojian
Copy link
Author

hi
i install the libraries.the problem still.

sudo apt install -y gconf-service libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libappindicator3-1

@xcbaojian
Copy link
Author

image

@iamsid
Copy link

iamsid commented Nov 10, 2022

Troubleshooted this for a couple of hours before finding this.
Seeing same issue with v19. Using v18.2.1 works fine. No dependency or package change.
Probably my configuration is failing because of this change: #9095
Although, I have no idea on how to configure it.

@sinanargun
Copy link

sinanargun commented Nov 11, 2022

@iamsid this exact version worked for my case as well.

I put the below commands into Dockerfile:
- apt-get update
- >- apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget

In package.json:
"puppeteer": "18.2.1 "

While launching the browser:
const browser = await puppeteer.launch({ args: ['--no-sandbox'] });

I am not exactly sure what is broken in the latest version, still investigating.

@chaosreigned
Copy link

i have the same issue in V19.2.2

`Error: Failed to launch the browser process!
/opt/bytefaas/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome: symbol lookup error: /opt/bytefaas/.cache/puppeteer/chrome/linux-1056772/chrome-linux/chrome: undefined symbol: gbm_bo_get_modifier

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

at onClose (/opt/bytefaas/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:299:20)
at Interface.<anonymous> (/opt/bytefaas/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:287:24)
at Interface.emit (events.js:412:35)
at Interface.close (readline.js:451:8)
at Socket.onend (readline.js:224:10)
at Socket.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1317:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {

from: 'launchDef'
}`

@MichaelBelousov
Copy link

FWIW: this is due to chromium 108 requiring a higher libglm1 version (greater than v17.1), source: https://www.forum.puppylinux.com/viewtopic.php?t=7542

@iamsid
Copy link

iamsid commented Jan 31, 2023

I was able to get the latest versions running on my server. I read somewhere (don't have the reference link) that after the package version is updated, the server needs to be restarted to ensure Chrome installation path is correctly set.
I did not understand it exactly, but v19+ puppeteer did start working after I deployed my app and restarted my remote server.

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

No branches or pull requests

6 participants