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

Launch non-headless firefox fail on Windows #5792

Closed
linquize opened this issue Apr 30, 2020 · 9 comments
Closed

Launch non-headless firefox fail on Windows #5792

linquize opened this issue Apr 30, 2020 · 9 comments

Comments

@linquize
Copy link

Launch non-headless firefox fail on Windows

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


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

    at onClose (C:\project1\node_modules\puppeteer\lib\Launcher.js:615:20)
    at ChildProcess.<anonymous> (C:\project1\node_modules\puppeteer\lib\Launcher.js:606:67)
    at ChildProcess.emit (events.js:208:15)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
(node:6128) 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:6128) [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\User\AppData\Local\Temp\puppeteer_dev_firefox_profile-LJUaST\cert9.db'] {
  errno: -4082,
  code: 'EBUSY',
  syscall: 'unlink',
  path: 'C:\\Users\\User\\AppData\\Local\\Temp\\puppeteer_dev_firefox_profile-LJUaST\\cert9.db'
}

Tell us about your environment:

  • Puppeteer version: 3.0.2
  • Platform / OS version: Win 7 x64
  • Node.js version: 12.6.0
(async () => {
  const browser = await puppeteer.launch({headless: false});
  const page = await browser.newPage();
  await page.goto('https://google.com/');
})();

Firefox browser window is open, but it is empty. It does not navigate to the desired URL. Address bar is orange.

No problem on Linux.

@mjzffr mjzffr added the firefox label May 7, 2020
@mjzffr
Copy link
Contributor

mjzffr commented May 7, 2020

Might be the same as #5673

@whimboo
Copy link
Collaborator

whimboo commented May 14, 2020

@linquize which version of Firefox are you using? Is maybe another process of Firefox still running in the background and keeping hold of the profile at C:\\Users\\User\\AppData\\Local\\Temp\\puppeteer_dev_firefox_profile-LJUaST?

@ordimans
Copy link

Same here with Win 10 x64

Firefox version :
78.0a1 (2020-05-27) (64-bit)

I need to use Firefox because Chrome has been detected...

@whimboo
Copy link
Collaborator

whimboo commented Feb 19, 2021

Could one of you please check again with a recent version of Firefox? When doing that please also add the environment variable DUMPIO=1. I would be interested in the output of Firefox. Thanks.

@smaudet
Copy link

smaudet commented Apr 5, 2021

I came across this - firefox starts but does not report as loaded. Attempted to add exceptions to A/V products, did not appear to make any difference.

Firefox: 87.0
Windows 10 Pro v19041.vb_release.191206-1406

@whimboo I attempted to set DUMPIO=1 as requested, I am unsure if that parameter is making it to your code as I am launching this out of a build script (gulp). No additional logging appeared.

I suggest internally retrying instead of just failing on the lock file, as it appears to 'eventually' work. Not certain this is a fix...

Also as a separate issue on platforms with well known install locations, suggest using default path of e.g. 'firefox' binaries if not "provider installed", this solution is useless to me invoking the install command with an environment variable would ridiculously prohibitive... with how difficult firefox is to configure I wonder if this is not in part evidence of corporate favoritism on the part of Google...

@smaudet
Copy link

smaudet commented Apr 5, 2021

Not to be too perjorative, but this appears to function for my needs perfectly:

https://github.com/sindresorhus/open

Maybe if you need an over-engineered half-baked solution for running unit-tests puppeteer is good, but this library appears to actually function for my needs perfectly! Its a shame puppeteer is not more modular...

Hope this bug gets fixed someday, cheers.

@whimboo
Copy link
Collaborator

whimboo commented Nov 18, 2021

We landed a fix in Firefox to properly handle the launcher process. @smaudet, can you please check again with an up-to-date version of Firefox Nightly? I'm sure it should work now. Thanks.

@stale
Copy link

stale bot commented Jun 23, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 23, 2022
@whimboo
Copy link
Collaborator

whimboo commented Jun 24, 2022

No further comment since I requested to check a fix in Firefox. As such I assume that this problem is solved now.

@whimboo whimboo closed this as completed Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants