Closed Bug 1755220 Opened 2 years ago Closed 2 years ago

Cookies are not updated in Storage Inspector for Private Browsing windows

Categories

(DevTools :: Storage Inspector, defect, P3)

Unspecified
All
defect

Tracking

(firefox-esr91 wontfix, firefox97 wontfix, firefox98 wontfix, firefox99 wontfix, firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- fixed

People

(Reporter: astrothayne, Assigned: nchevobbe)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

Open a new "Private window".
Open a website.
Open dev tools and inspect cookies for the domain.
Press the "+" button to add an item, or right click and select "Add Item"

Actual results:

Nothing.

Expected results:

A new Cookie should have been added, like it does in a normal non-private window.

The Bugbug bot thinks this bug should belong to the 'Firefox::Private Browsing' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Private Browsing

Reproducible on Firefox 97 and Firefox Nightly 99.0a1

Although I'm not entirely sure if this should work in private window-mode or not I'm setting a component in order to get the development team involved in reviewing it.

Thank you for reporting!

Status: UNCONFIRMED → NEW
Component: Private Browsing → Storage Inspector
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → DevTools
Version: Firefox 96 → Trunk

If it shouldn't work in private window mode, then the UI for it should probably be disabled right?

Flags: needinfo?(jdescottes)
Whiteboard: [devtools-triage]

Adding a cookie in Private Browsing windows actually "works", but the UI is not updated.
If you close and reopen DevTools you will see a new cookie was created.
Same thing if you keep devtools open and navigate away and then back.

And it doesn't seem to be specific to using the Add button in the UI. If you dynamically add a cookie from JS (eg document.cookie = "sc1=foobar;";) it will also not update the storage table.

Flags: needinfo?(jdescottes)
Summary: Add Item does not work in cookie inspector in private mode → Cookies are not updated in Storage Inspector for Private Browsing windows

Nicolas to track down why we are missing updates for Private Browsing Windows

Flags: needinfo?(nchevobbe)
Flags: needinfo?(nchevobbe)
Whiteboard: [devtools-triage]

We only listen for cookie-changed (devtools/server/actors/storage.js#1139), but in private mode, the topic is private-cookie-changed, so we miss cookies update in private windows.
Not sure if we have other things to consider, but https://phabricator.services.mozilla.com/D141970 fixes issue from Comment 0

Severity: -- → S3
Priority: -- → P3
Assignee: nobody → nchevobbe
Attachment #9269243 - Attachment description: WIP: Bug 1755220 - [devtools] Observe private-cookie-changed in storage actor. → Bug 1755220 - [devtools] Observe private-cookie-changed in storage actor. r=jdescottes.
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7563df479749
[devtools] Observe private-cookie-changed in storage actor. r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Attachment #9269801 - Attachment description: WIP: Bug 1755220 - [devtools] Fix add test second param in browser_storage_cookies_add.js. → Bug 1755220 - [devtools] Fix add test second param in browser_storage_cookies_add.js.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a1f3a4b91db7
[devtools] Fix add test second param in browser_storage_cookies_add.js.
See Also: → 1856645
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: