cookie banner service causes webpage to keep reloading
Categories
(Core :: Privacy: Anti-Tracking, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox118 | --- | unaffected |
| firefox119 | --- | unaffected |
| firefox120 | --- | unaffected |
| firefox121 | --- | affected |
People
(Reporter: felix.bau, Assigned: abhishekmadan)
References
Details
Attachments
(1 file)
|
11.27 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/120.0
Steps to reproduce:
Enable the feature that auto clicks cookie banners.
Surf to https://www.comedycentral.tv/
Actual results:
It keeps on reloading the page.
Everytime it finishes loading, the page get's reloaded (probably due to the cookie related action being repeated over and over again)
Expected results:
The cookie settings should only be set once.
The page permanently shows a button in the bottom left corner that doesn't go away. Which causes the new feature to think that there are further cookies to disable I assume. (even though there aren't)
See webcompat:
https://github.com/webcompat/web-bugs/issues/128165
Current beta (119.0b6) is not affected even though it boosts the feature.
The bug only occurs in Nightly.
I just did some regression testing and found the commit introducing it
2023-10-09T03:46:14.334000: DEBUG : Found commit message:
Bug 1820793 - Enable global cookie banner handling rules in Nightly. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D187977
2023-10-09T03:46:14.334000: DEBUG : Did not find a branch, checking all integration branches
2023-10-09T03:46:14.335000: INFO : The bisection is done.
2023-10-09T03:46:14.336000: INFO : Stopped
:pbz Sorry to bother you Paul, maybe you could take a look :)
During regression testing I discovered, that the bug often doesn't trigger on the first page load.
First page load (no cookies on load)
Reload to reject cookies (banner)
nothing happens
but every consecutive reload from now on triggers endless pagereloads
(during a few runs I had to increase the window size to actually trigger the bug (I think) by maximing the window; but I'm not 100% certain. Maybe another reload without window size increase would've triggered it as well)
Comment 3•2 years ago
|
||
Bug 1854940 will help mitigate these "loop" issues. But it's still not ideal. We shouldn't try to handle an already handled banner.
Comment 4•2 years ago
|
||
This rule is causing the breakage, it tries to click a banner that's present in the DOM, but not visible: https://github.com/mozilla/cookie-banner-rules-list/blob/983f29aae02e830c49614e3aa23a2700d9a41633/cookie-banner-rules-list.json#L57-L64
A fix would be to split up the global onetrust rule into two rules with the "presence" selectors set on the actual parent and not the wrapper (which is always a visible element?):
{
"id": "onetrust-banner-sdk",
"domains": [],
"click": {
"optIn": "#onetrust-accept-btn-handler",
"optOut": "#onetrust-reject-all-handler",
"presence": "#onetrust-banner-sdk"
}
},
{
"id": "onetrust-pc-sdk",
"domains": [],
"click": {
"optIn": "#accept-recommended-btn-handler",
"optOut": ".ot-pc-refuse-all-handler",
"presence": "#onetrust-pc-sdk"
}
Comment 5•2 years ago
|
||
The rules above seem to break some sites. The banner is handled but the overlay doesn't disappear. For example https://www.sport.pl/ is affected. We will need to tweak the rule some more.
Comment 6•2 years ago
|
||
Only affects current Nightly where global rules are enabled.
Comment 7•2 years ago
|
||
Abhishek, this is the bug I've mentioned that you could take once you're done with your other work.
Comment 8•2 years ago
|
||
Bumping priority. This needs to be addressed in the current cycle.
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Fixed via rule change: https://github.com/mozilla/cookie-banner-rules-list/pull/272
Description
•