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

Fail gracefully when chromium failed to download #430

Merged
merged 2 commits into from Aug 21, 2017

Conversation

aslushnikov
Copy link
Contributor

This patch changes both install.js and Launcher.js to inform how
chromium could be downloaded manually if puppeteer fails to download it.

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Copy link
Contributor Author

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}.`);
Copy link
Collaborator

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.

Copy link
Contributor Author

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.
@aslushnikov aslushnikov merged commit c1731dd into puppeteer:master Aug 21, 2017
@aslushnikov aslushnikov deleted the gracefully branch August 22, 2017 09:08
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

Successfully merging this pull request may close these issues.

None yet

2 participants