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

**URL:** <https://discourse.mozilla.org/t/web-extension-open-url-on-addon-install-works-fine-on-opera-and-chrome-but-fails-on-firefox/14670>\
**Category:** Development\
**Created:** [March 27, 2017, 5:18am UTC](https://discourse.mozilla.org/t/web-extension-open-url-on-addon-install-works-fine-on-opera-and-chrome-but-fails-on-firefox/14670 "2017-03-27T05:18:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dishita](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/dishita/32/71755_2.png) [@dishita](https://discourse.mozilla.org/u/dishita)\
**Post date:** [March 27, 2017, 5:18am UTC](https://discourse.mozilla.org/t/web-extension-open-url-on-addon-install-works-fine-on-opera-and-chrome-but-fails-on-firefox/14670/1 "2017-03-27T05:18:24Z")

</div>

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](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!!

---

<div class="post-metadata">

**Author:** ![dishita](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/dishita/32/71755_2.png) [@dishita](https://discourse.mozilla.org/u/dishita)\
**Post date:** [March 27, 2017, 5:58am UTC](https://discourse.mozilla.org/t/web-extension-open-url-on-addon-install-works-fine-on-opera-and-chrome-but-fails-on-firefox/14670/2 "2017-03-27T05:58:18Z")

</div>

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](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.
