Page 1 of 1

[Unrelated] NS & forecastfox english don't work together

Posted: Sat Jan 31, 2015 12:39 pm
by isesuz
noscript is blocking Forecastfox somehow and somewhere.

even with the positive list, it is not possible to unblock Forecastfox.

Thanks for help.

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Sat Jan 31, 2015 2:50 pm
by barbaz
When it fails, 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 and forecastfox 2.2.4 english don't work togeth

Posted: Sat Jan 31, 2015 10:44 pm
by Morac
I see the following error:

Code: Select all

 bootstrap.js:20
TypeError: $(...).tooltip is not a function options.js:398
TypeError: aWindow.QueryInterface is not a function
Just for clarification since the original poster didn't say what was broken, when the NoScript add-on is enabled, ForecastFox's options page doesn't work. The option page goes to http://www.getforecastfox.com/customize/17/, but injects it's own and JQuery scripts into that page. As such I'm guessing NoScript's cross-scripting protect or something similar is breaking the options page. Disabling XSS, ABE, Clearclick and script protection doesn't do anything though so it must have something to do with the way NoScript is hooking into scripts on the page.

When I traced through the code, the JQuery results returned were wrong. It was returning NULL for objects on the web page. It's likely NoScript simply prevents DOM web sites from trying to load CHROME scripts. I have no idea how to prevent that though for this one site.

