Page 1 of 4

NoScript brokes Firefox WebExtension background pages

Posted: Fri Jan 22, 2016 11:30 pm
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..

Re: NoScript brokes Firefox WebExtension background pages

Posted: Sat Jan 23, 2016 12:23 am
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)

Re: NoScript brokes Firefox WebExtension background pages

Posted: Sat Jan 23, 2016 12:52 am
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.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Sat Jan 23, 2016 1:23 pm
by njake
Thanks for fast support, that "moz-extension:" on whitelist fixes problems.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Mon Aug 14, 2017 9:58 pm
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.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Tue Aug 15, 2017 6:45 pm
by therube
Are only candidates affected or 55 release too?

Re: NoScript brokes Firefox WebExtension background pages

Posted: Wed Aug 16, 2017 1:54 am
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.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Wed Aug 16, 2017 1:55 am
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.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Mon Aug 21, 2017 6:12 am
by aloishammer
Anyone have any ideas? This is persisting through 56.0b4. Next major release breaks everything non-WebExtension, and NoScript is breaking WebExtensions.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Tue Aug 22, 2017 12:40 am
by Thrawn
It looks like you're using a release version of NoScript. Have you tested the latest development version?

Re: NoScript brokes Firefox WebExtension background pages

Posted: Tue Aug 22, 2017 1:39 am
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.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Tue Aug 22, 2017 8:28 am
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.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Sun Aug 27, 2017 7:16 pm
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.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Sun Aug 27, 2017 7:22 pm
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.

Re: NoScript brokes Firefox WebExtension background pages

Posted: Tue Aug 29, 2017 3:05 pm
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.