Closed Bug 1699675 Opened 4 years ago Closed 4 years ago

Unable to temporarily load extensions

Categories

(WebExtensions :: Untriaged, defect)

Firefox 86
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1672859

People

(Reporter: anarpunk, Unassigned)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

I'm on Debian, I use Firefox 86 (not from Debian repositories).
I tried to make the example extension from this page : https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension and then load it in about:debugging.

Actual results:

The extensions loads without apparent issue, but when I go to a mozilla website, the extension doesn't run.
When I display the console after clicking on "Inspect" in about:debugging, I have this error message :
"Error: Can't find profile directory. XULStore.jsm:66:15
load resource://gre/modules/XULStore.jsm:66
XULStore resource://gre/modules/XULStore.jsm:24"

I tried to run it with and without the privacy mode, nothing changes.
I tried to run it with Debian's Firefox-esr 76, nothing changes.

Expected results:

The extension should have run, ie. on a mozilla website, the page border should be red.

The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Product: Firefox → WebExtensions

I don't know if it's relevant, but I run Firefox in Wayland

What is the mozilla website url? For some of the mozilla websites the extensions are restricted for security reasons (e.g. addons.mozilla.org is one of them)

Flags: needinfo?(anarpunk)

(In reply to Luca Greco [:rpl] [:luca] [:lgreco] from comment #3)

What is the mozilla website url? For some of the mozilla websites the extensions are restricted for security reasons (e.g. addons.mozilla.org is one of them)

It was https://www.mozilla.org, but it's not that important, what's important is the error I get

Flags: needinfo?(anarpunk)

The addon debugger window doesn't filter the error by addon id (Bug 1006102), and so that error may not be directly related to the issue you are experiencing (the extension not injecting the style in the mozilla website).
Does it work on some other mozilla.org websites? e.g. developer.mozilla.org

have you applied any change to the borderify webextensions-example?
I just tried it on nightly and release (on a linux machine with Ubuntu) and it worked as expected on www.mozilla.org

it seems likely that there may be some issue on the extension side or something broken in that Firefox profile (which you could double-check by try the same extension in a separate new clean profile, or using web-ext cli tool which create a new throw-away profile by default).

The extension does only have a content script and so to look for the errors you should use the tab developer toolbox:
https://extensionworkshop.com/documentation/develop/debugging/#debugging-content-scripts

(and be sure to have enabled in the devtools setting the setting "Enable browser chrome and add-on debugging toolboxes", or flip "devtools.chrome.enabled" to true from an "about:config" tab, see Bug 1698068).

(In reply to Luca Greco [:rpl] [:luca] [:lgreco] from comment #5)

The addon debugger window doesn't filter the error by addon id (Bug 1006102), and so that error may not be directly related to the issue you are experiencing (the extension not injecting the style in the mozilla website).
Does it work on some other mozilla.org websites? e.g. developer.mozilla.org

The error is related to the temporary extension, because when it's not loaded, I don't have that error and it triggers when I load a temporary extension.
I just tried and it doesn't work on another mozilla.org website

(In reply to Luca Greco [:rpl] [:luca] [:lgreco] from comment #6)

have you applied any change to the borderify webextensions-example?
I just tried it on nightly and release (on a linux machine with Ubuntu) and it worked as expected on www.mozilla.org

it seems likely that there may be some issue on the extension side or something broken in that Firefox profile (which you could double-check by try the same extension in a separate new clean profile, or using web-ext cli tool which create a new throw-away profile by default).

The extension does only have a content script and so to look for the errors you should use the tab developer toolbox:
https://extensionworkshop.com/documentation/develop/debugging/#debugging-content-scripts

(and be sure to have enabled in the devtools setting the setting "Enable browser chrome and add-on debugging toolboxes", or flip "devtools.chrome.enabled" to true from an "about:config" tab, see Bug 1698068).

I haven't changed the exemple extension, and I have tried with another example given on another website, and the result is the same.

I have tried (I should have mentioned that, sorry) with web-ext and the result was sadly the same.

Attached file web-ext_output.txt

I just tried in an X environment and I have the same issue.
Here is the output of web-ext verbose mode

Unfortunately the web-ext verbose logs doesn't seem to include anything that seems useful to pin point what is going on.
I would definitely exclude wayland.

The error in comment 0 is unrelated because:

  • it shouldn't be in the path of the internals that are loading the extensions and make it work
  • I do actually see the same error in the web-ext verbose output while using a stable build, but the extension did work as expected

Is the issue only affecting extension you are installing temporarily, but extension installed from addons.mozilla.org works as expected?

Other details that may be useful to try to identify the actual issue may be:

  • details from about:support
  • looking for other potentially relevant logs in the Browser Console
  • it may also be useful to try to clear the existing logs from the browser console, then load the extension temporarily to see if any suspicious errors are logged while loading the extension (also making sure to have enabled the "Show Content Messages" toggle in the gear menu at the top-right of the browser console window).
Attached file about_support.txt

I don't have the toggle you're referring to. I just have :

  • Persist Logs
  • Show Timestamps
  • Group Similar Messages
  • Enable Autocompletion
  • Instant Evaluation

I'll look to the attached about:support details as soon as I can and see if there is anything useful, in the meantime here is a screenshot that shows were that Browser Console option is.

(In reply to Luca Greco [:rpl] [:luca] [:lgreco] from comment #13)

Created attachment 9210423 [details]
browse_console_content_messages.png

I'll look to the attached about:support details as soon as I can and see if there is anything useful, in the meantime here is a screenshot that shows were that Browser Console option is.

I looked in the right place, but I don't have this option. Anyway, I found it in about:config and activated it. I don't have more info when I load the extension with this options activated. But you were right about the error "can't find profile directory.", it actually triggers when I click on "Inspect" in the about:debugging page, and if I reload (F5) the "Inspect" page, the error triggers again.

Hello,

I could not reproduce the issue on the latest Nightly (88.0a1/20210321213736), Beta (87.0/20210318103112) and Release (86.0.1/20210310152336) under Windows 10 x64 and Ubuntu 16.04 LTS.

Using the borderify webextensions-example loaded as a temporary add-on via about:debugging, the page border for https://www.mozilla.org/en-US/ is properly set to red.

Regarding the error in question, it only appears on Release and Beta (triggered as mentioned in Comment 14). On Nightly, there is no such error logged in the add-on console.

From about:support:

browser.privatebrowsing.autostart true

This means that you've enabled permanent private browsing mode. The add-on is enabled but not allowed to start because it was not granted access to Private Browsing mode.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
See Also: → 1585431

I also tried to load the extension with web-ext, which launches Firefox-esr with a temporary profile, so no private browsing mode involved here. With this method, I also had the issue mentioned in my first comment. Ill try with nightly when I can, but for now, the issue is not resolved as I still can't temporarily load extensions.

Can you share the extension (e.g. zip file of the directory where you're using web-ext run, and any custom config/params if you're passing any to web-ext run)? If we can reproduce this issue I'll re-open the bug.

It works with nightly, so I'll use it for my tests, thanks for your help

In your Firefox that uses automatic private browsing, you could try toggling this preference. You need to reload the temporary extension after this change:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box in the page, type or paste extensions.allowPrivateBrowsingByDefault and pause while the list is filtered

(3) Double-click the preference to switch the value from false to true

(In reply to jscher2000 from comment #20)

In your Firefox that uses automatic private browsing, you could try toggling this preference. You need to reload the temporary extension after this change:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box in the page, type or paste extensions.allowPrivateBrowsingByDefault and pause while the list is filtered

(3) Double-click the preference to switch the value from false to true

extensions.allowPrivateBrowsingByDefault is an old unsupported about:config preference (it was introduced as a fallback in case of regressions when we were migrated to the user-controlled private browsing permission).

It has been completely removed in Bug 1661517, and so in Firefox >= 91 changing that settings is going to be a no-op.

Thanks, Luca. Didn't know that. Perhaps should add impetus to fixing bug 1585431.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: