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

Issue 773654 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

The "preview" tab no longer works for responses with a custom media-type ending in "+json"

Reported by exh...@gmail.com, Oct 11 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. Open the Developer tools "Network" tab
2. Open a web-page which makes a request to a resource which returns a content type like "foo/bar+json"
3. On the given request, open the "Preview" tab

What is the expected behavior?
The preview should show the output as JSON (formatted & collapsible)

What went wrong?
The output is now shown as binary blob forcing us to use the "Response" tab which is not pretty-printed (see also #668492).

Ref 668492: https://bugs.chromium.org/p/chromium/issues/detail?id=668492

Did this work before? Yes Chrome 60 (I *think*)

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 27.0 r0

As far as I know the "+json" extension in media-types is not something officially mentioned in either the RFCs or IANA registry. But it is still a very common concept (also counts for "+xml" extension and others).

It seems Chrome now only detects "application/json" as JSON document, which is quite unfortunate.
 

Comment 1 by ajha@chromium.org, Oct 11 2017

Labels: Needs-Bisect Needs-Triage-M61

Comment 2 by woxxom@gmail.com, Oct 11 2017

Might be a duplicate of  issue 767393  fixed in Chrome 62.

Comment 3 by exh...@gmail.com, Oct 11 2017

I am not so sure if it's a duplicate of #767393. I've had a look at it, but in that issue, the JSON is still visible in plain-text. In our case, the document is shown as a binary blob. I've attached some screenshots.

Further investigation has shown that running "atob" on the value in the "Preview" tab returns a string value with the JSON document.
Screenshot_22.png
23.0 KB View Download
Screenshot_23.png
3.5 KB View Download
Screenshot_24.png
3.7 KB View Download
Cc: sc00335...@techmahindra.com allada@chromium.org
Components: -Platform>DevTools Platform>DevTools>Network
Labels: Triaged-ET Needs-Feedback
@Reporter: Could you provide sample URL on which you are seeing this issue. This would help in further triaging from chrome TE end.

Adding proper component and cc'ing  allada@ from  Issue 767393  for more inputs on this.

Thanks!!

Comment 5 by exh...@gmail.com, Oct 15 2017

I've spun up a small example at http://146.185.179.170:8080/

If you load the page, open the dev-tools and reload it, you should see a request made to "/data" which demonstrates the issue.

I can't promise that I will keep this running indefinitely. I will try to keep it up until the issue is confirmed.

The code which is running can be seen here: https://gist.github.com/exhuma/55874884bcd3174cd3375c3281dc745b


This code should also be easily runnable locally (as explained in the gist link).


Project Member

Comment 6 by sheriffbot@chromium.org, Oct 15 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: susanjuniab@chromium.org
Labels: Needs-Feedback
exhuma@ Thanks for the feedback.

Tested the issue on Windows 7 and Mac OS 10.12.6 on the latest Canary 63.0.3239.1 and Stable 61.0.3163.100 with the below steps.

1. Launched Chrome and navigated to https://groups.google.com/forum/#!topic/google-chrome-developer-tools/zaphAp4r8zo (as mentioned in  issue 767393 ).
2. Opened Devtools -> Network. Reloaded the page and clicked on json file.
3. Could observe that the output is not in binary. Attached are the screenshots for reference. 

Note:- As mentioned in comment #5, on the running the index.html file, couldn't find any json files in devtools->Network. Hence tested this issue using the example provided in  issue 767393 .

Can you please check and confirm if this is the issue or is anything missed from our end.

Thankjs..
773654.png
135 KB View Download
773654-1.png
108 KB View Download

Comment 8 by alph@chromium.org, Oct 16 2017

Labels: -Needs-Feedback -Needs-Bisect
Owner: eostroukhov@chromium.org
Status: Assigned (was: Unconfirmed)
Thank you for detailed repro scenario and the testcase!

I bisected it to https://chromium.googlesource.com/chromium/src/+log/8bf722464b7361247ffaada42c179c6912c4125d..147b1c8545c7b989df376d455642c47e01f40c22

Where "[DevTools] Introduce a reusable preview factory" seems to be the culprit https://chromium.googlesource.com/chromium/src/+/147b1c8545c7b989df376d455642c47e01f40c22

Comment 9 by alph@chromium.org, Oct 16 2017

Labels: M-64 M-63

Comment 10 by alph@chromium.org, Oct 16 2017

Cc: ranjitkan@chromium.org
 Issue 774135  has been merged into this issue.
Owner: allada@chromium.org
This is fixed in 64.
Owner: eostroukhov@chromium.org
Status: Fixed (was: Assigned)
This issue has been marked as fixed but has still not landed in Chrome. Neither in Canary 69 nor Chromium 69.

Can you please have a quick look into the issue again? Maybe it was forgotten or the patch is not working properly?

Sign in to add a comment