Page 2 of 2

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Wed Sep 28, 2016 11:29 pm
by barbaz
Odd.

You still have those thumbnail prefs flipped in your main profile, right? If not, please do that as part of this next test. Once that's all set, export your entire NoScript config from your main profile, using the Export button *on the very bottom* of NoScript Options. Keep the export on hand.

Now, please make yet another new, clean profile, and install NoScript. This time, restore your full NoScript config export (use Import button on the very bottom of NoScript Options). Do thumbnails work?

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Sep 29, 2016 12:02 am
by rick
Yes, of course, the prefs are always flipped.

I did export full NoScript config export
and then import on a new FF profile and I found that the issue only occurs on https site:
I tried e.g. https://twitter.com, http://facebook.com/ https://www.instagram.com/ :
on these the thumbnails are never generated.

On the other hand, on plain http sites, all thumbs are generated ok.

Here is my Noscript config: [moderator note: popup warning] http://download1485.mediafire.com/d262qmoxkzpg/ep1c8pbuc1c7rh3/noscri%27%2B%27pt.txt

I also did the following, in order to facilitate you:
I exported the Noscript config of a clean FF profile, with just Noscript installed, having its default config.
Then I sorted that to my config, and compared them:
the differences are these few:
Image

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Sep 29, 2016 1:54 am
by barbaz
I'd say, NoScript bug. Thanks for the report.

Your close-to-default configuration will hopefully make investigating easier for Giorgio when he gets to this.

Last check I can think of, does it make any difference if you reset noscript.untrusted or Forbid Scripts Globally?

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Sep 29, 2016 7:22 pm
by rick
I tried both your suggestsions (and restarted FF each time)
but the thumbnails are not generated.

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Sep 29, 2016 8:07 pm
by barbaz
I can reproduce the issue in Firefox 49.0.1 *. But I seem to be getting the problem more severely than you - how are you getting *any* thumbnails auto-generated when NoScript is installed?

More or less following these steps:
1) new profile, install NoScript, restart
2) open new tab page, deselect suggested sites
3) about:config > flip noscript.bgThumbs.allowed to true
4) browse to any site (it will appear in the new tab page)
5) close Firefox
6) navigate to ~/.cache/mozilla/firefox/<profilename>/thumbnails and delete everything in there
7) restart Firefox, open new tab page

Without NoScript, the thumbnail appears after a second or so.
With NoScript, the thumbnail never appears.

Possibly related Console messages:

Code: Select all

allowLocalLinks: ns.updateExtraPerm@jar:file:///home/user/.mozilla/firefox/********.default/extensions/%7B73a6fe31-595d-460b-a920-fcc0f8843232%7D.xpi!/components/noscriptService.js:1743:36
ns.syncPrefs@jar:file:///home/user/.mozilla/firefox/********.default/extensions/%7B73a6fe31-595d-460b-a920-fcc0f8843232%7D.xpi!/components/noscriptService.js:1670:9
ns.onContentInit/<@jar:file:///home/user/.mozilla/firefox/********.default/extensions/%7B73a6fe31-595d-460b-a920-fcc0f8843232%7D.xpi!/components/noscriptService.js:1998:63
ns.onContentInit@jar:file:///home/user/.mozilla/firefox/********.default/extensions/%7B73a6fe31-595d-460b-a920-fcc0f8843232%7D.xpi!/components/noscriptService.js:1998:5
IPC.parent.receiveMessage@chrome://noscript/content/parentProcess.js:36:5

[NoScript XSS] xss.reason.TypeError: this.docShell is null --- get_contentWindow@chrome://global/content/bindings/browser.xml:447:1
get_contentWindowAsCPOW@chrome://global/content/bindings/browser.xml:451:1
RemoteBrowserElementInterposition.getters.contentWindow@resource://gre/modules/RemoteAddonsParent.jsm:864:7
AddonInterpositionService.prototype.interposeProperty/desc.get@resource://gre/components/multiprocessShims.js:165:38
RequestWatchdog.prototype.resetUntrustedReloadInfo@chrome://noscript/content/RequestWatchdog.js:295:1
RequestWatchdog.prototype.filterXSS@chrome://noscript/content/RequestWatchdog.js:460:9
RequestWatchdog.prototype.onHttpStart/<@chrome://noscript/content/RequestWatchdog.js:158:18
DOSChecker.prototype.run@chrome://noscript/content/RequestWatchdog.js:2804:22
RequestWatchdog.prototype.onHttpStart@chrome://noscript/content/RequestWatchdog.js:156:9
ns.httpObserver.observe@jar:file:///home/user/.mozilla/firefox/********.default/extensions/%7B73a6fe31-595d-460b-a920-fcc0f8843232%7D.xpi!/components/noscriptService.js:1355:24

A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Thu Sep 29 2016 xx:xx:xx xxxxxxxx (xxx)
Full Message: Error: page-thumbnail:error
Full Stack: observe@resource://gre/modules/BackgroundPageThumbs.jsm:112:22
BackgroundPageThumbs._onCaptureOrTimeout@resource://gre/modules/BackgroundPageThumbs.jsm:275:7
Capture.prototype._done/done@resource://gre/modules/BackgroundPageThumbs.jsm:413:7
Capture.prototype._done@resource://gre/modules/BackgroundPageThumbs.jsm:425:7
Capture.prototype.notify@resource://gre/modules/BackgroundPageThumbs.jsm:390:5
* (I'm using the unbranded addon-dev build of Firefox for various reasons. My "clean profile" is actually a 9-line user.js to prevent automatic updates, EME, & other things that could interfere with testing.)

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Sep 29, 2016 8:14 pm
by barbaz
^ I should have mentioned I'm on Linux while you're on Windows.
barbaz wrote: My "clean profile" is actually a 9-line user.js to prevent automatic updates, EME, & other things that could interfere with testing.)

Code: Select all

user_pref("app.update.auto", false);
user_pref("app.update.enabled", false);
user_pref("browser.pocket.enabled", false);
user_pref("browser.selfsupport.url", "");
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("loop.enabled", false);
user_pref("media.eme.apiVisible", false);
user_pref("media.eme.enabled", false);
user_pref("social.remote-install.enabled", false);

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Sep 29, 2016 8:56 pm
by rick
Yes, following your STR there are no thumbnails in any site.

So, here is my updated my complete STR:
1) new profile, install NoScript, restart
2a) Set Noscript to ""Allow Scripts globally (dangerous)"
2b) open new tab page, deselect suggested sites
3) about:config > flip noscript.bgThumbs.allowed to true and noscript.bgThumbs.disableJS to false
4) browse to various http+https sites:
*most* http sites will get thumbnails (but not all),
no https will get thumbails.
5) close Firefox
6) navigate to C:\Users\User\AppData\Local\Mozilla\Firefox\Profiles\<profilename>\thumbnails and delete everything in there
7) restart Firefox, open new tab page

Without NoScript, the thumbnail appears after a second or so.
With NoScript, the thumbnails never appears for any site.

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Sat Oct 01, 2016 8:19 pm
by barbaz
Moving bug report to NoScript Development. I don't think Guest is coming back here at this point.

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Sun Dec 18, 2016 6:58 pm
by rick
Bump.

The issue is still present in 2.9.5.2.

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Fri Mar 03, 2017 11:57 pm
by rick
Bump

The issue is still present in 5.0 (with FF 51.0.1).


I'm glad that NoScript is frequently updated and constantly improved.
I just hope this issue will be fixed soon.

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Sat Mar 04, 2017 4:41 am
by barbaz
I can confirm the bug still exists in NoScript 5.0rc2, Firefox 51.0.1.

I took a more in-depth look at this. I made this change to NoScript 5.0rc2...

Code: Select all

diff --git a/chrome/noscript_jar/content/noscript/Main.js b/chrome/noscript_jar/content/noscript/Main.js
--- a/chrome/noscript_jar/content/noscript/Main.js
+++ b/chrome/noscript_jar/content/noscript/Main.js
@@ -3766,7 +3766,8 @@
 
   beforeScripting: function(subj, url) { // early stub
     try {
-      INCLUDE("ScriptlessBGThumbs");
+      // ScriptlessBGThumbs
+      Cu.reportError('ScriptlessBGThumbs load deleted, continuing anyway?');
     } catch(e) {
       Cu.reportError(e);
     }
... which, IIUC, should completely disable NoScript's code for blocking thumbnails, right?

Well, the change made no difference. The bug still persists.


@rick, if Giorgio does not respond here within a few days, please bump this thread again.

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Mar 16, 2017 10:55 am
by rick
barbaz wrote:@rick, if Giorgio does not respond here within a few days, please bump this thread again.
Bump

The issue is still present in 5.0.2rc2 (with FF 52.0).

@barbaz, thanks a lot for your effort.

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Mar 16, 2017 10:06 pm
by Giorgio Maone
As far as I can tell this couldn't be reproduced in Nightly.
latest development build 5.0.2rc3 should fix it on stable as well (you need to set noscript.bgThumbs.allowed to true and they should work fine).

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Thu Mar 16, 2017 10:16 pm
by barbaz
Looks fixed here. Thanks Giorgio!

Re: NoScript breaks Thumbnail generation in newtab page

Posted: Fri Mar 17, 2017 10:12 am
by rick
I confirm it's now fixed. Thank you Giorgio!