Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some rules are not applied with adblocker-puppeteer. #1683

Closed
TimotheeJeannin opened this issue Feb 16, 2021 · 4 comments · Fixed by #1688
Closed

Some rules are not applied with adblocker-puppeteer. #1683

TimotheeJeannin opened this issue Feb 16, 2021 · 4 comments · Fixed by #1688

Comments

@TimotheeJeannin
Copy link

Hi @remusao,

Thank you for the latest release !

I tried to upgrade from 1.18.3 to 1.20.1.
When I navigate to https://www.oberlo.fr/ the cookie banner is no longer hidden.
On version 1.18.3, the css code #gdpr-banner { display: none !important; } was injected in the page but it's no longer the case with version 1.20.1. (It's supposed to be injected because of the ###gdpr-banner rule in the easylist cookie rule list)

I tried to pinpoint the exact version that is causing the regression but it looks like it might be caused by a sub-dependency that was locked by the package-lock.json file.

If I don't upgrade, keep version 1.18.3 of @cliqz/adblocker-puppeteer and @cliqz/adblocker in package.json, remove the package-lock.json file, delete the node_modules directory and re-install, the issue appears.

Here are the dependencies that were locked :

├─┬ @cliqz/adblocker@1.18.3
│ ├── @remusao/guess-url-type@1.2.0
│ ├── @remusao/small@1.2.0
│ ├─┬ @remusao/smaz@1.9.0
│ │ ├─┬ @remusao/smaz-compress@1.9.0
│ │ │ └── @remusao/trie@1.4.0
│ │ └── @remusao/smaz-decompress@1.9.0
│ ├─┬ @types/chrome@0.0.123
│ │ ├─┬ @types/filesystem@0.0.29
│ │ │ └── @types/filewriter@0.0.28
│ │ └── @types/har-format@1.2.4
│ ├── @types/firefox-webext-browser@78.0.1
│ └─┬ tldts-experimental@5.6.54
│   └── tldts-core@5.6.54
├─┬ @cliqz/adblocker-puppeteer@1.18.3
│ ├── @cliqz/adblocker@1.18.3 deduped
│ ├── @cliqz/adblocker-content@1.18.3
│ └── tldts-experimental@5.6.54 deduped

Here are the dependencies when this starts to fail:

├─┬ @cliqz/adblocker@1.18.3
│ ├── @remusao/guess-url-type@1.2.1
│ ├── @remusao/small@1.2.1
│ ├─┬ @remusao/smaz@1.9.1
│ │ ├─┬ @remusao/smaz-compress@1.9.1
│ │ │ └── @remusao/trie@1.4.1
│ │ └── @remusao/smaz-decompress@1.9.1
│ ├─┬ @types/chrome@0.0.123
│ │ ├─┬ @types/filesystem@0.0.29
│ │ │ └── @types/filewriter@0.0.28
│ │ └── @types/har-format@1.2.5
│ ├── @types/firefox-webext-browser@78.0.1
│ └─┬ tldts-experimental@5.7.6
│   └── tldts-core@5.7.6
├─┬ @cliqz/adblocker-puppeteer@1.18.3
│ ├── @cliqz/adblocker@1.18.3 deduped
│ ├─┬ @cliqz/adblocker-content@1.20.1
│ │ └── @cliqz/adblocker-extended-selectors@1.20.1
│ └── tldts-experimental@5.7.6 deduped

Let me know if there is anything I can do to help you solve this. :)

Tim

@TimotheeJeannin
Copy link
Author

Hi @remusao,

I made some more tests and it looks like with the package @cliqz/adblocker-content version 1.19.0 the cookie banner is properly removed, but with version 1.20.0 it's not.

@remusao
Copy link
Collaborator

remusao commented Feb 18, 2021

Hi Tim,

Thanks for taking the time to investigate, this was very helpful to identify the issue. I have pushed a fix here #1688

v1.20.0 introduced a regression in @cliqz/adblocker-puppeteer which prevented mutations of the DOM from being observed.

Best,

@TimotheeJeannin
Copy link
Author

Hi @remusao, Thank you very much ! The last release fixed my issue. Have a great day ! :)

@remusao
Copy link
Collaborator

remusao commented Feb 20, 2021

Hi @TimotheeJeannin, glad to know it worked for your use-case! Have a great weekend :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants