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

clients: exit CLI on unhandledRejection #6394

Merged
merged 2 commits into from
Nov 19, 2018
Merged

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Oct 25, 2018

to fix the behavior brendan pointed out here:
#6387 (review)

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

WFM

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

runLighthouse gets more convoluted, but it works :)

@@ -148,6 +148,14 @@ function runLighthouse(url, flags, config) {
const shouldGather = flags.gatherMode || flags.gatherMode === flags.auditMode;
let chromeP = Promise.resolve();

process.on('unhandledRejection', async (reason) => {
process.stderr.write(`Unhandled Rejection. Reason: ${reason}`);
await potentiallyKillChrome();
Copy link
Member

@brendankenny brendankenny Oct 26, 2018

Choose a reason for hiding this comment

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

this turns into a runaway error in flaky appveyor which is already sometimes throwing unhandled rejections, then potentiallyKillChrome in here ends up throwing another, which gets caught by this event handler which throws another which...

try/catching in here should be enough to stop it (maybe with an additional stderr log that it happened)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've really fallen into the trap 100% ignoring appveyor at this point, should we prioritize trying to get windows travis going? get an auto-restart bot? something else?

Copy link
Member

Choose a reason for hiding this comment

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

should we prioritize trying to get windows travis going

I think we should. It feels like appveyor is going to continue to be like this, and azure isn't a near-term possibility because of some UI issues (were there other issues?).

Who knows, maybe it'll just work :) @paulirish might have had some ideas on this

@paulirish
Copy link
Member Author

@brendankenny try/catch up for the unhandled.

@brendankenny brendankenny merged commit 187c3a2 into master Nov 19, 2018
@brendankenny brendankenny deleted the exitonunhandled branch November 19, 2018 20:53
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

3 participants