New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 778581 link

Starred by 6 users

Issue metadata

Status: Duplicate
Merged: issue 785050
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Preview tab no longer parses and pretty prints HTML

Reported by ni...@getmarvia.com, Oct 26 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.62 Chrome/62.0.3202.62 Safari/537.36

Steps to reproduce the problem:
1. Create XHR request with HTML response (in my case a symfony2 dump() used for debugging)
2. Open said XHR request in the network tab
3. Preview shows the same as the Response tab

What is the expected behavior?
The HTML should be parsed and it should be pretty printed.
This worked in 60, in 61 it was no longer pretty printed. In 62 it no longer parses the HTML.

What went wrong?
HTML not being parsed and pretty printed.

Did this work before? Yes 60

Chrome version: 62.0.3202.62  Channel: stable
OS Version: 
Flash Version:
 
Screenshot from 2017-10-26 11:43:03.png
22.6 KB View Download
Labels: Needs-Triage-M62
niels@, thank you for the report. Can you please attach a repro case?

Comment 2 by ni...@getmarvia.com, Oct 27 2017

Example output of the preview tab v62
after in v62.png
168 KB View Download

Comment 3 by ni...@getmarvia.com, Oct 27 2017

This is what the preview tab used to show in v60
before in v60.png
40.6 KB View Download
Cc: sc00335...@techmahindra.com
Components: -Platform>DevTools Platform>DevTools>Network
Labels: Triaged-ET Needs-Feedback
Unable to reproduce this issue on reported verison 64.0.3202.62 using Ubuntu 14.04 with steps mentioned below. Attaching screencast of same.

1.Opened devtools >> Naviagted to Network tab
2.Selected XHR from filter section.
3. Reloaded tab and clicked on network entry. 

@Reporter: Could you please send us the sample URL or test file where we can find XHR request with HTML response. That would help us in further triaging of the bug.

Thanks!
Issue 778581-1.ogv
2.2 MB View Download

Comment 5 by dema...@gmail.com, Oct 30 2017

 Test case : 

Go to : https://www.test-cors.org/#?client_method=GET&client_credentials=false&server_url=google.be&server_enable=true&server_status=200&server_credentials=false&server_tabs=remote

This site make a xhr request to google.be

chrome 60.0.3112.78 the 'preview tab' show parsed html
chrome 63.0.3239.18 the preview tab show raw html

Please see the attached screenshot.



chrome.63.0.3239.18.KO.PNG
24.0 KB View Download
chrome.60.0.3112.78.OK.PNG
25.1 KB View Download
Owner: eostroukhov@chromium.org
Status: Assigned (was: Unconfirmed)
Status: WontFix (was: Assigned)
This is working as intended. 

Comment 8 by dema...@gmail.com, Nov 1 2017

I do not understand,  so what is the difference between the 'preview' and 'response' tab ? 

The 'preview' is not supposed to parse the html ? 

(sorry for my bad English ;-)
@eostroukhov@chromium.org
Could you give an explanation how this is working as intended? In my opinion the preview tab should show a preview of the response html, which was working in v60.

Why did this change in later releases?
@eostroukhov@chromium.org
Could you explain why this is working as intended?

Modern PHP frameworks like Symfony, Laravel and CakePHP give an HTML response when an error occurs during an XHR request. Now they are simply unreadable as the preview tab shows the html as text instead of a rendered preview of the response. I reckon more developers are affected by this.

Now since the status of this issue is set to WontFix, it would be fair to at least get an explanation as to why this issue is "working as intended".
This is NOT working as intended. The Preview tab should *RENDER* the HTML. Otherwise what is the point of a Preview and a Response tab?
For test case:

1. Open Dev Tools
2. Go to Network Panel
3. Load google.com
4. Click the "www.google.com" request and select Preview tab
5. Code is displayed instead of a rendered view of the page that should match the main browser window

Comment 13 by knu...@gmail.com, Nov 28 2017

I agree with reporters here, this should not be a wontfix. The preview-tab isn't very helpful now. The problem is caused by this line:

https://github.com/ChromeDevTools/devtools-frontend/blob/5dc575d83180380aa3dfd9c611f2c1edff0bf243/front_end/network/RequestPreviewView.js#L64

So if the respons is NOT an error, chrome refuses to render it as HTML even if it is HTML.

In my opinion, devtools should try to preview html if response has content-type text/html. Regardless of http status.
Mergedinto: 785050
Status: Duplicate (was: WontFix)

Sign in to add a comment