Load Temporary Add-On => doesn't run when "Never remember history" is used
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
People
(Reporter: hans_squared, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
application/zip
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0
Steps to reproduce:
System:
- Manjaro Linux 64-bit
- Firefox 79.0 or Firefox Developer Edition 80.0b8
The bug occurs in both versions.
- Edit -> Preferences -> Privacy & Security -> History -> Never remember history
(which Firefox automatically changes to “Use custom settings for history -> Always use private browsing mode” after restarting) - Restart browser
- about:debugging
- Load Temporary Add-On
- Load the attached test extension
Actual results:
The attached test extension is loaded, i.e. it's shown in the list of temporary add-ons.
But its code isn't executed.
This error message is shown in the console:
Error: Can’t find profile directory. XULStore.jsm:66:15
load resource://gre/modules/XULStore.jsm:66
XULStore resource://gre/modules/XULStore.jsm:24
If I then set
- Edit -> Preferences -> Privacy & Security -> History -> Use custom settings for history
- Uncheck "Always use private browsing mode"
- Restart the browser
And then follow the steps 1-5 from "What did you do? (steps to reproduce)", everything works.
Expected results:
The attached test extension's code should have been executed, and no error message should have been displayed in the console.
Comment 1•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Comment 2•4 years ago
|
||
Correction:
"And then follow the steps 1-5"
should be
"And then follow the steps 3-5"
Comment 3•4 years ago
|
||
Hello,
I’ve managed to fully reproduce the issue based on the provided STR on the latest Beta (81.0b4/20200829200810) and Release (80.0/20200818235255) and partially reproduce on the latest Nightly (82.0a1/20200830213209) under Windows 10 Pro 64-bit and Ubuntu 16.04 LTS.
I’ve also reproduced the issue on the 79.0 Release version of the browser (79.0/20200720193547) as originally reported.
As mentioned, I’ve managed to only partially reproduce the issue on the latest Nightly as the error Error: Can’t find profile directory. XULStore.jsm:66:15
is not displayed in the add-on debug console as with the other tested versions of the browser, however, the code is not executed.
I do however have an observation regarding this issue.
Extensions, by default, are not allowed to run in private browsing and the bug report particularly states that the browser will be run in private browsing mode after modifying the settings in Step 1 of the STR.
So after loading the extension, I’ve went to about:addons and allowed the extension to run in private windows. With this setting set, in the add-on debug console, the error disappears and the string “loaded” is displayed. The browser download icon appears on the toolbar and when checking the default download folder of the OS, a “Test.txt” file is present there (with the time of creation identical to the moment I allowed the extension to run in private windows).
Hope this clarifies the issue you are having. For now I will not set the issue to NEW until I receive your feedback on the matter. Thank you !
Comment 4•4 years ago
|
||
Thanks for providing the detailed explanation Alex. This is expected behavior.
As for the "Can’t find profile directory. XULStore.jsm" error, this is unrelated. The source of that error is https://searchfox.org/mozilla-central/rev/ac142717cc067d875e83e4b1316f004f6e063a46/toolkit/components/xulstore/old/XULStore.jsm#66 , and this file is only included when MOZ_NEW_XULSTORE
is used at build time: https://searchfox.org/mozilla-central/rev/ac142717cc067d875e83e4b1316f004f6e063a46/toolkit/components/xulstore/moz.build#23,43
Updated•4 years ago
|
I would request that this bug be reopened and made to work in all modes of Firefox. Many of us permanently leave our browsers in the "do not remember history" mode due to various reasons, and it's disappointing when we follow the basic Firefox extension tutorial and it doesn't work. At least I knew to press F12 and figure out the error which led me to https://stackoverflow.com/questions/60633538/firefox-cant-load-temporary-addon-error-cant-find-profile-directory, which led me to this bug report. But there will be many newbies whose confidence will be crushed when they try creating an extension and fail. They won't even be able to understand what went wrong. Please do the necessary fixes to make this work. Or, perhaps have a simpler GUI tool which can create, test and package extensions in any mode.
Comment 6•4 years ago
|
||
(In reply to nav from comment #5)
it's disappointing when we follow the basic Firefox extension tutorial and it doesn't work.
Which tutorial are you following? Bug 1672859 should address the case for development via about:debugging
.
@Rob: I followed the tutorial about creating an extension: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension.
I just tried it again on Firefox 86, 64 bit on Ubuntu 16.04, and this time I'm not seeing the error, but I don't see the border when visiting a mozilla.org page either (as per the tutorial, a border is supposed to show up on the page, due to code in the addon). I checked about:addons, and the Borderify addon was already enabled.
I guess there's no need to reopen this bug then.
Comment 8•4 years ago
|
||
(In reply to Nav from comment #7)
@Rob: I followed the tutorial about creating an extension: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension.
I just tried it again on Firefox 86, 64 bit on Ubuntu 16.04, and this time I'm not seeing the error, but I don't see the border when visiting a mozilla.org page either (as per the tutorial, a border is supposed to show up on the page, due to code in the addon).
Some websites cannot be modified by extensions for security reasons. This is explained at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts and also mentioned in the tutorial that you've linked:
Don't try it on addons.mozilla.org, though! Content scripts are currently blocked on that domain.
Updated•3 years ago
|
Description
•