Puppeteer NOT working with Firefox (nightly) when {product: 'firefox'}
See original GitHub issueSteps to reproduce
- Download Firefox Nightly
- Run the below edited example to use
product: 'firefox'
/**
* @name Duck Duck Go search
*/
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless: false,
product: 'firefox',
//executablePath: 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe'
//executablePath: 'C:/Program Files/Mozilla Firefox/firefox.exe'
executablePath: 'C:/Program Files/Firefox Developer Edition/firefox.exe',
dumpio: true
});
const page = await browser.newPage()
await page.goto('https://duckduckgo.com/')
await page.type('#search_form_input_homepage', 'Puppeteer')
const searchValue = await page.$eval('#search_form_input_homepage', el => el.value)
console.log(searchValue)
await browser.close()
})()
Tell us about your environment:
- Puppeteer version: 3.2.0
- Platform / OS version: Windows 10
- URLs (if applicable):
- Node.js version: v13.8.0
- NPM version: 6.14.2
What steps will reproduce the problem? Described above
What is the expected result? Puppeteer to work as expected, the same way (or near) as it works with chrome/chromium
What happens instead? It crash with:
C:\Users\Milen\Desktop\Puppeteer-Test_Firefox>node test.js
(node:12256) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
at onClose (C:\Users\Milen\Desktop\Puppeteer-Test_Firefox\node_modules\puppeteer\lib\Launcher.js:750:14)
at ChildProcess.<anonymous> (C:\Users\Milen\Desktop\Puppeteer-Test_Firefox\node_modules\puppeteer\lib\Launcher.js:740:61)
at ChildProcess.emit (events.js:333:22)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
(node:12256) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12256) [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.
[Error: EBUSY: resource busy or locked, unlink 'C:\Users\Milen\AppData\Local\Temp\puppeteer_dev_firefox_profile-BFNrfA\cookies.sqlite'] {
errno: -4082,
code: 'EBUSY',
syscall: 'unlink',
path: 'C:\\Users\\Milen\\AppData\\Local\\Temp\\puppeteer_dev_firefox_profile-BFNrfA\\cookies.sqlite'
}
and the Firefox Nightly is left open:
About was additionali clicked in order to see the version.
Can you please someone review it and advise what might be the issue.
Thank you,
Milen Palavrov
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to Run Puppeteer with Firefox Instead of Chrome
As puppeteer is already added to package.json , we can run npm i . The latest version of Firefox Nightly should be downloaded...
Read more >how do you install and run puppeteer for firefox - Stack Overflow
Personally had a problem with Puppeteer. Can't install it on ubuntu. Just empty .local-firefox. Playwright has webkit, chromium and firefox ...
Read more >Puppeteer causes Firefox to freeze because stdout/stderr ...
Puppeteer causes Firefox to freeze because stdout/stderr pipes are no longer processed.
Read more >How to run Tests in Puppeteer with Firefox - BrowserStack
Due to high demand from users, Puppeteer extended its support to Firefox. However, Puppeteer Firefox support is still in the experimental stage, ...
Read more >FAQ | Puppeteer
From Puppeteer v2.1.0 onwards you can specify puppeteer.launch({product: 'firefox'}) to run your Puppeteer scripts in Firefox Nightly, ...
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 Free
Top 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

Just for whoever is having this issue. The fix for my troubles are…:
There were 2 issues with my code:
Which seems to be needed when using Firefox.
Cheers guys, I hope it helps someone.
Closing.
Thanks for sharing your solution 😃