Install addons permanently from about:debugging
Categories
(DevTools :: about:debugging, defect, P2)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
(Keywords: dev-doc-needed)
Attachments
(2 files)
Assignee | ||
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Assignee | ||
Comment 5•8 years ago
|
||
Comment 6•8 years ago
|
||
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
Assignee | ||
Comment 9•8 years ago
|
||
Comment hidden (mozreview-request) |
Assignee | ||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
mozreview-review |
Comment 13•8 years ago
|
||
Assignee | ||
Comment 14•8 years ago
|
||
Updated•8 years ago
|
Comment 15•8 years ago
|
||
Comment 16•8 years ago
|
||
Comment 17•8 years ago
|
||
Updated•8 years ago
|
Updated•6 years ago
|
Comment 19•4 years ago
|
||
I am also affected by this bug: i have developed my own addon and i am now facing a pain to install it in all my copies of firefox. I don't want to disable signature checking completely, i just need a quick and easy way to install this single addon from surce, just like "Load temporary Add-On", but permanent. What i am doing by now is just reinstalling it every time i close/reopen Firefox… quite annoying.
Not sure if that's relevant, but different browsers also allow permanent installation of unpacked/unsigned addons in their "standard" release with just a couple of clicks.
Alexandre Poirot's solution seems to be perfect for me. Any chance i can enable it on my "standard" firefox 78 without having to recompile it from source?
Thanks!
Comment 20•4 years ago
|
||
Alexandre Poirot's solution seems to be perfect for me. Any chance i can enable it on my "standard" firefox 78 without having to recompile it from source?
Sadly no, this patch was for an older version of the about:debugging UI, which is no longer in Firefox today.
Since this bug was opened I think webext has become the goto place for addon development so I don't know if we should try to revive this feature, or if there is a better workflow already in webext (https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/ in case you are not using it yet).
Philipp: is there a good workflow for webextension developers who want to test scenarios that involve closing / re-opening firefox? Or should we try to revive this "install addon permanently" feature?
Comment 21•4 years ago
|
||
The lack of this feature is one of the main reasons I don't use Firefox regularly, and why the extension I help maintain doesn't get nearly as much testing in Firefox, because it's a huge PITA comparatively.
Comment 22•4 years ago
|
||
Luca: Can you take a look at comment 20 and let me know what you think?
Comment 23•4 years ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #20)
Alexandre Poirot's solution seems to be perfect for me. Any chance i can enable it on my "standard" firefox 78 without having to recompile it from source?
Sadly no, this patch was for an older version of the about:debugging UI, which is no longer in Firefox today.
yeah, the approach in the attached patch is not going to work anymore, I just checked and the AddonManager.installAddonFromSources
(originally introduced in Bug 1185460) has been also removed some times ago.
Since this bug was opened I think webext has become the goto place for addon development so I don't know if we should try to revive this feature, or if there is a better workflow already in webext (https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/ in case you are not using it yet).
Philipp: is there a good workflow for webextension developers who want to test scenarios that involve closing / re-opening firefox? Or should we try to revive this "install addon permanently" feature?
We do have some docs related to the strategies that can be used to test scenarios that requires restarting Firefox as part of the following doc page:
As the section linked above describe, to test restart behaviors we currently suggest to install the extension permanently using a Nightly/DevEdition or unbranded build for Beta and Release and disabling the xpi signature checks, possibly in a separate development profile (to avoid exposing a default profile that the user may use for regular browsing to more threats by allowing unsigned extensions).
A Firefox ESR version is also an option, the xpi signature checks can also be disabled on ESR (and this is likely the best option for users that wants to install an unsigned extension permanently if they prefer to not use Nightly or DevEdition versions).
In the past few years we discussed quite often about which issues may be introduced by allowing to permanently installing an unsigned extension on release, and there were always concerns about the way it may be abused my malicious actors.
I have some doubts that the discussion would have a different outcome now (as far as I know there wasn't any change that may brings something to the table which would avoid those concerns), but I'm leaving the needinfo assigned to Philipp in case he has a different opinion.
Comment 24•4 years ago
|
||
there were always concerns about the way it may be abused my malicious actors.
I understand why this is the justification for restricting traditional addon installations. Signed addons from AMO eliminate the possibility of naive users being duped into installing malware addons from any random shady site on the web with a couple clicks, which can come across as pretty legit.
install the extension permanently
Comparing a traditional addon install, to the ability to load an unpacked, local extension persistently, is a false equivalence. Nobody's getting duped into jumping through all the hoops, and not noticing all the bright flashing warnings along the way.
We develop extensions with stable compatibility in mind, so telling developers to use some ancient or alpha versions for testing is also silly. For the most part, the best beta testers are the developers themselves. Thorough testing doesn't take place inside a vacuum, and can't be accomplished in temporary sessions.
Developers need the ability to debug persistently, in the same environment as the end user. We can do so in Chromium. Even Google Chrome allows for it with the stupid warning on launch. Firefox could do something similarly annoying, but ideally provide a config to disable it.
Comment 25•4 years ago
|
||
I'm not convinced we should pursue this path of allowing permanent installation of unsigned add-ons via about debugging. There are multiple alternative paths that would allow developers to test behavior of the add-on which have been previously mentioned. They may not lead to the highest level of convenience w.r.t loading unpacked extensions into Firefox for development, but there are some trade-offs we need to make.
My recommendation would be to make use of Nightly along with web-ext. While you are immediately bugfixing you can use web-ext run or load temporary add-on to see if it is working, once you believe you've reached a stable point you can use web-ext sign to obtain a copy that will be installable persistently.
I'm sorry I can't offer you a better alternative at the moment, but I appreciate you getting in touch and letting us know about your use case.
Comment 26•4 years ago
|
||
My use case is probably uncommon but quite simple: i develop an extension myself and i have no plans to distribute it, since nobody else would be interested. I am the only tester and developer. This means i can't use a dedicated Firefox instance to debug: testing is just everyday's usage… or go to the complication of packaging/signing it every time i made a small update: packaging would take longer than coding.
Loading it through about:debug works just fine, it even allows me to reload it in a click when i modify something. The only problem: it is not permanent.
My current workaround: i never close Firefox. Unfortunately Firefox slows down over time and after a few days i am forced to close/restart it anyway, or because of updates started to force a reload recently.
Sadly, other browsers just have this feature.
My 2c
Comment 27•4 years ago
|
||
I understand and acknowledge that this can be inconvenient in some cases. I'd recommend looking into web-ext. While I wouldn't recommend signing every change you'd make in the day, signing for self-hosted via web-ext when you are comfortable with the changes you've made is just one command line call away.
Comment 28•4 years ago
|
||
(In reply to Philipp Kewisch [:Fallen] [:📆][:🧩] from comment #27)
I understand and acknowledge that this can be inconvenient in some cases. I'd recommend looking into web-ext. While I wouldn't recommend signing every change you'd make in the day, signing for self-hosted via web-ext when you are comfortable with the changes you've made is just one command line call away.
Obviously, you can slap a WONTFIX on whatever you want - that's your prerogative. I guarantee you it's the wrong call on this one, and that the decision is shortsighted.
I understand and acknowledge that this can be inconvenient in some cases
It's not inconvenient in some cases, it's inconvenient in all cases, all the time, for all extension developers. Myself, and a handful of other developers maintain Stylus. I mention that not because I think it's something special, but to point out that none of us develop in Firefox, because you've made it a huge PITA to do so.
Firefox specific bugs slip by all the time and make it into stable, because while everyone tests multiple versions of Chromium on a daily basis, Firefox stable might get a quick run through before releases. The lack of this feature would make it impossible to use Firefox as a regular browser, which I would certainly be inclined to try otherwise. At the very least, Firefox would get considerably more attention.
We develop as we use the extension. I have five different versions of Chromium, each of which I can open and instantly test the latest edits, because they all load unpacked local extensions persistently. In many cases, you need to test in multiple versions. Ideally, you always try to.
Keep the baby-gates up for typical extension installs, but when it comes to the inability to load unpacked extensions persistently, you're relegating Firefox to an afterthought in terms of extension development. It's the browser you begrudgingly jump through hoops to test, typically long after Firefox specific bugs are introduced.
At the end of the day, it seems like your mind is made up, so it's unlikely anything I say here is gonna change that. Only reason I bother urging you to reconsider, is the fact that you seem to drastically underestimate the inconvenience, to the detriment of your own webExtension ecosystem.
Comment 29•4 years ago
|
||
(In reply to Philipp Kewisch [:Fallen] [:📆][:🧩] from comment #27)
I understand and acknowledge that this can be inconvenient in some cases. I'd recommend looking into web-ext. While I wouldn't recommend signing every change you'd make in the day, signing for self-hosted via web-ext when you are comfortable with the changes you've made is just one command line call away.
That's not one command line call away: that's yet another software to install, including npm, and all the docs to read. Also, it looks like web-ext wants to start a dedicated Firefox instance, so it will destroy my workflow of using the same session i'm using for everyday browsing anyway.
This is not only about laziness, this is about giving to the user the freedom to use the software the way he needs. The choice of not allowing "unsigned" extensions is surprising, considering other browsers that i believed to be less freedom-friendly are just allowing it.
Comment 30•4 years ago
|
||
Just chiming in to give a big +1 to sleepwalkingnarcolepticinsomniac and Gabriele's comments on this thread.
I develop several extensions and I basically always want to be running the development version in my browser for daily testing and tinkering. It's very frustrating to have to manually load several "in development" extensions afresh every time I restart Firefox.
After several months of trying Firefox instead of Chrome as my primary browser, this pain point is the main reason I'm seriously considering going back to Chrome.
I hope this extra comment is helpful, and you'll get a chance to reconsider this feature sometime. Thanks!
Comment 31•2 years ago
|
||
For those still looking for a way to automatically load an unpacked Firefox extension from a local directory, please take a look at this solution: https://github.com/tsaost/autoload-temporary-addon
From README.md:
The procedure involves a few steps, but it needs to be done only once.
First you need to enable AutoConfig aka userchrome.js by copying the file config-prefs.js to [Your Firefox install directory]/defaults/pref
Note: For best security, on Windows it is best to leave your Firefox install in "c:\Program Files" so that your config-prefs.js and userChrome.js can only be modified when you are in root/admin mode.
Then you need to edit the file userChrome.js and modify the function installUnpackedExtensions() to reflect the locations of your own addons.
The modified userChrome.js then must be copied to your Firefox installation directory. For example, on Windows this is usually "c:\Program Files (x86)\Mozilla Firefox" for the 32-bit version of Firefox. You can rename the file, but remember to modify the corresponding line pref("general.config.filename", "userChrome.js") in defaults/pref/config-prefs.js
Now your addons from your local directories will be loaded automatically whenever Firefox starts. After editing your code, remember to reload it from about:debuggin. You can also get there via the menu by selecting "More Tools", then "Remote Debugging", and click on "This Firefox" on the left side (but the quickest way is to bookmark it and then add a bookmark keyword such as "dbg" for quick access.)
Please note that this is an automated installation of the extension every time Firefox starts, so it is not quite the same as a "permanent install". That is, this procedure has exactly the same effect as clicking on "Load Temporary Addon..." from the about:debugging page, just that the process is now automated via userChrome.js. This means that if you have code that does something after the installation of the extension such as browser.runtime.onInstalled.addListener(details => { if (details.reason == "install") { ...do something after install... });
then this code will be called every time Firefox is launched.
Because the extension is re-installed every time, you must make sure you have browser_specific_settings such as "browser_specific_settings": {"gecko": { "id": "you.extension.your.name@gmail.com" }}
in your manifest.jason or changes to your options and local storage will be lost when you restart Firefox.
Description
•