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

core(gather-runner): detect Chrome interstitials #9176

Merged
merged 7 commits into from
Jun 12, 2019
Merged

Conversation

patrickhulce
Copy link
Collaborator

Summary
All part of the plan (#8865 (comment)).

All Chrome interstitials put the user onto chrome-error://chromewebdata which is then all data URLs under the hood. We check the documentURL portion to see if they ended on the chrome error page, if they did and we had a failed request, we fail with a special cased error.

Related Issues/PRs
#8865 (comment)

@benschwarz
Copy link
Contributor

Is this something you could filter devtools logs for the appearance of Page.interstitialShown?

@patrickhulce
Copy link
Collaborator Author

Yeah @benschwarz the more direct way IMO would be using Page.frameRequestedNavigation and finding the reason there. I'm definitely not opposed to doing that but this seemed to align better with our existing model for what counts as a "page load error".

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.

yay, this is great. I also like how it has an obvious place for this to live now, so there's one place to detect and handle more interstitial special cases in the future (like if we do ever want to handle t using protocol events instead, or whatever)

lighthouse-core/gather/gather-runner.js Outdated Show resolved Hide resolved
lighthouse-core/gather/gather-runner.js Show resolved Hide resolved
lighthouse-core/gather/gather-runner.js Show resolved Hide resolved
lighthouse-core/gather/gather-runner.js Show resolved Hide resolved
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.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants