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

Ask for help about NoScript, no registration needed to post
isesuz
Posts: 1
Joined: Sat Jan 31, 2015 12:20 pm

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

Post by isesuz »

noscript is blocking Forecastfox somehow and somewhere.

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

Thanks for help.
Mozilla/5.0 (Windows NT 6.1; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 11064
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; NetBSD i386; rv:28.0) Gecko/20100101 Firefox/28.0 SeaMonkey/2.25
Morac
Junior Member
Posts: 36
Joined: Thu May 21, 2009 5:33 pm

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

Post 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.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 11064
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; NetBSD i386; rv:28.0) Gecko/20100101 Firefox/28.0 SeaMonkey/2.25
spiralvoice
Posts: 1
Joined: Mon Feb 02, 2015 5:01 am

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

Post by spiralvoice »

barbaz wrote:where to obtain v 2.2.4?
http://static.getforecastfox.com/downlo ... latest.xpi
Last edited by barbaz on Mon Feb 02, 2015 5:33 am, edited 1 time in total.
Reason: fix broken link
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
barbaz
Senior Member
Posts: 11064
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; NetBSD i386; rv:28.0) Gecko/20100101 Firefox/28.0 SeaMonkey/2.25
barbaz
Senior Member
Posts: 11064
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; NetBSD i386; rv:28.0) Gecko/20100101 Firefox/28.0 SeaMonkey/2.25
barbaz
Senior Member
Posts: 11064
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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. :(
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; NetBSD i386; rv:28.0) Gecko/20100101 Firefox/28.0 SeaMonkey/2.25
Morac
Junior Member
Posts: 36
Joined: Thu May 21, 2009 5:33 pm

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

Post 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.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 11064
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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?
*Always* check the changelogs BEFORE updating that important software!
SeaMonkey/9.80 (Macintosh; Intel Mac OS X 10.7) Gecko/35.0 Version/2.32
warp-9.9
Posts: 2
Joined: Wed Apr 02, 2014 3:08 pm

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

Post by warp-9.9 »

Still broken in 2.4.8. https://addons.mozilla.org/en-US/firefo ... x-version/

Anyone ever figure out why?
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.1.0 Waterfox/50.1.0
barbaz
Senior Member
Posts: 11064
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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.
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

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

Post 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.
======
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
barbaz
Senior Member
Posts: 11064
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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.
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply