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
Fail gracefully when chromium failed to download #430
Conversation
install.js
Outdated
${revisionInfo.url} | ||
- Extract chromium into ${revisionInfo.folderPath} | ||
* Chromium executable should be at ${revisionInfo.executablePath} | ||
- Alternatively, point puppeteer to the downloaded chromium with the 'executablePath' option: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
lib/Launcher.js
Outdated
@@ -72,7 +72,7 @@ class Launcher { | |||
if (typeof chromeExecutable !== 'string') { | |||
let chromiumRevision = require('../package.json').puppeteer.chromium_revision; | |||
let revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), chromiumRevision); | |||
console.assert(revisionInfo, 'Chromium revision is not downloaded. Run npm install'); | |||
console.assert(revisionInfo.downloaded, `Chromium revision is not downloaded. Run "npm install", or download manually from ${revisionInfo.url} and extract into ${revisionInfo.folderPath}.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave this how it was. If npm install fails, it will tell them. And if chromium didn't download, then other dependencies are probably missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
This patch changes both install.js and Launcher.js to inform how chromium could be downloaded manually.
cb046be
to
13329bc
Compare
This patch changes both install.js and Launcher.js to inform how
chromium could be downloaded manually if puppeteer fails to download it.