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

Puppeteer error with browser #6

Open
leozelion opened this issue Jun 25, 2021 · 2 comments
Open

Puppeteer error with browser #6

leozelion opened this issue Jun 25, 2021 · 2 comments

Comments

@leozelion
Copy link

I tried using your plugin today, but catch this error by Puppeteer:

Error: Could not find browser revision 782078. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.
    at ChromeLauncher.launch (F:\GASUdocs\EXAM\save-answersheets\node_modules\puppeteer\lib\cjs\puppeteer\node\Launcher.js:86:23)
    at async readAndProcessInstructionFile (F:\GASUdocs\EXAM\save-answersheets\save-answersheets.js:110:21)
    at async F:\GASUdocs\EXAM\save-answersheets\save-answersheets.js:39:9

OS: Windows 10 20H2
NPM: 6.5.0
NodeJS: 14.17.1
PowerShell: 5.1.19041.1023

Most likely this is the solution here: puppeteer/puppeteer#6560 (comment)
So, I added this change in your code:

save-answersheets.js
@@ -110,1 +110,5 @@
-    const browser = await puppeteer.launch();
+    const browser = await puppeteer.launch({
+        // Point to existing Chrome install because NPM won't install Chromium
+        // https://github.com/puppeteer/puppeteer/issues/6560#issuecomment-719976065
+        executablePath: 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe'
+    });

And it works fine now. Thank you for this plugin!

@timhunt
Copy link
Member

timhunt commented Sep 6, 2021

Interesting. I haven't seen this yet, but thanks for the tip.

@timhunt
Copy link
Member

timhunt commented Apr 28, 2022

I've just tried things again, and it works without this for me.

And, even though my Chrome exe is in exactly the same place as your, it feels wrong (risky) to me to hard-code this path, if it should work without it. So, I am relucant to make this change in the master version of the code.

However, if anyone else hits this problem, having this issue here might help them work out what to do.

(If anyone else does have this problem, please comment here. If it affects lots of people we will need to do something.)

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

2 participants