←back to thread

1318 points xvector | 10 comments | | HN request time: 0.443s | source | bottom
Show context
gpm ◴[] No.19824410[source]
To re-enable all disabled non-system addons you can do the following. I am not responsible if this fucks up your install:

Open the browser console by hitting ctrl-shift-j

Copy and paste the following code, hit enter. Until mozilla fixes the problem you will need to redo this once every 24 hours:

    // Re-enable *all* extensions

    async function set_addons_as_signed() {
        Components.utils.import("resource://gre/modules/addons/XPIDatabase.jsm");
        Components.utils.import("resource://gre/modules/AddonManager.jsm");
        let addons = await XPIDatabase.getAddonList(a => true);

        for (let addon of addons) {
            // The add-on might have vanished, we'll catch that on the next startup
            if (!addon._sourceBundle.exists())
                continue;

            if( addon.signedState != AddonManager.SIGNEDSTATE_UNKNOWN )
                continue;

            addon.signedState = AddonManager.SIGNEDSTATE_NOT_REQUIRED;
            AddonManagerPrivate.callAddonListeners("onPropertyChanged",
                                                    addon.wrapper,
                                                    ["signedState"]);

            await XPIDatabase.updateAddonDisabledState(addon);

        }
        XPIDatabase.saveChanges();
    }

    set_addons_as_signed();
Edit: Cleanup up code slightly...
replies(13): >>19824419 #>>19824512 #>>19824757 #>>19824939 #>>19825095 #>>19825736 #>>19826031 #>>19826062 #>>19826188 #>>19826298 #>>19826513 #>>19827530 #>>19829476 #
1. pepa65 ◴[] No.19824419[source]
I just set xpinstall.signatures.required to True in about:config and that fixed it after a restart.
replies(6): >>19824431 #>>19824435 #>>19824436 #>>19824506 #>>19825013 #>>19825177 #
2. TheRealPomax ◴[] No.19824431[source]
but only for dev/beta/nightly. Note that this won't work for the standard version of FF.
3. ddtaylor ◴[] No.19824435[source]
AFAIK that only works for the nighty/dev versions.
4. gpm ◴[] No.19824436[source]
Curious, that shouldn't work on branded stable installs.
replies(1): >>19824816 #
5. drewmol ◴[] No.19824506[source]
For me this is False ;-)
replies(1): >>19824837 #
6. thekyle ◴[] No.19824816[source]
It works on Linux but not Windows or Mac installs. I assume that repo maintainers use different compiler options than the official Firefox binaries.
7. dveditz_ ◴[] No.19824837[source]
Are you using an Extended Support Release (ESR)? That's expected then.
8. brezelben ◴[] No.19825013[source]
Worked for me on Linux, didn't even require a restart (some addons just reappeared immediately). Using Firefox from Ubuntu package management.
9. pfeerick ◴[] No.19825177[source]
I can confirm this on Ubuntu 19.04 with Firefox 66.0.3. Changing xpinstall.signatures.required from the default 'True' to 'False' resulted in addons working again.
replies(1): >>19826143 #
10. kgwxd ◴[] No.19826143[source]
Android too.