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

Issue 678470 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 729793
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: 2017-01-30
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Chrome devtools for IndexedDB showing wrong/stale data

Reported by vishal.s...@weather.com, Jan 5 2017

Issue description

Chrome Version       : 55.0.2883.95 (64-bit)
URLs (if applicable) : N/A
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: 
    Firefox:
         IE:

What steps will reproduce the problem?
(1) The chrome dev tools ---> Application tab --> IndexedDB --> data being displayed is incorrect. It continues to show wrong / stale data even after clicking the refresh button on the IndexedDB tab. Even reloading the page did not refresh the display. The correct value is shown when using the extension - https://chrome.google.com/webstore/detail/html5-storage-manager-all/giompennnhheakjcnobejbnjgbbkmdnd
(2) 
(3)

What is the expected result?


What happens instead?


Please provide any additional information below. Attach a screenshot if
possible.

 
ChromeExtensionShowingCorrectValues.jpg
356 KB View Download
ChromeDevToolsIssue.jpg
147 KB View Download
Components: Blink>Storage>IndexedDB
Labels: Needs-Triage-M55
Components: Platform>DevTools
Labels: Needs-Feedback
Is the mismatch in the "user" field? e.g. provider:anon vs. provider:wx and the rmid/anonId values?

I note in the extension screenshot that it's inspecting Storage / Local Storage, not Indexed DB - is that relevant? Are you sure you're inspecting what's actually stored in Indexed DB with the extension?

Do you have any steps to reproduce the problem?



Comment 4 by jsb...@chromium.org, Jan 23 2017

NextAction: 2017-01-30
Yes specifically the provider:anon vs provider:wx

The extension is supposed to show the IndexedDB data. The indexedDB tab is in BETA so it shows it under the tab that we see in the screenshot. Is there a way to query the value in IndexedDB using any Javascript API to validate what the Dev tools is showing is actually what is in there? I can try running that on the dev console the next time I see the issue happen again.

I cannot reproduce this issue at will to be able to provide the steps.

Comment 6 Deleted

Comment 7 by jsb...@chromium.org, Jan 23 2017

Given what I can glean from the screenshot, you'd query it with:

indexedDB.open('twc-web').onsuccess = e => {
  const db = e.target.result;
  const tx = db.transaction('redux');
  tx.objectStore('redux').openCursor().onsuccess = e => {
    const cursor = e.target.result;
    if (cursor) {
      console.log(cursor.key, cursor.value);
      cursor.continue();
    }
  };
};
Thanks for the response.. I tried running this on the dev tools console but it did not log anything for me.. It just printed the code inside the onsuccess handler. Please see the attached screenshot. Did you intend for me to run this on chrome dev tools console?
IndexedDB-Code-Console.jpg
132 KB View Download

Comment 9 by jsb...@chromium.org, Jan 26 2017

Yes, you'd run it on the console. Since not even the console.log('cursor', cursor) is printing anything something strange is going on. Try:

indexedDB.open('twc-web').onsuccess = e => {
  console.log('opened');
  const db = e.target.result;
  const tx = db.transaction('redux');
  console.log('created tx');
  const request = tx.objectStore('redux').openCursor();
  request.onerror = e => {
    console.warn(request.error); 
  };
  request.onsuccess = e => {
    console.log('success');
    const cursor = e.target.result;
    console.log('cursor',cursor);
    if (cursor) {
      console.log(cursor.key, cursor.value);
      cursor.continue();
    }
  };
};

Thanks! I was able to figure out the issue with the console logs not working. I am able to get the IndexedDB values using this snippet now.
Owner: eostroukhov@chromium.org
Status: Assigned (was: Unconfirmed)
Now that you're seeing the values via the logs, are you still seeing a mismatch between what's in the database and what devtools reports even after refresh?
I'm seeing some stale data myself.  I'm afraid I don't have a reduced test case yet, but in case it helps, here's what I know:

I have an app that does a bunch of reads and writes on reload.  If I delete the database and reload, I see nothing in the dev tools [as expected].  I refresh the database view, and then the correct data appears.  Subsequent reloads do more reads and writes to the database, but refreshing after that shows no changes.  Closing the dev tools and reopening them will show the updated data.

Ah, more info: if I load, refresh, look at objectStore 1, then reload, refresh, then look at objectStore 2, I see the right data in each at the time I looked.  The first time I look at a table, I see what I should, and then it never updates after that until I close the dev dools.  So after the above sequence, I'm seeing old data from objectStore 1 alongside new data from objectStore 2.
I'm on Version 59.0.3071.47 (Official Build) beta (64-bit) on Linux, BTW.
Mergedinto: 729793
Status: Duplicate (was: Assigned)

Sign in to add a comment