It's likely if the options page was loaded from inside the addon itself, this might not be an issue, but as it stands, it is.

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Sat Jan 31, 2015 11:03 pm
by barbaz
(Wait, where to obtain v 2.2.4? Last version on https://addons.mozilla.org/en-US/firefo ... /versions/, which is the only place to download ForecastFox on their site, is 2.2.2...)

Is this addon written with the Addon SDK? If so could this be related to no, see below

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Mon Feb 02, 2015 5:29 am
by spiralvoice
barbaz wrote:where to obtain v 2.2.4?
http://static.getforecastfox.com/downlo ... latest.xpi

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Mon Feb 02, 2015 5:31 am
by barbaz
spiralvoice wrote:
barbaz wrote:where to obtain v 2.2.4?
https://static.getforecastfox.com/downl ... latest.xpi
Download Error

The download cannot be saved because an unknown error occurred.

Please try again.

Code: Select all

Error: static.getforecastfox.com:443 uses an invalid security certificate.

The certificate expired on 6/29/14 9:23 AM. The current time is 2/X/15 XX:XX XX.

(Error code: sec_error_expired_certificate)
Link repointed to plain http, which works. Thanks.

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Mon Feb 02, 2015 5:36 am
by barbaz
barbaz wrote:Is this addon written with the Addon SDK?
Nope, it's an XUL overlay addon. I'll try to set this up in my test Fx environment.

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Mon Feb 02, 2015 6:02 am
by barbaz
Well, I can verify that it works with NS disabled but is completely broken with NS enabled. (Fx 35.0.1 PCLinuxOS build, new profile, NS latest development build, forecastfox from the provided link)
The related error messages would appear to be

Code: Select all

TypeError: aWindow.QueryInterface is not a function  tabbrowser.xml:384
Invalid chrome URI: /
I have no further ideas about this atm, sorry. :(

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Tue Feb 03, 2015 5:37 pm
by Morac
I tried moving the web page into the actual add-on to get rid of possible chrome/content filtering, but that made no difference so there's something deeper going on here.

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Tue Feb 03, 2015 5:46 pm
by barbaz
Can you figure out _what_ the aWindow is that doesn't have QueryInterface as a function with NoScript installed?
Or why the addon is requesting chrome URI "/" 4 times with NoScript installed but not without?

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Sat Mar 04, 2017 11:54 am
by warp-9.9
Still broken in 2.4.8. https://addons.mozilla.org/en-US/firefo ... x-version/

Anyone ever figure out why?

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Sat Mar 04, 2017 6:37 pm
by barbaz
Nope. But the console output is different now -

Code: Select all

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/  jquery.localize.custom.js:116:2
1488652844.036installing listeners  bootstrap.js:20:7
1488652844.038adding observer forecastfox-observers  bootstrap.js:20:7
1488652844.038initialized  bootstrap.js:20:7
1488652844.039initialized  bootstrap.js:20:7
1488652844.039opening connection to forecastfox.sqlite  bootstrap.js:20:7
1488652844.04initialized bootstrap.js:20:7
1488652844.041initialized  bootstrap.js:20:7
1488652844.041topic storage created for ui-get-locale-results  bootstrap.js:20:7
1488652844.041callback stored for ui-get-locale-results  bootstrap.js:20:7
1488652844.104initializing the locale selector  bootstrap.js:20:7
1488652844.108topic storage created for ui-content-script-loaded  bootstrap.js:20:7
1488652844.108callback stored for ui-content-script-loaded  bootstrap.js:20:7
1488652844.108topic storage created for ui-restore-defaults-results  bootstrap.js:20:7
1488652844.108callback stored for ui-restore-defaults-results  bootstrap.js:20:7
1488652844.109relaying to extension!  bootstrap.js:20:7
1488652844.114topic storage created for ui-location-search-results  bootstrap.js:20:7
1488652844.115callback stored for ui-location-search-results  bootstrap.js:20:7
1488652844.115topic storage created for ui-get-locations-results  bootstrap.js:20:7
1488652844.115callback stored for ui-get-locations-results  bootstrap.js:20:7
1488652844.115topic storage created for preference-update  bootstrap.js:20:7
1488652844.115callback stored for preference-update  bootstrap.js:20:7
1488652844.115topic storage created for ui-get-options-results  bootstrap.js:20:7
1488652844.115callback stored for ui-get-options-results  bootstrap.js:20:7
1488652844.145callback stored for ui-get-options-results  bootstrap.js:20:7
1488652844.145callback stored for preference-update  bootstrap.js:20:7
TypeError: noScript.getSites(...).filter is not a function[Learn More]  options-content-script.js:26:17
	Forecastfox_Inject_Options_Script chrome://forecastfox/content/options-content-script.js:26:17
	ForecastfoxOverlay.inject_content_script chrome://forecastfox/content/overlay.js:130:5
	ForecastfoxOverlay.options_listener chrome://forecastfox/content/overlay.js:122:2
	ForecastfoxOverlay_onLoad_timer/callback/< chrome://forecastfox/content/overlay.js:83:18
1488652845.117data retrieved for locale  bootstrap.js:20:7
1488652845.119checking if key locale exists  bootstrap.js:20:7
1488652845.119executing UPDATE datastore SET value=:value WHERE key=:key;  bootstrap.js:20:7
1488652845.12data stored for locale  bootstrap.js:20:7
1488652845.12loading locale en  bootstrap.js:20:7
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/  jquery.localize.custom.js:116:2
1488652845.127locale en was loaded  bootstrap.js:20:7
1488652845.127relaying to extension!  bootstrap.js:20:7
1488652845.128initialized  bootstrap.js:20:7
"Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys"  util.js:209:33
"Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required"  util.js:209:33
That "noScript.getSites" line is part of Forecastfox -

Code: Select all

  // enable the page in noScript
  if ("@maone.net/noscript-service;1" in Components.classes) {
    var noScript = Components.classes["@maone.net/noscript-service;1"].
                   getService().wrappedJSObject;
    var browser = getBrowser().getBrowserForDocument(win.document);
    var sites = noScript.getSites(browser).filter(function(site) {
      // don't unblock google analytics... since people might get annoyed at that
      return !this.isJSEnabled(site) && site != 'http://www.google-analytics.com';
    }, noScript);
    if (sites.length > 0) {
      var notificationBox = getBrowser().getNotificationBox();
      var notification = notificationBox.getNotificationWithValue("forecastfox-noscript");
      var message = bgp.i18n.data("notification.message");
      if (notification)
        notification.label = message;
      else {
        var buttons = [{
          label:  bgp.i18n.data("notification.button.label"),
          accessKey:  bgp.i18n.data("notification.button.accesskey"),
          callback: function() {
            sites.forEach(function(site) { this.setJSEnabled(site, true); }, noScript);
            browser.reload();
          }
        }];
        const priority = notificationBox.PRIORITY_CRITICAL_MEDIUM;
        notificationBox.appendNotification(message, "forecastfox-noscript",
                                           bgp.themes.logo("16"),
                                           priority, buttons);
      }
      return;
    }
  }
This is now a Forecastfox issue, please report to them.

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Mon Mar 06, 2017 4:42 am
by Thrawn
Wait, is that code snippet directly interacting with NoScript to whitelist every site except Google Analytics?!

Yeah, I'm not installing or testing ForecastFox, thanks.

Re: NoScript and forecastfox 2.2.4 english don't work togeth

Posted: Mon Mar 06, 2017 5:16 am
by barbaz
Thrawn wrote:Wait, is that code snippet directly interacting with NoScript to whitelist every site except Google Analytics?!
That's what it's trying to do. As you can see from the console messages, it isn't succeeding.

Luckily for NoScript users.