Greasemonkey: Having even a trivial @run-at document-start script enabled may make ImageDocuments fail to load

Created on 19 Jul 2017  ·  18Comments  ·  Source: greasemonkey/greasemonkey

Steps:

  1. Install and enable this script:
// ==UserScript==
// @name        EMPTY
// @namespace   empty
// @include     *
// @run-at      document-start
// @version     1
// @grant       none
// ==/UserScript==
  1. Open a new tab and load an ImageDocument.
  2. Observe a blank page.

Firefox 54. The issue can be worked around by removing the // @run-at document-start directive, disabling all scripts with it, or disabling GM entirely.

All 18 comments

Does not reproduce, works fine for me, image continues to load.

Maybe this is related to #2500.

Well, it reproduces every time for me. I do have NoScript installed as well... should probably research this more.

Okay, this seems to be an interaction between multiple extensions. I managed to reproduce with only three of my extensions enabled:

  • Privacy Badger
  • Greasemonkey
  • Copy Links

Disabling any one of these will make the bug go away. I can also trigger the bug with a different set of extensions; there is only one extension which I can disable to make the issue disappear reliably, and that is GM, so that's where I'm going to put the blame.

Copy Links

Which of them is correct?

Which of them is correct?

What?

It works for me (I don't have the problem mentioned above),

I also have this issue with FF54 on linux. Either fully disabling Privacy Badger (not just clicking 'disable on this site') or disabling the one script I have installed using "run-at document-start" lets me view direct image links again.

I don't have the copy links addon installed.

I am not crazy, it seems! Here's another minimal set of extensions that triggers the bug for me:

It seems crucial that at least one WebExtension and one other non-WebExtension has to be included in the set for the issue to appear.

I've now tested in a brand new FF profile with only:

  • Greasemonkey + the test script in OP.
  • Privacy Badger
  • Ubuntu Modifications

with the same result, disabling any one of the three gets images loading again

It seems crucial that at least one WebExtension and one other non-WebExtension has to be included in the set for the issue to appear.

This. uBlock Origin just recently updated to a WebExt hybrid and it broke my images. The fix was to downgrade uBlock Origin...

I can verify the report by @fstirlitz.

Having any userscript enabled with @run-at document-start with a particular WebExtension will cause image URLs to fail. Switching the script to document-idle or document-end will fix the image URL problem, but breaks the userscript's functionality relying on document-start.

In my case, the particular extension causing this problem is uBlock Origin 1.14.4 (WebExtension version). As mentioned by @Sxderp, downgrading to uBo 1.13.8 is a temporary workaround. The alternative is to disable the offending userscripts in Greasemonkey.

Hi,
I think this is a bug in Firefox: https://bugzil.la/1396395
and it has been fixed in future release.

The actual STR is pretty tricky, the key is non-e10s mode, with any WE which will observe http response, and a @run-at document-start userscript with GreaseMonkey 3.x.

Okay, this seems to be an interaction between multiple extensions.

You're right, GM + Ublock origin does this for me, If I disable ublock it start to work fine

No problem here with GreaseMonkey 3.14 (5 scripts running at document-start) / Waterfox 50.1.0 (=Firefox 55.0.3) / Windows 7 x64
uBO is 1.14.10 but legacy add-on, not the Webextension, and maybe does that make the difference if the pair GM+uBO is the culprit?

I downgraded to ublock origin 1.13.8 (last version that isn't the web extension) and greasemonkey loads images just fine!
As mazesy said, it is ublock origin web extension being the culprit!

Was this page helpful?
0 / 5 - 0 ratings