Add-on only works once when enabled or reloaded

Hello,

I am currently developing an add-on for Fire Fox. Apparently, my add-on only works on pages that are being opened at the time the add on is installed, reloaded or enabled. The add on does not work on pages opened afterward, even if they are the exact same pages as the one where the add-on functions correctly. The only way to make it work again is to re-install the add on, disable and re-enable it or reload the extension (using about:debugging) while the desired pages are opened.

For example, if I go to gmail and install the add-on while the page is open, the add-on will work on that particular page. If I open another tab and go to the exact same url, the add-on will not work.

The add-on is originally a Chrome extension, ported to Firefox. It works fine in Chrome, and does not seem to have any issues working in Firefox when it is working properly. Hence, I assume that this is a bug caused by the Firefox browser.

I would like to verify my hypothesis. Has anyone encountered this bug? What can I do to resolve this issue?

This is not a general issue with Firefox.

If you want more help, you need to be more specific than

The add on does not work

What do you want to do, which errors do you get, are the scripts run a all (check the debugger on the page, same as in chrome), are you able to set breakpoints at the first statements of those files, if not, what happens if you place log statements there, …

Hi,

Thank you for the reply.

Apparently, there was one javascript function (prototype) which only runs at the time the add-on is installed or enabled.

Luckily, the new Firefox 55 release this week seems to have fixed the problem.