Open Bug 1846831 Opened 3 years ago Updated 3 years ago

Firefox XML error-pages fail to render (particularly on first load) if uBlock origin is installed (even if its blocking capability is disabled)

Categories

(WebExtensions :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: dholbert, Unassigned, NeedInfo)

References

Details

Attachments

(1 file)

STR:

  1. Starting with a fresh profile (optional), install uBlock origin from https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
  2. Visit an invalid XML page like the following:
data:image/svg+xml, <?xml

...or load https://bug1846814.bmoattachments.org/attachment.cgi?id=9347007

EXPECTED RESULTS:
Yellow page with red box, with a description of the XML error inside the red box.

ACTUAL RESULTS:
Yellow page with a red box, with zero visible text. (DevTools console does contain the text of the XML error, but content area has zero text).

ADDITIONAL NOTES:

  • Sometimes the issue resolves itself on reload (particularly with the above-quoted data URI, and occasionally with the above-linked SVG image). But if I load an offending URI in a new tab, I see the issue again.
  • This happens even if I turn off uBlock's blocking (e.g. by clicking its icon in my extensions menu or toolbar and clicking its "power" icon)

If I disable uBlock Origin entirely by toggling the slider in about:addons, then the issue goes away.

I'm not sure to what extent this is a bug in uBlock origin itself, vs. in Firefox's pageload and/or WebExtensions machinery. Starting this out as a WebExtensions bug but we may want to morph or file additional bugs.

Summary: Firefox XML pages fail to render (particularly on first load) if uBlock origin is installed (even if it's disabled) → Firefox XML erorr-pages fail to render (particularly on first load) if uBlock origin is installed (even if its blocking capability is disabled)
Attachment #9347018 - Attachment description: screencast showing the isssue → screencast showing the issue at e.g. t=0:03 (blank yellow page when uBO is enabled) vs. 0:27 (proper error page when uBO is fully disabled in addons manager)
Attachment #9347018 - Attachment description: screencast showing the issue at e.g. t=0:03 (blank yellow page when uBO is enabled) vs. 0:27 (proper error page when uBO is fully disabled in addons manager) → screencast showing the issue at e.g. t=0:03 (blank yellow page when uBO is enabled, which only gains error text on reload) vs. 0:27 (proper error page when uBO is fully disabled in addons manager)
Summary: Firefox XML erorr-pages fail to render (particularly on first load) if uBlock origin is installed (even if its blocking capability is disabled) → Firefox XML error-pages fail to render (particularly on first load) if uBlock origin is installed (even if its blocking capability is disabled)

I'm linking two existing bugzilla issue that may be potentially related to the same underlying issue (Bug 1744992 and Bug 1747547).

Based on the screencast attached to comment 1 it looks like the error page isn't fully rendering while ublock is still installed (and disabling ublock on the page may mean the ads will not blocked by maybe there is still a content script being injected into the xml page) and so I wouldn't exclude this one may actually be a duplicate of Bug 1744992.

See Also: → 1747547, 1744992

FWIW I can reproduce this in Nightly 2020-06-01 (v79.0a1), which is about as far back as AMO will let me install the current version of uBlock origin.

I can test even older builds if I use the oldest available version still hosted on AMO, which is:
https://addons.mozilla.org/firefox/downloads/file/3886236/ublock_origin-1.40.2.xpi

With that, I get this regression range:
Last good revision: 6c0fa9a675c91390ca27664ffb626c56e8afea4d (2018-07-04)
First bad revision: afdeb0288690f0acde2ba6bd008f860e1acdd026 (2018-07-05)
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6c0fa9a675c91390ca27664ffb626c56e8afea4d&tochange=afdeb0288690f0acde2ba6bd008f860e1acdd026

After that range (i.e. 2018-07-05 and newer), with uBlock Origin 1.40.2 installed, I occasionally see a blank yellow page with just a red box (no text) when I load the bugzilla-attachment invalid-XML URL from comment 0. (It sometimes takes many attempts -- loading the URI in new tabs and/or shift+reload -- but I typically hit it with a minute or so of trying.)

Before that range, (i.e. 2018-07-04 and earlier), I've never been able to get this blank yellow page to repro.

(I have no idea offhand which of the changes in that pushlog might be related; none look suspicious at first glance.)

Also: this seems very likely to be a race condition, and the issue only happens if the error is extremely early in the XML document. In particular, I happen to have two bugzilla-hosted variants of the same SVG content, with a different XML error in each (from doing some poking at bug 1846814). They behave quite differently.
Here they are:
(A) https://bug1846814.bmoattachments.org/attachment.cgi?id=9347007 -- this one has an XML error immediately.
(B) https://bug1843799.bmoattachments.org/attachment.cgi?id=9346996 -- this one has an XML error further along.

The "A" version quite reliably triggers this issue for me in current Nightly (with uBO installed) when I load it in a new tab.
The "B" version never triggers this issue for me. So it feels like this is a race between the XML parser vs. some other task that's happening ~simultaneously.

Flags: needinfo?(medinamendez272)

[canceling needinfo from a brand new bugzilla account, which is presumably some form of testing or playing around. Please don't use this Bugzilla instance for that sort of thing.]

Flags: needinfo?(medinamendez272)

The severity field is not set for this bug.
:rpl, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(lgreco)

Keeping ni for Luca because he wants to double-check this issue.

Severity: -- → S4
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: