Closed Bug 1268844 Opened 5 years ago Closed 4 years ago

Session storage items added live can't be deleted

Categories

(DevTools :: Storage Inspector, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ntim, Assigned: miker)

References

Details

STR:
- Open split console and storage inspector at the same time
- Select the domain listed under Session Storage
- Make sure the table is already empty, if not, empty it, reopen the storage inspector and reselect session storage
- Type sessionStorage.setItem("foo","bar") in the console
- See the item appear live in the inspector
- Right click on it, and click on "Remove "foo""


AR:
- the item does not delete

ER:
- It should delete
Blocks: 1231437
No longer blocks: 1031192
Tim, I can't reproduce this bug - the storage item that is live-added can always be deleted. Sometimes, it doesn't appear in the table (see below), but if it appears, it can be deleted.

Could you provide a more precise STR? Specifically, when this happens to you, does the table have the "Key", "Value" headers? And are there any errors in the browser console?

If the list of storage items fetched from server is empty, then the storage table is not correctly initialized - that's bug 1264582. There might be some interplay between these two bugs.
Blocks: 1031192
No longer blocks: 1231437
Flags: needinfo?(ntim.bugs)
Blocks: 1231437
No longer blocks: 1031192
(In reply to Jarda Snajdr [:jsnajdr] from comment #1)
> Tim, I can't reproduce this bug - the storage item that is live-added can
> always be deleted. Sometimes, it doesn't appear in the table (see below),
> but if it appears, it can be deleted.
I can delete it using the "Delete all" item, but not with the "Delete "name"" item.

> Could you provide a more precise STR? Specifically, when this happens to
> you, does the table have the "Key", "Value" headers? And are there any
> errors in the browser console?
I think comment 0 has the most precise STR I can provide.
The item appears properly, but it seems like the Storage inspector uses the last set of columns (if you've navigated to cookies, you'll get the cookie headers). 
I get this error:

Protocol error (unknownError): can't convert undefined to object
StorageUI.prototype.fetchStorageObjects<()   ui.js:454
    try {
      let {data} = yield storageType.getStoreObjects(host, names, fetchOpts);
      if (data.length) {
        if (reason === REASON.POPULATE) {
          yield this.resetColumns(data[0], type, host);
        }
        this.populateTable(data, reason);
      }
      this.emit("store-objects-updated");
    } catch (ex) {
      Cu.reportError(ex); <-- The error is logged from there
    }
> If the list of storage items fetched from server is empty, then the storage
> table is not correctly initialized - that's bug 1264582. There might be some
> interplay between these two bugs.
I'm guessing it's bug 1264582 (by the looks of the error log).
Flags: needinfo?(ntim.bugs)
I can reproduce this:
Full message: TypeError: can't convert undefined to object
Full stack: getNamesForHost@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/storage.js:971:14
StorageActors.defaults/<.onWindowReady<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/storage.js:178:22
TaskImpl.prototype._run@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:311:39
TaskImpl.prototype._handleResultValue@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:392:7
TaskImpl.prototype._run@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:319:13
TaskImpl@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:273:3
createAsyncFunction/asyncFunction@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:247:14
emitOnObject@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:112:9
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:89:38
observe@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/storage.js:2160:7
This is another way to trigger bug 1264582 so I will mark it as a prerequisite.

Filter under Floccinaucinihilipilification
Depends on: 1264582
Priority: -- → P3
@ntim: I can't reproduce this... is it now working for you?
Flags: needinfo?(ntim.bugs)
It now works fine for me. I'm guessing bug 1264582 fixed it.
Flags: needinfo?(ntim.bugs)
Assignee: nobody → mratcliffe
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.