Page 1 of 1

[FIXED] 11.0.44rc cs order problem

Posted: Sat Sep 12, 2020 8:39 am
by skriptimaahinen
A weird one that took too much of my time.

Sometimes (very rarely) the SyncFetchPolicy fails to run on the page (both FF 80 & 81). Could not figure a surefire way to reproduce, but here are the steps that might manifest it:

- Open any page.
- Reload and/or navigate to about:newtab and back. (Maybe necessary or not?)
- Wait for 5 minutes or more. (Important step!)
- Navigate to about:newtab and back.
- Observe SyncFetchPolicy failing to run.

If the above works once, it happens reliably after every 5+ min wait until the tab is closed. If not, closing and reloading tab/browser/NoScript might be what it takes. But it can be hard to get it into the right state. Whatever that might be. Also no idea where the ~5 min cutoff comes from. Simply determined by trial and error.

The clear underlaying reason for the SyncFetchPolicy failing to run is that the SyncFetchPolicy.js and DocumentFreezer.js are run after the other contentscripts.

The docs do state the contentscripts are run in the order they appear in the array, but there is no mentioning how multiple arrays are handled. So not sure if bug or not, but fallback is needed in case this might happen on other circumstances.

Re: 11.0.44rc cs order problem

Posted: Sat Sep 12, 2020 7:25 pm
by Giorgio Maone
Should be fixed in latest development build, thanks.
v 11.0.44rc3
============================================================
x Fixed media placeholder not shown when blocking Youtube
movies
x Work around for unpredictable content script execution
order
x Ensure content of NoScript prompts is always visible

Re: 11.0.44rc cs order problem

Posted: Sun Sep 13, 2020 1:36 pm
by skriptimaahinen
Typo in staticNS.js:49 - pendingFetchPolicy should be pendingSyncFetchPolicy, I assume.

Re: 11.0.44rc cs order problem

Posted: Sun Sep 13, 2020 10:46 pm
by Giorgio Maone
Fixed in latest development build, thanks.
v 11.0.44rc4
============================================================
x Fixed namespacing issues with script replacements
x Fixed typo in content script ordering work-around