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

pupeteer-firefox doesn't launch firefox #5234

Closed
crystalbit opened this issue Dec 8, 2019 · 7 comments
Closed

pupeteer-firefox doesn't launch firefox #5234

crystalbit opened this issue Dec 8, 2019 · 7 comments

Comments

@crystalbit
Copy link

Steps to reproduce

  • Puppeteer version: "puppeteer-firefox": "^0.5.0",
  • Platform / OS version: macOS Catalina
  • Node.js version: v10.12.0

What steps will reproduce the problem?

run the code from example:

const pptrFirefox = require('puppeteer-firefox');
 
(async () => {
  const browser = await pptrFirefox.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({path: 'example.png'});
  await browser.close();
})();

example code from https://github.com/puppeteer/puppeteer/tree/master/experimental/puppeteer-firefox

What is the expected result?
to launch headless ff and to throw no errors :)
original puppeteer with chromium works great, but only with sudo

What happens instead?

> sudo node pup
(node:27684) UnhandledPromiseRejectionWarning: Error: Failed to launch Firefox!


    at onClose (/Users/kek/project/node_modules/puppeteer-firefox/lib/Launcher.js:263:14)
    at Interface.helper.addEventListener (/Users/kek/project/node_modules/puppeteer-firefox/lib/Launcher.js:252:50)
    at Interface.emit (events.js:187:15)
    at Interface.close (readline.js:379:8)
    at Socket.onend (readline.js:157:10)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1094:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  -- ASYNC --
    at Puppeteer.<anonymous> (/Users/kek/project/node_modules/puppeteer-firefox/lib/helper.js:31:27)
    at /Users/kek/project/pup.js:4:37
    at Object.<anonymous> (/Users/kek/project/pup.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
(node:27684) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:27684) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@OysterD3
Copy link

Have you found any solution for this?

@Maysjtu
Copy link

Maysjtu commented Dec 22, 2019

same problem!!!
Puppeteer version: "puppeteer-firefox": "^0.5.0",
Platform / OS version: Linux version 4.4.0-33.bm.1-amd64 (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10) )
Node.js version: v8.9.1

@OysterD3
Copy link

same problem!!!
Puppeteer version: "puppeteer-firefox": "^0.5.0",
Platform / OS version: Linux version 4.4.0-33.bm.1-amd64 (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10) )
Node.js version: v8.9.1

I found the solution
try

sudo apt-get install 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 libappindicator1 libnss3 lsb-release xdg-utils wget

@mjzffr
Copy link
Contributor

mjzffr commented Jan 13, 2020

I'm closing this issue since the experimental puppeteer-firefox package is no longer maintained. A replacement will be available
later this year. You can learn more about Mozilla's work on this at https://wiki.mozilla.org/Remote

See also #5137

@mjzffr mjzffr closed this as completed Jan 13, 2020
@cereme
Copy link

cereme commented Feb 14, 2020

I've got same issue on AWS EC2 w/ Ubuntu 18, node 13 and resolved with @OysterD3 's solution

@satiseven
Copy link

same problem!!!
Puppeteer version: "puppeteer-firefox": "^0.5.0",
Platform / OS version: Linux version 4.4.0-33.bm.1-amd64 (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10) )
Node.js version: v8.9.1

I found the solution
try

sudo apt-get install 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 libappindicator1 libnss3 lsb-release xdg-utils wget

How can I install these package on centos7 3.10.0-693.el7.x86_64?
it works on ubuntu but my server is centos

@OysterD3
Copy link

same problem!!!
Puppeteer version: "puppeteer-firefox": "^0.5.0",
Platform / OS version: Linux version 4.4.0-33.bm.1-amd64 (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10) )
Node.js version: v8.9.1

I found the solution
try

sudo apt-get install 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 libappindicator1 libnss3 lsb-release xdg-utils wget

How can I install these package on centos7 3.10.0-693.el7.x86_64?
it works on ubuntu but my server is centos

Can't help you, never try on centos

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

No branches or pull requests

6 participants