Closed Bug 1331179 Opened 7 years ago Closed 7 years ago

storage.sync API error: "Please set webextensions.storage.sync.enabled to true in about:config"

Categories

(WebExtensions :: Compatibility, defect)

52 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: robwu, Unassigned)

References

Details

Bug 1253740 introduced the browser.storage.sync API, behind a flag.

Unfortunately, the browser.storage.sync API is exposed even when the API is disabled:

    var storage = chrome.storage.sync || chrome.storage.local;
    // Used as storage.set(...), storage.get(...), etc.

The above code assumes that chrome.storage.sync is functioning when it is defined. This appears to not be the case, and as a result the extension loses its ability to persist settings, and all storage.sync.* API calls fail with "Please set webextensions.storage.sync.enabled to true in about:config":

Can the chrome.storage.sync API be hidden unless the flag is enabled?
Or, treat chrome.storage.sync as chrome.storage.local (distinct from the actual storage of chrome.storage.local) when the browser does not sync (just like Chrome).
Flags: needinfo?(amckay)
Given that we are about to flip this pref on and turn on chrome.storage.sync by default, in bug 1331467, I don't think we need to worry about this.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(amckay)
Resolution: --- → WONTFIX
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.