Network monitor params plain text

RESOLVED FIXED in Firefox 67

Status

defect
P3
normal
RESOLVED FIXED
6 months ago
4 months ago

People

(Reporter: reachrammy, Assigned: hemakshis, Mentored)

Tracking

({good-first-bug})

64 Branch
Firefox 67

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: good-first-bug)

Attachments

(1 attachment, 1 obsolete attachment)

Reporter

Description

6 months ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:64.0) Gecko/20100101 Firefox/64.0

Steps to reproduce:

1.Open the network monitor.
2. Make a POST request with JSON Body. 
3. Go to Params Tab.
4. I want to copy the post body but it is displayed as JSON but no text view. 


Actual results:

I copied and pasted to external text editor and I dont get to paste the content completely. 


Expected results:

How the response has a plain text view, Params should also have plain text view.
Component: Untriaged → Netmonitor
Product: Firefox → DevTools

Thanks for the report! I can reproduce that on my machine.


Some instructions for anyone interested in fixing this:

  1. Here is the place where the panel content is generated:
    https://searchfox.org/mozilla-central/rev/76fe4bb385348d3f45bbebcf69ba8c7283dfcec7/devtools/client/netmonitor/src/components/ParamsPanel.js#139

  2. It looks like both JSON_SCOPE_NAME and PARAMS_POST_PAYLOAD should be used.

  3. We need a test for this, look e.g. here:
    https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_post-data-02.js

Honza

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: good-first-bug
Priority: -- → P3
Whiteboard: good-first-bug
Assignee

Comment 2

5 months ago

Hi @honza

I would like to take up this issue. Just need some help in reproducing it (a way to make a dummy JSON post request).

Thank you!
Hemakshi

Flags: needinfo?(odvarko)

(In reply to Hemakshi Sachdev [:hemakshis] she/her from comment #2)

I would like to take up this issue. Just need some help in reproducing it (a way to make a dummy JSON post request).

I create a simple test page here:
http://janodvarko.cz/tests/bugzilla/1514750/

Click the button on the page to generate JSON POST request.

Thanks!
Honza

Assignee: nobody → sachdev.hemakshi
Mentor: odvarko
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)
Assignee

Comment 4

5 months ago
Posted file Bug #1514750 - First Commit (obsolete) —

The current changes, shows the JSON Body in a plain text view in the Params Panel

Assignee

Comment 5

5 months ago

I think this test resembles more to our requirements. What do you think?

Assignee

Updated

5 months ago
Flags: needinfo?(odvarko)

There are some failures on Try when I apply your patch:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d82abe47a8379a74f2ac7162a493c3be164f76e&selectedJob=226181532

Probably just related to the UI change.

(In reply to Hemakshi Sachdev [:hemakshis] she/her from comment #5)

I think this test resembles more to our requirements. What do you think?

Yep, looks like we should adopt it to test that the JSON plain text is there.

Honza

Flags: needinfo?(odvarko) → needinfo?(sachdev.hemakshi)
Assignee

Comment 7

4 months ago

(In reply to Jan Honza Odvarko [:Honza] (need-info? me) from comment #6)

There are some failures on Try when I apply your patch:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d82abe47a8379a74f2ac7162a493c3be164f76e&selectedJob=226181532

Probably just related to the UI change.

So to resolve these failures we need to change the tests...? * I guess *

Flags: needinfo?(sachdev.hemakshi) → needinfo?(odvarko)

(In reply to Hemakshi Sachdev [:hemakshis] she/her from comment #7)

So to resolve these failures we need to change the tests...? * I guess *
Yes

Honza

Flags: needinfo?(odvarko)
Attachment #9039574 - Attachment is obsolete: true

This is ready to land, thanks!
Honza

Assignee

Comment 11

4 months ago

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #10)

This is ready to land, thanks!
Honza

Thank you :)

So, what should be the next step? Should I add a checkin-needed keyword or something in Phabricator?

Flags: needinfo?(odvarko)

I just landed that manually through Phabricator.

Honza

Flags: needinfo?(odvarko)

Comment 13

4 months ago
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ced3fcdd37c
Show JSON POST payload as plain text view also. r=Honza
Assignee

Comment 14

4 months ago

Cool! Thank you so much :)

Hemakshi

Comment 15

4 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.