I am trying to load this extension as a temporary extension from about:debugging, and reloading the extension causes the error Promise rejected after context unloaded: An unexpected error occurred from background.js to appear in the browser console. Nothing in the extension console. When this occurs, the extension is broken and slows down Firefox. Happens on latest FIrefox release and Developer Edition.
How to fix the extension?
This is the error:
Promise rejected after context unloaded: An unexpected error occurred
background.js:1
setValue moz-extension://1e81cbeb-a409-4cbe-94ac-2d401760dc88/background.js:1
can't access dead object IndexedDB.jsm:99
method resource://gre/modules/IndexedDB.jsm:99
set resource://gre/modules/ExtensionStorageIDB.jsm:243
AsyncFunctionNext self-hosted:807
It seems FirstPartyService.PSL_UPDATE_INTERVAL was undefined due to the order of static definitions.
export class FirstPartyService {
private static INSTANCE = new FirstPartyService();
private static PSL_STORAGE_KEY = "dns.publicSuffixList";
private static PSL_UPDATE_INTERVAL = 1000 * 60 * 60 * 24; // 1 day
to
export class FirstPartyService {
private static PSL_STORAGE_KEY = "dns.publicSuffixList";
private static PSL_UPDATE_INTERVAL = 1000 * 60 * 60 * 24; // 1 day
// This must be at the end of static definitions.
private static INSTANCE = new FirstPartyService();
Is it that accessing too often browser.storage.* causes that errors?