The header is missing from homedepot .ca in Private browsing
Categories
(Core :: Privacy: Anti-Tracking, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox104 | --- | affected |
People
(Reporter: ctanase, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file, 1 obsolete file)
898.76 KB,
image/png
|
Details |
Environment:
Operating system: Android 11 (ONEPLUS A6000)
Firefox version: Nightly 104.0a1-20220710094429
Preconditions:
- VPN required for users outside of Canada.
- Open Private window.
Steps to reproduce:
- Go to: https://www.homedepot.ca/en/home.html
- Observe the header
Expected Behavior:
The header is visible on the page.
Actual Behavior:
The header is missing from the page.
Notes:
- Screenshot provided
- Not reproducible on Chrome Incognito mode
- Reproducible in Private regardless of ETP status
- Not reproducible with Normal browsing regardless of ETP status
Comment 1•2 years ago
|
||
It's probably because the indexedDB is not defined in PBM. I can see the error message on the console.
Comment 2•2 years ago
•
|
||
Yes, I see Uncaught ReferenceError: IDBRequest is not defined
in the console.
They check for both IDBRequest
and IDBOpenDBRequest
and then try to open a database, so we can fix this with a tweak to our Firebase shim so it also defines those two APIs as empty objects.
@krosylight, maybe it's worth also adding those two to the list of "proxable" interfaces you exposed in https://phabricator.services.mozilla.com/D151086 ? That way we wouldn't need to adjust the Firebase shim, just add HomeDepot to the list of sites "using" it.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Thanks for the ping.
A quick search says it's from a library named zone.js (from Angular, so it's again from Google! Oh Google).
if (typeof IDBIndex !== 'undefined') {
patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);
patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);
}
@krosylight, maybe it's worth also adding those two to the list of "proxable" interfaces you exposed in https://phabricator.services.mozilla.com/D151086 ? That way we wouldn't need to adjust the Firebase shim, just add HomeDepot to the list of sites "using" it.
Sounds like the answer here.
Comment 4•2 years ago
|
||
One thing is that, it checks the existence of IDBIndex
which we had to expose because of idb@v3. 😞
Comment 5•2 years ago
|
||
Comment 6•2 years ago
|
||
Alright, makes sense, thanks for confirming. Once we're happy with this patch, I'll add a follow-up patch as needed to make sure the open
method is handled as well (via the Firebase shim).
Comment 7•2 years ago
|
||
I haven't checked whether this patch works yet. I'm not sure it's worth to fix this way if it still needs another patch for .open()
.
Comment 8•2 years ago
•
|
||
(I had to switch to my local machine as it didn't work to have both office VPN and another to Canada.)
So it does require a separate patch for .open()
😞
The most ideal option is to make typeof IDBIndex !== 'undefined'
false. We do have a very hacky option for that: make it work just like document.all
does. (It allows accessing its property but typeof
or boolean check will see it as if it's undefined
.) I really didn't want to go that way but it seems that's the only good way to fulfill both requirements from zone.js and idb@v3.
Edit: But document.all
is a property. We may instead make window.indexedDB
work that way 🤔
Updated•2 years ago
|
Comment 9•2 years ago
•
|
||
The updated patch kinda works for this website and probably also for bug 1779536. One significant caveat is that there's no way for bindings code to check whether the current document is in PBMode. IMO there theoretically can be a process-wide boolean for PBMode in Fission but then Android has no Fission.
Comment 10•2 years ago
•
|
||
I just landed a shim for this in bug 1771783, which should ship with the 104 release. There is one problem that I can't resolve with shims just yet, however. The site also tries to access iDB from a web worker, which web extensions cannot "shim" as far as I can tell.
So while the header on the page will work as of bug 1771783, the worker will not run properly, which might cause other features on the site to break (and will at least spam "too much recursion" errors in the web console as the site repeatedly tries and fails to load the worker).
Comment 11•2 years ago
|
||
This was indeed fixed in bug 1771783, so I'll close this bug as such. We can reopen or revisit this in another bug when we explore a lower-level fix for this when Kagami returns from PTO.
Updated•2 years ago
|
Description
•