[FIXED] keep.google.com gives blank page with NS 2.6.9.37rc2

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

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by Somehuman »

barbaz wrote:@bldewolf: Thank you for your investigations and sharing your findings. It seems that the GA surrogate needs an update to cope with the change avoiding deprecated JS stuff.

Can someone who sees the issue, please:
1) make sure surrogates are enabled & the GA surrogate is default
2) set about:config > noscript.surrogate.debug to true
3) reproduce the problem and check the Browser Console (Ctrl-Shift-J) when this issue happens and post here any JS errors & related messages?
(if you don't know, turn off CSS warnings and post everything else you see)

I would guess that there is an error happening inside the surrogate itself, which get suppressed by default.
This is the console output with surrogate debugging enabled. I'm using Firefox 38.3.0 ESR on Linux and NoScript 2.6.9.39:

Code: Select all

this.getDescriptor is not a function rs=AMdsDvDEEGfqAQ_4dddRJnzPW0NWOOi7UQ:644:0
TypeError: L is not a function rs=AMdsDvDEEGfqAQ_4dddRJnzPW0NWOOi7UQ:264:238
this.getDescriptor is not a function rs=AMdsDvDEEGfqAQ_4dddRJnzPW0NWOOi7UQ:644:0
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

Hmm, I was under the mistaken impression that certain deprecated properties had been entirely removed, but I've just realized they're still there for at least a couple more Gecko releases... Does using the 2.6.9.32rc2 version of the ga surrogate with latest NoScript, remove the need for exception or otherwise disable it on Keep?

Code: Select all

(function(){var _0=function()_0,_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq={__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0},_gat={__noSuchMethod__:function(){return _gaq}}})()
(if that works, I have no idea the real fix...)
*Always* check the changelogs BEFORE updating that important software!
-
ceri
Posts: 3
Joined: Sun Dec 28, 2014 3:56 am

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by ceri »

barbaz wrote:Hmm, I was under the mistaken impression that certain deprecated properties had been entirely removed, but I've just realized they're still there for at least a couple more Gecko releases... Does using the 2.6.9.32rc2 version of the ga surrogate with latest NoScript, remove the need for exception or otherwise disable it on Keep?

Code: Select all

(function(){var _0=function()_0,_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq={__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0},_gat={__noSuchMethod__:function(){return _gaq}}})()
(if that works, I have no idea the real fix...)
Yep, If I replace the ga surrogate with that version you quoted, google keep works again using the latest NS version (2.7?)
Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

Thanks. Can you please try with this debug version of the surrogate and post the console log as before? (I don't expect it to work)

Code: Select all

let dbp=function(s){let handler={get:function(t,n)n in t?t[n]:function(){console.log(n);return t.__noSuchMethod__(n,Array.prototype.slice.call(arguments))}};return new Proxy(s||{},handler)};(function(){var _0=dbp(function()_0),_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq=dbp({__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0}),_gat=dbp({__noSuchMethod__:function(){return _gaq}})})()
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

add: If it's not any different from before, please check the Web Console (Ctrl-Shift-K)
*Always* check the changelogs BEFORE updating that important software!
-
ceri
Posts: 3
Joined: Sun Dec 28, 2014 3:56 am

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by ceri »

barbaz wrote:Thanks. Can you please try with this debug version of the surrogate and post the console log as before? (I don't expect it to work)

Code: Select all

let dbp=function(s){let handler={get:function(t,n)n in t?t[n]:function(){console.log(n);return t.__noSuchMethod__(n,Array.prototype.slice.call(arguments))}};return new Proxy(s||{},handler)};(function(){var _0=dbp(function()_0),_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq=dbp({__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0}),_gat=dbp({__noSuchMethod__:function(){return _gaq}})})()
That one appears to work fine as well. Console log with debug:
http://pastebin.com/RKabRRtp
Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

???
Thanks for testing but that result makes zero sense to me - I literally just copy-pasted some NoScript internal code into the surrogate and stuck a console.log() in there... I'm surprised that A) it works, and B) there are no log entries from the inserted console.log call.

Are you sure that the surrogate is running? If you have any doubt, stick something like this at the very beginning of the surrogate

Code: Select all

alert("AAAAAAAAAAAAAAAAAA!!!!");
and see if you get an alert notification dialog.
*Always* check the changelogs BEFORE updating that important software!
-
ceri
Posts: 3
Joined: Sun Dec 28, 2014 3:56 am

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by ceri »

barbaz wrote:???
Thanks for testing but that result makes zero sense to me - I literally just copy-pasted some NoScript internal code into the surrogate and stuck a console.log() in there... I'm surprised that A) it works, and B) there are no log entries from the inserted console.log call.

Are you sure that the surrogate is running? If you have any doubt, stick something like this at the very beginning of the surrogate

Code: Select all

alert("AAAAAAAAAAAAAAAAAA!!!!");
and see if you get an alert notification dialog.
I stuck the alert here and it worked:

Code: Select all

let dbp=function(s){alert("AAAAAAAAAAAAAAAAAA!!!!");let handler={get:function(t,n)n in t?t[n]:function(){console.log(n);return t.__noSuchMethod__(n,Array.prototype.slice.call(arguments))}};return new Proxy(s||{},handler)};(function(){var _0=dbp(function()_0),_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq=dbp({__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0}),_gat=dbp({__noSuchMethod__:function(){return _gaq}})})()
When I move it next to console.log(), I get no alert

Code: Select all

let dbp=function(s){let handler={get:function(t,n)n in t?t[n]:function(){alert("AAAAAAAAAAAAAAAAAA!!!!");console.log(n);return t.__noSuchMethod__(n,Array.prototype.slice.call(arguments))}};return new Proxy(s||{},handler)};(function(){var _0=dbp(function()_0),_u=function(){};_0.__noSuchMethod__=_0;('ga'in window)||(ga=_u);with(window)urchinTracker=_u,_gaq=dbp({__noSuchMethod__:_0,push:function(f){if(typeof f=='function')f();else if(f&&f.shift&&f[0]in this)this[f.shift()].apply(this,f)},_set:function(a,b){if(typeof b=='function')b()},_link:function(h){if(h)location.href=h},_linkByPost:function(f){if(f&&f.submit)f.submit();return true},_getLinkerUrl:function(u){return u},_trackEvent:_0}),_gat=dbp({__noSuchMethod__:function(){return _gaq}})})()
Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

Ah, I do see one thing I changed without noticing that I did so, but I don't understand why this would make a difference...

EDIT That's not it. Removed irrelevant NoScript patch that wouldn't have helped.
See below for info on why the problem is happening
/EDIT

Thanks again ceri for the testing.
Last edited by barbaz on Sat Jan 16, 2016 4:16 am, edited 1 time in total.
Reason: remove outdated suggestion
*Always* check the changelogs BEFORE updating that important software!
-
jdigital
Posts: 10
Joined: Wed Mar 19, 2014 6:55 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by jdigital »

Hi Barbaz, I also found that your "diagnostic" surrogate fixes Google Keep. In the Google Keep page, I discovered that the $S function is defined as this:

Code: Select all

(function (a,b,c){Tj.call(this,b,c);this.na=a;sj(this,a.getId());this.$=new ig(0,0);this.ma=new sp("Remove",void 0,c);this.Ja(this.ma);this.Ha=this.oa=0;this.qa="";this.R=this.U=null;this.Ba=Xm(a).getId();this.ta=new xk(this.gG,3E3,this);this.La=0;ZS(this)})
unminified:

Code: Select all

(function(a, b, c) {
    Tj.call(this, b, c);
    this.na = a;
    sj(this, a.getId());
    this.$ = new ig(0, 0);
    this.ma = new sp("Remove", void 0, c);
    this.Ja(this.ma);
    this.Ha = this.oa = 0;
    this.qa = "";
    this.R = this.U = null;
    this.Ba = Xm(a).getId();
    this.ta = new xk(this.gG, 3E3, this);
    this.La = 0;
    ZS(this)
})
So perhaps Google Keep is defining $S, which is used by the NoScript surrogate for google-analytics, causing the surrogate to fail, which is causing Keep to fail.
Last edited by jdigital on Sat Feb 27, 2016 7:45 pm, edited 1 time in total.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

Interesting... not sure but I think you might be right about that. Nice find.
I'll do some testing later to try to confirm for sure whether it's possible.
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

@jdigital: Thanks for your work, that *is* what's going on here!
The root cause of the problem is the surrogate's use of the

Code: Select all

with(window){ /* ... */ }
construct - I don't understand what that is exactly but it's apparently force-overriding local variables (that includes $S) with equivalently-named properties of window.

Off to read about that syntax on MDN: https://developer.mozilla.org/docs/Web/ ... ments/with
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

I'm not sure how to fix the surrogate, it has too much other JS syntaxes still unknown to me :(

PMed Giorgio.
*Always* check the changelogs BEFORE updating that important software!
-
jdigital
Posts: 10
Joined: Wed Mar 19, 2014 6:55 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by jdigital »

barbaz, we all thank you!
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: keep.google.com gives blank page in FF41 with NS 2.6.9.3

Post by barbaz »

There are a NoScript release 2.9.0.3rc1 and 2.9.0.3 (available only from AMO atm) that seems to have dropped the problematic `with` statement from the ga surrogate, even though the changelog doesn't mention it. Does the problem with Google Keep still occur despite the latest NoScript?
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply