pupeteer-firefox doesn't launch firefox
See original GitHub issueSteps 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.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
how do you install and run puppeteer for firefox - Stack Overflow
Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.
Read more >How to Run Puppeteer with Firefox Instead of Chrome
Puppeteer runs headless by default. You will not see the Firefox browser being launched. If you want to watch Puppeteer running with Firefox,...
Read more >How to run Tests in Puppeteer with Firefox - BrowserStack
How to run Puppeteer tests in Firefox ; Windows Command Line. set PUPPETEER_PRODUCT=firefox ; Windows Powershell / Visual Studio Code Terminal. $ ...
Read more >1693011 - Firefox hangs during startup when both headless ...
When running headless Puppeteer tests with Firefox Nightly on Linux for some tests Firefox hangs during startup. As result of these failures tests...
Read more >[meta] Support running WordPress Gutenberg test suite ...
WordPress is using Puppeteer to run integration tests and for now only run them against ... Add the following line, that refers to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop 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
Top GitHub Comments
I found the solution try
Can’t help you, never try on centos