New issue
Advanced search Search tips

Issue 626952 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

chrome.storage fails without indication of error after extension update

Reported by ad...@containerchan.org, Jul 10 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36

Steps to reproduce the problem:
1. Create a simple extension to test chrome.storage functionality:

manifest.json:

{
  "name": "test extension",
  "version": "0.0.0.1",
  "manifest_version": 2,
  "content_scripts": [{
    "matches": ["*://www.example.com/*"],
    "js": ["script.js"]
  }],
  "permissions": [
    "storage",
    "*://www.example.com/*"
  ]
}

script.js:

chrome.storage.local.set({'key': 'value'});

document.body.addEventListener('click', function() {
  try {
    chrome.storage.local.get('key', function(items) {
      alert('callback invoked');
      alert(items['key']);
    });
  } catch(err) {
    alert('exception thrown');
    alert(err);
  }
}, false);

2. Open http://www.example.com/.

3. Observe that clicking anywhere on the page results in alerts showing 'callback invoked' and 'value', as expected.

4. Update the extension by pressing the reload button on chrome://extensions/. (Note: The same behavior occurs when updates are downloaded through the normal update process.)

5. Without reloading, click on the page again.

What is the expected behavior?
Either the call to chrome.storage.local.get should succeed, causing the same alerts as before updating the extension, or it should fail, still invoking the callback, but setting runtime.lastError.

What went wrong?
Observed behavior: Nothing happens. The callback is not invoked, and no exception is thrown.

WebStore page: 

Did this work before? No 

Chrome version: 51.0.2704.79  Channel: n/a
OS Version: 
Flash Version: 

Previously reported in
https://bugs.chromium.org/p/chromium/issues/detail?id=331059
but that issue is archived now.

Calling the set method after an update has similar behavior. The callback is not invoked, no exception is thrown, and no data is written to storage.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Jul 11 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment