Web-extension open url on addon install works fine on Opera and Chrome but fails on Firefox?

The following web-extension code in my background script background.js works fine on Opera and Chrome triggering appropriate webpage on Install, Update and Uninstall but does nothing in firefox. The same is shown as compatible here - https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/onInstalled

Manifest.json has:

"background" : {
    "scripts" : ["includes/background.js"]
},

background.js has :

//CHECK INSTALL, UPDATE, UNINSTALL
chrome.runtime.onInstalled.addListener(function (details) {
    if (details.reason == "install") {
        chrome.tabs.create({
            url : "https://www.example.com/install.html"
        });
    }

    if (details.reason == "update") {
        chrome.tabs.create({
            url : "https://www.example.com/update.html"
        });
    }
});

chrome.runtime.setUninstallURL("http://www.example.com/uninstall.html");

There is no error in console, I am loading extension from about:debugging#addons.

EDIT: Just found that removing addon from the about:addons triggers the uninstall-page, still no luck with install and update trigger. Can it be the fact that Install is not triggered when in Debug mode!!

Found the solution at stackoverflow - https://stackoverflow.com/questions/43030505/web-extension-opening-url-on-addon-install-works-fine-on-opera-and-chrome-but-fa#comment73162376_43030505, thanks to Makyen, the event is not fired for temporary add-ons.

2 Likes