question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't launch firefox

See original GitHub issue

I tried with 2.1.0 but it doesn’t work.

  const browser = await puppeteer.launch({'headless': false, 'product': 'firefox'})

From Puppeteer v2.1.0 onwards, as an experimental feature, you can specify puppeteer.launch({product: ‘firefox’}) to run your Puppeteer scripts in Firefox, without any additional custom patches.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
mjzffrcommented, Jun 11, 2020

wait-for-browser is a Firefox argument relevant to Windows. This might relevant to #5673

In the meantime, you can include wait-for-browser in the args option of Puppeteer.launch

1reaction
Sue9445commented, Feb 11, 2020
const puppeteer = require('puppeteer');
(async () => {
          const browser = await puppeteer.launch({
                 'headless': false, 'product': 'firefox',
                  'executablePath': "C:\\Program Files\\Mozilla Firefox\\firefox.exe
          });
          const page = await browser.newPage();
})();

(node:23104) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!

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

at onClose (C:\sources\test2\New folder\node_modules\puppeteer\lib\Launcher.js:751:14)
at ChildProcess.<anonymous> (C:\sources\test2\New folder\node_modules\puppeteer\lib\Launcher.js:741:61)
at ChildProcess.emit (events.js:215:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

(node:23104) 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:23104) [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\meoti\AppData\Local\Temp\puppeteer_dev_firefox_profile-5ijv8F\key4.db’] { errno: -4082, code: ‘EBUSY’, syscall: ‘unlink’, path: ‘C:\Users\meoti\AppData\Local\Temp\puppeteer_dev_firefox_profile-5ijv8F\key4.db’

I solved this error by adding the “-wait-for-browser” arg.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox won't start - find solutions - Mozilla Support
This error is caused by a problem with Firefox program files. The solution is to remove the Firefox program and then reinstall Firefox....
Read more >
Firefox will not open or launch on Windows 11/10
Firefox will not open or launch · Check the Task Manager and kill the Firefox process if open · Remove or disable some...
Read more >
Fix: Firefox Won't Open - Appuals.com
Press and hold the SHIFT key while opening Firefox. This will open Firefox in the Safe Mode. You might see a dialogue asking...
Read more >
[2022 Updated] Is Firefox Not Opening? Here's How to Fix It
This issue is a result of issues with the program files of Firefox. The best solution is to uninstall Firefox and reinstall it...
Read more >
Firefox Won't Open? Try These Methods to Fix It
Solution 1: Reinstall Firefox ... As corrupted/damaged files are mainly responsible for Firefox won't open Windows 10 error, you should consider ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found