Closed Bug 1038695 Opened 6 years ago Closed 6 years ago

Firefox developer tools only shows one request cookie

Categories

(DevTools :: Netmonitor, defect)

31 Branch
x86_64
All
defect
Not set
normal

Tracking

(firefox31 wontfix, firefox32 fixed, firefox33 fixed, firefox34 fixed, firefox-esr31 wontfix, firefox59 verified, firefox60 verified)

VERIFIED FIXED
Firefox 34
Tracking Status
firefox31 --- wontfix
firefox32 --- fixed
firefox33 --- fixed
firefox34 --- fixed
firefox-esr31 --- wontfix
firefox59 --- verified
firefox60 --- verified

People

(Reporter: kennethjohnsen, Assigned: jryans)

Details

Attachments

(2 files)

Attached image Cookies.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release)
Build ID: 20140710141843

Steps to reproduce:

Open developer tools (on network tab).
Go to f.ex. www.mozilla.org
Click on first request (Get /)
Click Cookies tab


Actual results:

Only one cookie shown (__utma).


Expected results:

More cookies should be shown.
Firebug and Web developer extensions both show more cookies.
Attached a screenshot of difference between Developer tools and Firebug.
Uninstalled FF 31 and installed FF 30.
FF 30 correctly shows all cookies.
QA Whiteboard: [bugday-20140721]
Component: Untriaged → Developer Tools: Netmonitor
Assignee: nobody → jryans
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Windows 7 → All
Victor, the refactoring in bug 989417 (landed in 31) accidentally changed the behavior of NetworkDetailsView's |_addCookies|[1].  It was changed from an |map| callback (where return continues) to a for loop (where return aborts the loop).  Easy to miss this sort of thing.

I've fixed this up, and added some cookie tests.  Assuming it looks good, I'll request uplift approvals (though we may just be without cookies for 31 at this point).

Try: https://tbpl.mozilla.org/?tree=Try&rev=455d8990dc68

[1]: http://hg.mozilla.org/mozilla-central/rev/b98c0f82c792#l2.370
Attachment #8460995 - Flags: review?(vporof)
Comment on attachment 8460995 [details] [diff] [review]
Show all cookies in Net Monitor, not just first

Review of attachment 8460995 [details] [diff] [review]:
-----------------------------------------------------------------

amaze

::: browser/devtools/netmonitor/netmonitor-view.js
@@ +2286,5 @@
>        // By default the cookie name and value are shown. If this is the only
>        // information available, then nothing else is to be displayed.
>        let cookieProps = Object.keys(cookie);
>        if (cookieProps.length == 2) {
> +        continue;

wat
Attachment #8460995 - Flags: review?(vporof) → review+
Please let's backport this on aurora/beta.
https://hg.mozilla.org/mozilla-central/rev/da245ed891f5
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Comment on attachment 8460995 [details] [diff] [review]
Show all cookies in Net Monitor, not just first

Approval Request Comment
[Feature/regressing bug #]: Issue caused by refactoring in bug 989417
[User impact if declined]: DevTools Network tab will only show the first cookie, not all of them, which is quite misleading
[Describe test coverage new/current, TBPL]: Tests added in patch, on m-c currently
[Risks and why]: Low, at worst something is still wrong in the Network tab
[String/UUID change made/needed]: None
Attachment #8460995 - Flags: approval-mozilla-beta?
Attachment #8460995 - Flags: approval-mozilla-aurora?
Attachment #8460995 - Flags: approval-mozilla-beta?
Attachment #8460995 - Flags: approval-mozilla-beta+
Attachment #8460995 - Flags: approval-mozilla-aurora?
Attachment #8460995 - Flags: approval-mozilla-aurora+
Flags: in-testsuite+
QA Whiteboard: [bugday-20140721] → [bugday-20140721][good first verify]
I have Reproduced this bug with Firefox 59.0b6 on Windows 7, (32-bit)

Steps to reproduce:

1) Opened the developer tools (on network tab).
2) Go to any websites like -> https://www.mozilla.org/en-US/
3) Clicked on the first request (Get /)
4) Clicked on the Cookies tab

Actual Results: 

It shows all the cookies, Same as Webdeveloper Extensions ->[view Cookie Information] 

Status: Fixed & Verified

FirefoxVersion: 59.0b6
Build ID: 20180201171410
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:59.0) Gecko/20100101 Firefox/59.0
OS: Windows_NT 6.1

[testday-20180202]
I have Tried to Reproduce this same bug with Firefox 59.0b10 on Windows 7, (32-bit)

The bug Has been fixed 

[Steps to reproduce:]

1) Go to any websites like -> https://www.mozilla.org/en-US/
2) Open Tools -> Web Developer -> Network or Press "Ctrl+Shift+E" to Open the Network Monitor
3) Now "Reload" the Same Page, So you can get Request Logs of the Same page in the Network monitor.
4) After that Click on the first request logs (Get /) and it will Opensup the sidebar with Headers, Cookies, Params, Response,Timing, Stack trace,Security.
5) In that Click on Cookies tab.

Actual Results: 

It shows all the cookies, Same as Web developer Extensions ->[view Cookie Information] 

Status: Fixed & Verified

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180215111455
Firefox Version:59.0b10

[testday-20180216]
According to the results from comment 10 and I verified the fix on Windows 10 x64, Ubuntu 16.04 x64 and macOS 10.13, too, I will mark this bug as fixed.
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.