Specific site fails to load with Enhanced Tracking Protection (likely due to Analytics shim)
Categories
(Core :: Privacy: Anti-Tracking, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox90 | --- | unaffected |
firefox91 | --- | fixed |
firefox92 | --- | verified |
People
(Reporter: kats, Assigned: kats)
References
(Regression, )
Details
(Keywords: regression)
Attachments
(2 files)
156.88 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
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.
Assignee | ||
Comment 1•4 years ago
|
||
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 | ||
Comment 2•4 years ago
|
||
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.
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Verified try push resolves the problem.
Assignee | ||
Comment 4•4 years ago
|
||
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.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 6•4 years ago
|
||
bugherder |
Comment 7•4 years ago
|
||
Kartikaya, is that a common enough issue that we should uplift the fix to beta 91? Thanks
Assignee | ||
Comment 8•4 years ago
|
||
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.
Assignee | ||
Comment 9•4 years ago
|
||
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
Updated•4 years ago
|
Comment 10•4 years ago
|
||
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?
Assignee | ||
Comment 11•4 years ago
|
||
I'll defer that question to :twisniewski as I'm not familiar with development process in this area.
Comment 12•4 years ago
|
||
@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).
Comment 13•4 years ago
|
||
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
Comment 14•4 years ago
|
||
bugherder uplift |
Comment 15•4 years ago
|
||
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!
Assignee | ||
Comment 16•4 years ago
|
||
I verified this is fixed on the latest beta. Thanks!
Description
•