Closed Bug 1720171 Opened 4 years ago Closed 4 years ago

Specific site fails to load with Enhanced Tracking Protection (likely due to Analytics shim)

Categories

(Core :: Privacy: Anti-Tracking, defect)

Firefox 92
x86_64
All
defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox90 --- unaffected
firefox91 --- fixed
firefox92 --- verified

People

(Reporter: kats, Assigned: kats)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(2 files)

There are a couple of pages on the Hamilton Public Library website that do not render correctly with ETP enabled. The pages require logging in, I can provide my credentials to developers who need to test (also I can test patches).

When the page loads, it flashes some content and then immediately is replaced by an error page. The web console shows a JS error about window.ga.getAll().filter not being found, where I'm assuming ga is the shimmed Google Analytics thing. Screenshot attached.

This is on macOS, Firefox nightly 2021-07-10. I've also seen it on Fenix, it's been happening for a while.

Looks like the real GA code returns an Array for window.ga.getAll() while the FF shim returns an Iterator. Should be easy enough to fix.

Assignee: nobody → kats

I used mozregression to confirm this is a regression from bug 1713687, which changed ga.getAll() from returning an empty hard-coded Array to returning an Iterator (tracker.values()). I kicked off a try push to test a fix.

Regressed by: 1713687
Has Regression Range: --- → yes

Verified try push resolves the problem.

The original GA code returns an Array for ga.getAll(), while the
shim was returning an Iterator. This caused code that relied on
ga.getAll().filter(..) to break with the shim. This patch wraps
the Iterator contents back into an Array.

Version: unspecified → Firefox 92
Attachment #9230927 - Attachment description: Bug 1720171 - Ensure ga.getAll().filter exists. r?twisniewski → Bug 1720171 - Ensure ga.getAll().filter exists in SmartBlock Google Analytics shim. r?twisniewski
Pushed by twisniewski@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/77aebc0081f7 Ensure ga.getAll().filter exists in SmartBlock Google Analytics shim. r=twisniewski,webcompat-reviewers
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Kartikaya, is that a common enough issue that we should uplift the fix to beta 91? Thanks

Flags: needinfo?(kats)

I don't really know how common it is, but the website where I encountered it is using a template shared by other sites too. Given that the fix seems low-risk I would lean towards uplifting.

Flags: needinfo?(kats)

Comment on attachment 9230927 [details]
Bug 1720171 - Ensure ga.getAll().filter exists in SmartBlock Google Analytics shim. r?twisniewski

Beta/Release Uplift Approval Request

  • User impact if declined: Some websites may not function properly
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Seems pretty low risk
  • String changes made/needed: none
Attachment #9230927 - Flags: approval-mozilla-beta?

Kartikaya, this patch does not graft cleanly to beta as we have version 24.0.0 of the webcompat intervention addon while this patch is on top of bug 1713701 which shipped a version 24.1.0, should we also uplift bug 1713701?

Flags: needinfo?(kats)

I'll defer that question to :twisniewski as I'm not familiar with development process in this area.

Flags: needinfo?(kats) → needinfo?(twisniewski)

@Pascal, you may uplift both if you'd like, or you can simply change the version number in this patch to the next one up for beta. (The patches should otherwise not conflict, IIRC).

Flags: needinfo?(twisniewski)

Comment on attachment 9230927 [details]
Bug 1720171 - Ensure ga.getAll().filter exists in SmartBlock Google Analytics shim. r?twisniewski

Thanks, let's uplift this one in beta 5 and also take bug 1713701

Attachment #9230927 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Tried to verify the fix on Firefox 92 beta 7 but I do not have the credentials for the Hamilton Public Library website.

Kartikaya, when time permits, could you please confirm the issue is fixed?

Thanks!

Flags: needinfo?(kats)

I verified this is fixed on the latest beta. Thanks!

Flags: needinfo?(kats)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: