NoScript brokes Firefox WebExtension background pages

Ask for help about NoScript, no registration needed to post
njake

NoScript brokes Firefox WebExtension background pages

Post by njake »

New firefox extension types get totally broken when NoScript extension is installed.

If you zip this example and install as file, it wont work if NoScript is active extension
https://github.com/mdn/webextensions-ex ... licks-i18n

I have own extension and debugged that background page not loaded or it get some other way unusable totally in firefox.
background page wont appear to firefox debug tools as is suggested. No console messages comes now where..
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: NoScript brokes Firefox WebExtension background pages

Post by barbaz »

Does setting Allow Scripts Globally change the situation?

When this issue occurs, do you see anything related in the Browser Console? (Ctrl-Shift-J)
(if you don't know what's related, turn off CSS warnings and post everything else you see)
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: NoScript brokes Firefox WebExtension background pages

Post by Giorgio Maone »

Adding moz-extension: to your whitelist should do the trick.
I'm putting it in the mandatory whitelist in next release, thanks for noticing.
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
njake

Re: NoScript brokes Firefox WebExtension background pages

Post by njake »

Thanks for fast support, that "moz-extension:" on whitelist fixes problems.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0
aloishammer
Senior Member
Posts: 65
Joined: Mon Apr 20, 2009 4:03 pm

Re: NoScript brokes Firefox WebExtension background pages

Post by aloishammer »

Giorgio Maone wrote:Adding moz-extension: to your whitelist should do the trick.
I'm putting it in the mandatory whitelist in next release, thanks for noticing.
All moz-extension URIs are blocked for me, despite moz-extension: being in the whitelist.

Even after allowing all scripts globally, NoScript continues to block moz-extension URIs, and continues to show the circle-stripe symbol in the extension icon. I've tried reloading moz-extension pages with Ctrl-F5; nothing changes.

I have NoScript 5.0.8.1 installed.

ETA: Firefox 56.0b2 / Windows x64, on Windows 7SP1 x64.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
User avatar
therube
Ambassador
Posts: 7924
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: NoScript brokes Firefox WebExtension background pages

Post by therube »

Are only candidates affected or 55 release too?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 SeaMonkey/2.49.1
aloishammer
Senior Member
Posts: 65
Joined: Mon Apr 20, 2009 4:03 pm

Re: NoScript brokes Firefox WebExtension background pages

Post by aloishammer »

therube wrote:Are only candidates affected or 55 release too?
This was a problem with (at least) the late 55.0 betas as well. I just didn't have a chance to report the problem for the last two-three weeks.
Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0
aloishammer
Senior Member
Posts: 65
Joined: Mon Apr 20, 2009 4:03 pm

Re: NoScript brokes Firefox WebExtension background pages

Post by aloishammer »

aloishammer wrote:
therube wrote:Are only candidates affected or 55 release too?
This was a problem with (at least) the late 55.0 betas as well. I just didn't have a chance to report the problem for the last two-three weeks.
ETA: Sorry, should also mention that multiprocess is disabled for performance reasons.
Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0
aloishammer
Senior Member
Posts: 65
Joined: Mon Apr 20, 2009 4:03 pm

Re: NoScript brokes Firefox WebExtension background pages

Post by aloishammer »

Anyone have any ideas? This is persisting through 56.0b4. Next major release breaks everything non-WebExtension, and NoScript is breaking WebExtensions.
Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: NoScript brokes Firefox WebExtension background pages

Post by Thrawn »

It looks like you're using a release version of NoScript. Have you tested the latest development version?
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
aloishammer
Senior Member
Posts: 65
Joined: Mon Apr 20, 2009 4:03 pm

Re: NoScript brokes Firefox WebExtension background pages

Post by aloishammer »

Thrawn wrote:It looks like you're using a release version of NoScript. Have you tested the latest development version?
Yes. No change. And let me go ahead and add that it seems to be breaking—at minimum—the options pages of every WebExtension I've tried so far.

I can't even tell whether Stylus is working at all because I haven't been able to install any userscripts, or import my existing userscripts from Stylish. I've also installed and tried Wallabagger and Enhancer for YouTube. Options pages are completely broken in every case.

I've spent a lot of the last ten or so years fixing NoScript buglets and conflicts with other Firefox extensions. I'd like to think that I've covered most of the basic troubleshooting steps. If the NoScript status icon is anything to go by, NoScript really is failing to permit extension pages (windows, tabs, in-window panels etc.)

Can someone take a look and see if there's a reason that NoScript would continue blocking WebExtensions UI even with moz-extension: URIs whitelisted?

ETA: Reminder - even allowing scripts globally changes nothing.
Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: NoScript brokes Firefox WebExtension background pages

Post by Giorgio Maone »

aloishammer wrote:I'd like to think that I've covered most of the basic troubleshooting steps.
Unfortunately, I'm fairly sure you did not :(

The basic steps, which I've just covered, are the following:
  1. Start latest stable Firefox with a clean profile
  2. Install latest stable NoScript and restart Firefox
  3. Install a WebExtension (I installed Stylus, since you've mentioned it)
  4. Check wether Stylus work. BTW, it did work immediately for me, with no need to change any NoScript setting because moz-extension: has been in the "privileged" whitelist of browser built-in for several months now (you'll notice it's grayed out in the whitelist tab, you couldn't forbid it even if you wanted).
Therefore I suspect either a configuration-specific issue, or an extensions conflict.
To troubleshoot the former, please follow these step:
  1. In your "normal" profile, use NoScript Options>Export
  2. In your clean profile we've just created, with NoScript & Stylus only, use NoScript Options>Import on the previously exported file
  3. Now check whether Stylus still works. If it doesn't, please send me the aforementioned file for analysis.
If, on the contrary, Stylus still works with your specific NoScript options in a clean profile, it's very likely an extensions conflict: try Standard Diagnostic to find the culprit.
If after all the above you're still at lost, as a last resort please send me your whole prefs.js file.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
aloishammer
Senior Member
Posts: 65
Joined: Mon Apr 20, 2009 4:03 pm

Re: NoScript brokes Firefox WebExtension background pages

Post by aloishammer »

Giorgio Maone wrote:
aloishammer wrote:I'd like to think that I've covered most of the basic troubleshooting steps.
Unfortunately, I'm fairly sure you did not :(

The basic steps, which I've just covered, are the following:
  1. Start latest stable Firefox with a clean profile
  2. Install latest stable NoScript and restart Firefox
  3. Install a WebExtension (I installed Stylus, since you've mentioned it)
  4. Check wether Stylus work. BTW, it did work immediately for me, with no need to change any NoScript setting because moz-extension: has been in the "privileged" whitelist of browser built-in for several months now (you'll notice it's grayed out in the whitelist tab, you couldn't forbid it even if you wanted).
Therefore I suspect either a configuration-specific issue, or an extensions conflict.
To troubleshoot the former, please follow these step:
  1. In your "normal" profile, use NoScript Options>Export
  2. In your clean profile we've just created, with NoScript & Stylus only, use NoScript Options>Import on the previously exported file
  3. Now check whether Stylus still works. If it doesn't, please send me the aforementioned file for analysis.
If, on the contrary, Stylus still works with your specific NoScript options in a clean profile, it's very likely an extensions conflict: try Standard Diagnostic to find the culprit.
If after all the above you're still at lost, as a last resort please send me your whole prefs.js file.
I did rule out an extensions conflict, in fact.

The bulk of my config changes from defaults--excluding pedestrian items like local printers, font configuration, and so forth--are covered here: https://github.com/pyllyukko/user.js/

I did not implement every change listed, but it covers a lot of the more interesting and deep-rooted config changes from default in my prefs.js. I will attempt to provide a copy of my prefs.js, but, before I do that, I need to sanitize it to remove usernames, hosts, and some other data that I don't want to release.
Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0
aloishammer
Senior Member
Posts: 65
Joined: Mon Apr 20, 2009 4:03 pm

Re: NoScript brokes Firefox WebExtension background pages

Post by aloishammer »

Giorgio Maone wrote:
aloishammer wrote:I'd like to think that I've covered most of the basic troubleshooting steps.
Unfortunately, I'm fairly sure you did not :(

The basic steps, which I've just covered, are the following:
  1. Start latest stable Firefox with a clean profile
  2. Install latest stable NoScript and restart Firefox
  3. Install a WebExtension (I installed Stylus, since you've mentioned it)
  4. Check wether Stylus work. BTW, it did work immediately for me, with no need to change any NoScript setting because moz-extension: has been in the "privileged" whitelist of browser built-in for several months now (you'll notice it's grayed out in the whitelist tab, you couldn't forbid it even if you wanted).
Therefore I suspect either a configuration-specific issue, or an extensions conflict.
To troubleshoot the former, please follow these step:
  1. In your "normal" profile, use NoScript Options>Export
  2. In your clean profile we've just created, with NoScript & Stylus only, use NoScript Options>Import on the previously exported file
  3. Now check whether Stylus still works. If it doesn't, please send me the aforementioned file for analysis.
If, on the contrary, Stylus still works with your specific NoScript options in a clean profile, it's very likely an extensions conflict: try Standard Diagnostic to find the culprit.
If after all the above you're still at lost, as a last resort please send me your whole prefs.js file.
One other note: originally, I reported defects against several WebExtension projects, but I found that many other users were also using NoScript, and several of them definitively traced WebExtension breakage back to NoScript; that's why I'm here. This is around the same time that NoScript started including the mandatory moz-extension: whitelisting, so it's hard to say how many conflicts have already been fixed by the NoScript change, and how many persist afterward.
Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0
Passerby_number_721

Re: NoScript brokes Firefox WebExtension background pages

Post by Passerby_number_721 »

It is probably related to the feature Apply restrictions to whitelisted sites too.

Try with the latest version of uBlock Origin, which is a full WebExt embedded in a thin legacy wrapper. If you have @font-face forbidden and you apply restrictions to whitelisted sites, both uBO's UI and internal pages can't use @font-face anymore.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Post Reply