Add on working in nightly, but not working in current - Firefox 71

Hi there!

I am working on the FlagCookies Add-on and I receive the following error, when trying to change webpage settings in particular “Auto-flag” and “Profile” modes, once they are enabled, to disable and remove the webpage setting from local strorage.

The following error occurs, when tried to be disabled and changed, in Firefox 71.0.1.

The debug page receives the following error when those two options are enabled and tried to be disabled:

ConstraintError: A mutation operation in the transaction failed because a constraint was not satisfied. [ExtensionStorageIDB.jsm:812](resource://gre/modules/ExtensionStorageIDB.jsm)

normalizeStorageError resource://gre/modules/ExtensionStorageIDB.jsm:812

method chrome://extensions/content/child/ext-storage.js:273
AsyncFunctionThrow self-hosted:695

In nightly there is no such error so.
In nailed it down in my code, which is working fine in nightly. Which causes this issue, in particular a browser.storage.local.set.

Heres a cut of the function, “flagCookies.js” line 1094 to 1112:

async function flagAutoSwitchNeutral (data, evt) {
  if (data['flagCookies_autoFlag'] === undefined) data['flagCookies_autoFlag'] = {}
  if (data['flagCookies_autoFlag'][contextName] === undefined) data['flagCookies_autoFlag'][contextName] = {}
  if (!evt.target.classList.contains('active')) {
    data['flagCookies_autoFlag'][contextName][domainURL] = true
    if (useChrome) setChromeStorage(data)
    else await browser.storage.local.set(data)

    evt.target.classList.add('active')
    switchAutoFlag(true, '#cookie-list')
  } else {
    delete data['flagCookies_autoFlag'][contextName][domainURL]

    if (useChrome) setChromeStorage(data)
    else await browser.storage.local.set(data)
    evt.target.classList.remove('active')

    switchAutoFlag(false, '#cookie-list')
  }
}

What is broken is the part else await browser.storage.local.set(data)
As mentioned, this does not happen in Nightly build.

Any feedback would be appreciated, as my addon is losing a lot of users because the addon does not work anymore as expected.

Feedback and help is much appreciated.

Regards
Jan

Hi @_uniqs , sorry to hear about this. :frowning: Could you file an issue on Bugzilla under WebExtensions:Storage so the engineering team can take a closer look?