New issue
Advanced search Search tips

Issue 863674 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Error page contains easter-egg instead of error message

Reported by cosmo...@gmail.com, Jul 14

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Example URL:
http://whateverdoesntexist.io

Steps to reproduce the problem:
1. Try to load a page that can't be loaded
2. View source on the page that couldn't load to find the real error

What is the expected behavior?
A detailed technical explanation of the reason the page could not be loaded

What went wrong?
Instead you get hundreds of pages of javascript and styles for a trex game with no actual error to be found.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Long ago

Does this work in other browsers? Yes

Chrome version: 67.0.3396.99  Channel: stable
OS Version: OS X 10.13.4
Flash Version: 

This is especially frustrating when debugging in a remote selenium instance where you can't actually see what was rendered and have to rely on the title (where chrome shows the failed domain name and not the actual error) and the page source (hundreds of pages of game source code instead of 1 line of text indicating the error)
 
Labels: Needs-Feedback
NextAction: 2018-07-24
I personally don't think when a user encounters a page that can't load,
I don't think the next action against that would be "view source".

Ideally by just looking on the *rendered* error page, not the source code
and users can understand what next actions should be taken (e.g. check the URL,
check network connectivity etc.), although Chrome's error page may not be
as perfect as that.

But talking about testing scenario is a completely different matter.
I'm not familiar with selenium or testing technology, but I guess there
are other ways to detect loading failures other than checking the title
or source, depending on your test cases.

If you are seeking for any way to work around encountering the error page
in your test scenario, other forums more specific on web testing would be
appropriate.  This is Chromium's bug tracker, so unless it is an actionable
bug or a concrete proposal, Chromium developers cannot take any action on it.

If you have specific suggestions about how the error page can be improved,
feel free to add them here, as Type = Feature.  But we cannot guarantee
that the proposal can be implemented.
On that same note, I personally don't think when a user encounters a page that can't load they will want to invoke an easter egg and play a game.

If the error page absolute must contain an easter egg (it shouldn't), please consider restructuring the markup so that all the game's javascript and styles come AFTER a very clear error message.
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 17

Cc: kochi@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: -kochi@chromium.org
Components: -Blink UI>Browser>WebUI
NextAction: ----
Can WebUI team respond to this?
Just so we are clear:

Proposal: Remove easter egg
Reason: It interferes with testing in Chrome

At this point, Selenium (the de-facto standard in automated browser testing) does not support retrieving error codes or bubbling up connectivity issues. I considers the error page the same as any other page. I solve this problem using a CSS selector ".error-code[jscontent=\"errorCode\"]".

I will likely never encounter the issue caused by this easter egg again, but it did waste a few minutes of my time. I suspect many others encounter a similar issue when they start writing their tests. It's these people's time that I am now trying to save.
Labels: Needs-Bisect Needs-Triage-M67
Cc: edwardjung@chromium.org mmenke@chromium.org
The relevant code seems to be at [1]. Cc'ing OWNERs. Alo a few screenshots would help understand the issue better. When I tried this locally, I get a clear indication of what went wrong and no easter egg AFAICT, see attachement.


[1] https://cs.chromium.org/chromium/src/components/neterror/
net_error.png
39.7 KB View Download
Status: WontFix (was: Unconfirmed)
Note that we only display an error page when we can get no body content from the server we're talking with to display, so view source (Which just shows response bodies) isn't useful in that case.

The easter egg is actually irrelevant here - what we'd be displaying otherwise is a blank page.  If we had literally anything else to display, we'd display it.
When connecting through the selenium chrome driver, the user (a developer) would see the following information when the page can't be loaded:

Title: whatever.com
Source: (see screenshot)

A more useful title: "Failed to load whatever.com"
A more useful source: "<html><body>Failed to load whatever.com: ERR_NAME_NOT_RESOLVED <!-- scripts and css for easter egg goes here --></body></html>"

@mmenke, Chrome shows what renders like an error page but the actual page source is 5000 lines of javascript and CSS; the first indication an error occurred is lost deep within the source; scanning through the source visually is of no value. Selenium does not expose any other information that might be used to communicate it failed to load. No one is suggesting showing a blank page or magically retrieving the source of the real page. In the absence of a page to display, an error makes sense but an easter egg does not. The issue here is that an easter egg is obfuscating the the error.
Screen Shot 2018-07-17 at 1.51.29 PM.png
131 KB View Download
Another screenshot demonstrating how easy it is to get lost in the easter egg code when trying to scrape an actual error.
Screen Shot 2018-07-17 at 2.00.13 PM.png
49.4 KB View Download
That sounds like a selenium driver issue, not an issue with the error page as rendered in Chrome itself.  Contact whoever maintains selenium?
Selenium is just showing what Chrome is giving it via the WebDriver protocol https://www.w3.org/TR/webdriver


The problem is with the error page. 99% of the error page is an easter egg. This is a bug report that the "feature" that is the easter egg is causing problems. There is near-zero reason to keep the easter egg. In the event the easter egg absolutely must remain, move the supporting sources to the bottom of the page; there will be no visible change to end users but developers reading the source can more quickly ascertain what's going on.
I think this should be self-evident, but the error page is designed to be rendered in a Chrome renderer, where there's HTML support.  It's being rendered by non-chrome code in a non-web context, which isn't something the error page supports, or was desinned to support.  I don't think we want to change what we display when end users are actually to Chrome because in non-web compliant contexts, it's ugly.

I don't particularly care about the easter egg (Note that even without it, there's a fair bit of CSS / js just to display the error page itself), I just think that making the source code easy to read so selenium users can extra an error code is a non-goal for the Chrome error page.  The error code is available through navigation-related APIs - if the selenium project wants to provide usable error codes, it should pull them from there.
It is self-evident that the error page is designed to be rendered in Chrome. As far as I can tell, no one is suggesting the page look visually different.

References to requirements of the error page keep coming up but obviously an easter egg is not supported by requirements for that page.

What navigation related API is available to get the HTTP Status code of the current document? What about errors caused by failure to navigate and thus no HTTP status code? I could not find any documentation related to these.

Related stackoverflow questions/answers showing no support
https://stackoverflow.com/questions/22740778/how-to-detect-when-selenium-loads-a-browsers-error-page
https://stackoverflow.com/questions/6509628/how-to-get-http-response-code-using-selenium-webdriver
WebContentsObserver::DidFinishNavigation gets informed of error pages being committed, and is informed for the network error code - it also provides HTTP response headers, when available, from which the HTTP error code can be pulled.

I'm not familiar with Selenium, or the that it depends on, but if it doesn't provide that basic information, I think the issue is either with Selenium or the APIs it uses, not with the contents of the network error page.
Sounds like the options here are:

1. Wait a few years for the W3C protocol standards to evolve to a more useful state
2. Restructure the error page markup (but not rendered output) so the error is more obvious and not lost on line 4500 of 5000
3. Completely remove the easter egg as it serves no purpose
4. Ignore this completely and leave developers frustrated

Sign in to add a comment