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

Poor error handling when redirected main document request fails #15270

Open
connorjclark opened this issue Jul 13, 2023 · 2 comments
Open

Poor error handling when redirected main document request fails #15270

connorjclark opened this issue Jul 13, 2023 · 2 comments
Assignees
Labels

Comments

@connorjclark
Copy link
Collaborator

connorjclark commented Jul 13, 2023

image
node cli http://localhost:10503\?redirect\=https://idonotexistalsdkjsadlajd.com --view

This requests fails both the mimetype check (as the failing network record mimetype is an empty string), and the interstitial check. The latter takes precedence over the former.

But we also show a "main doc was redirected" warning, which is just noise. We should not emit this warning when we have an error interstitial.

Additionally, the final urls:

finalDisplayedUrl: "chrome-error://chromewebdata/"
mainDocumentUrl: "chrome-error://chromewebdata/"
finalUrl: "chrome-error://chromewebdata/"

are not useful. And aren't really navigable links (the URL-under-test link in the top-left of the report just re-opens the same report document).

@connorjclark
Copy link
Collaborator Author

connorjclark commented Jul 13, 2023

A related problem is currently seen in LR (only for kohl.com):

image

In this case, the main document was redirect to the mobile site, which ended up failing. The LHR ends up with a runtime error of NOT_HTML, which is less accurate than emitting a "main document failed" error. I'm not sure why WRS did not redirect to an error interstitial. Instead it was about:blank. caseq says we shouldn't make any assumptions about the url the page ends up on when Page.navigate fails.

@adamraine
Copy link
Member

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

No branches or pull requests

3 participants