-
Notifications
You must be signed in to change notification settings - Fork 79
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
Cosmetic filters not working on many websites with "Experimental Web Platform features" in chrome://flags
#1751
Comments
|
Since I can't reproduce, whoever can reproduce such issue will have to investigate the cause of it. |
I'm having the same issues with cosmetic filtering not applying on both Chrome and Edge for at least one or two months now. I've been trying to repro with no avail, what I do know is that wiping my entire user data clean does the charm 🤷 |
If you experience such issue, please report useful details along the report, just pointing out you suffer the same issue does not help. For all I know, it could be a misconfiguration issue such as broad exception filters or subscribing to bad filter lists (example). Resetting to default settings/lists will typical resolve such issue when the cause is bad filters/rules/lists. |
FWIW I noticed this after updating Chromium to 94 (or maybe 93) on Linux. Didn't change settings/filters for a long time. This also happened to my Vivaldi installation on Windows. EDIT: reinstalling extension fixed this issue for me. |
Found a temporary solution. After I uncheck "Parse and enforce cosmetic filters" , all my filters started working on the all those website I was facing problem with. It seems like there is some glitch with this option or manual custom filters don't work when I check this option. But strangely this happens only on some site. Facing this on two more sites https://www.coolztricks.com/ and https://timesofindia.indiatimes.com/world/china/taiwan-rejects-chinas-path-amid-show-of-military-force/articleshow/86913666.cms |
So possibly I might be able to reproduce if I have the same custom filters? Can you share? It's quite possible that some very specific problematic cosmetic filters are wholly breaking cosmetic filtering -- though uBO is supposed to detect such problematic cosmetic filters and discard them. |
I went to |
Something similar is happening to me: I've been using Unchecking "Parse and enforce cosmetic filters" doesn't seem to fix the issue for me (inuitively, it makes it worse by showing even more of the topics bar). Reinstalling the extension doesn't seem to have helped either. Unfortunately, I'm not well-equipped to diagnose the issue, as I'm incredibly ill-versed in JavaScript. |
After following those instructions, the Twitter trends sidebar was blocked successfully. After some trial and error, it seems like using any of these filters (alone or together) breaks custom filters (but not the default filters):
None of these seem to be related to the trends bar from a quick glance (they are intended to block various other nuisances). Should I file this as a separate issue, or is this expected behaviour given the structure of the Twitter website? Edit: I seem to be having a similar issue on https://old.reddit.com: promoted posts (ads) aren't filtered. The filter |
Found the culprit. For me whenever I use filter list named "AdGuard Base" with "Parse and enforce cosmetic filters" as checked, I face the issue. And when I uncheck the "AdGuard Base". The issue disappears. Something is clashing with AdGuard Base |
Report AdGuard filters list issues at https:/AdguardTeam/AdguardFilters/issues |
Why ? He's using custom filters that are not part of the default filter lists, will be closed and marked as invalid too. Whereever he found those filters, he should report there. |
He clarified that #1751 (comment), those 4 filters are not present in any default filter lists. |
Re-opening, one cosmetic filter should not prevent another cosmetic filter from being applied, unless they are exception filters. I would like to know which exact filter does not work on which exact site (with a description of what the filter is supposed to hide) when AdGuard Base is enabled -- actually when an exact disclosed set of filter lists/custom filters are enabled. Also, in which exact browser -- I typically test in current stable Chromium on my side. Promoted posts are properly hidden on my side on |
In your original report, you stated you were using only default filter lists, AdGuard Base is not a default list. |
I'm running into the exact same problem with the "uBlock Filters" list on old.reddit.com using uBlockOrigin on Vivaldi in Linux. uBO will hide .promotedlink and .premiumbanner as asked only if "uBlock Filters" is turned off; none of the other 'built-in' filter lists have that effect. (edited for clarity) |
+1 Same thing happening here. |
Adding the exceptions works. The promoted ads are no longer showing. |
Can you try to narrow down which specific exception works? |
|
I am not proposing adding any of the exceptions in a filter list, I am just trying to understand how those exception filters are have any effect. For this I need to first know which one to investigate. |
This is the one that works. The other 3, on their own, have no effect. |
Thanks. Can you provide me with an exact URL where you can reproduce the issue? If I have an exact URL, I won't worry that I am trying to reproduce an issue which could depend on something very specific on a very specific page. |
I was using: |
What's the browser and browser version? |
I can't understand why Are you using other extensions which could have an effect on Reddit beside uBO? |
When the issue occurs, any errors in the Reddit page's dev console or uBO's dev console? |
Beside default ones, did you enable more lists in "Filter lists"? |
When I select a promoted post (which is properly hidden on my side) in the DOM, I can confirm that there is a stylesheet injected by uBO: Do you see such stylesheet on your side? What is the difference on your side regarding this with and without the exception filter which appears to trigger an issue? |
I am starting to suspect something is not working as expected in Chromium: https://www.reddit.com/r/uBlockOrigin/comments/qgd6fe/reddit_promoted_posts_getting_through/. So from all the information I got I this point, it appears the cosmetic filter That filter is a procedural cosmetic filter, and it is manually enforced through JS by uBO, not declaratively through a stylesheet. If that filter was injected through a stylesheet, this would break cosmetic filtering because the browser would reject the whole CSS declaration since it would detect an invalid CSS selector in it. uBO knows that I am trying to figure out how the detection could fail. It theoretically could fail at this line if uBO was unable to create a |
Finally, with the help of Reddit user, the root of the issue has been found:
So the issue occurs when one enables "Experimental Web Platform features" in The reddit user was able to track down changes in Chromium code which is quite probably related to this. For now I need to think through how to best fix this in an emergency release. |
chrome://flags
Related issue: - uBlockOrigin/uBlock-issues#1751 Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/qgd6fe/ It turns out Chromium has started to implement the `:has()` operator, which becomes recognized when the browser flag "Experimental Web Platform features" is enabled. However the hic is that `:has()` is not supported as a declarative CSS style rule and is only supported through `querySelector()` et al. The fix is to no longer detect plain CSS selectors through `querySelector` et al. but rather use an actual stylesheet to validate that a cosmetic filter can be injected into a stylesheet in a declarative way. Additionally, I added support to enforce ABP's semantic regarding cosmetic filter with the `#?#` anchor: when using such anchor, uBO will _first_ try to compile the filter as a procedural one rather than a declarative one. Related discussion: - uBlockOrigin/uBlock-issues#1011 (comment)
I need to keep track of all related commits for when I prepare a revision for stable release: |
Prerequisites
I tried to reproduce the issue when...
URL(s) where the issue occurs
Describe the issue
The cosmetic filters that I apply manually via "Element picker mode" are saved in my filter lists. When I click on preview, the selected element disappears from the page. After clicking on pick and reloading the page, those same elements appear again. There is no change in their class or id. I had checked in the filter list also, they are there.
These are some of the websites on which it is not working.
Screenshot(s)
No response
uBlock Origin version
1.38.2
Browser name and version
Microsoft Edge 96.0.1033.0 (Official build) canary (64-bit)
Settings
! 2021-10-05 https://timesofindia.indiatimes.com
timesofindia.indiatimes.com##.article-content-wrapper.clearfix.wrapper > .sidebar
in the filter list and javascript is also blocked in the ublock origin for this website
Notes
This seems to be some issue with filter lists as after every alternate update my filters break. Facing this problem since 1.37 has been launched.
The text was updated successfully, but these errors were encountered: