uBlockOrigin / uBlock-issues

This is the community-maintained issue tracker for uBlock Origin
https://github.com/gorhill/uBlock
945 stars 81 forks source link

Blocked elements reappear #3076

Closed UnitedMarsupials closed 10 months ago

UnitedMarsupials commented 10 months ago

Prerequisites

I tried to reproduce the issue when...

Description

While browsing news on this site, I added a bunch of cosmetic filters hiding away the cruft I don't like seeing on any news-page (invitations to sign up for a newsletter, "related items", etcætera):

offthepress.com##.modal
offthepress.com##.main-header
offthepress.com##.date-bar
offthepress.com##.hidden-xs
offthepress.com##.spiny-ai-br-blocked
offthepress.com##.gform_wrapper
offthepress.com##.main-footer
offthepress.com##.endless-scroll
offthepress.com##.column-break-desktop
offthepress.com##.rel-art-wrap
offthepress.com##.rel-art-header
offthepress.com##.next
offthepress.com##.additional-content
offthepress.com##.btn-black
offthepress.com##p:empty
offthepress.com##p:has-text(/^\s*$/)
offthepress.com##.post-tag
offthepress.com##.slant-style:xpath(../..)
offthepress.com##.header-wrap:has-text(Newsletter)
offthepress.com##.share-widget

While I was doing this, the elements were disappearing -- as they are supposed to. I then opened another article on the same site, and saw the same cruft appear...

Wondering, if somehow my filters weren't saved, I opened the "Own Filters" tab in the settings, and, sure enough, here they are (the above list is a copy-paste from the tab).

If I add the same filter again, the element will disappear -- and the duplicate filter will appear under the "Own Filters". But reloading the page will show the already-blocked element(s) once more... I even tried disabling all JavaScript for the site -- to no avail.

Note, the actual ads are properly disabled -- the "3rd-party filters" must be doing their job(s). But the blacklisted elements keep appearing after a page-reload.

I've been a user of uBO for years -- my current version is 1.5.4.0, inside Firefox-121.0 -- and I haven't run into this until recently :(

Another troublesome site is Reddit -- I have three identical entries already:

www.reddit.com###credential_picker_container

and yet, the silly widget keeps appearing, when I open the site.

A specific URL where the issue occurs.

https://www.offthepress.com/iowa-principal-who-put-self-in-harms-way-to-protect-students-from-mass-shooter-has-died/

Steps to Reproduce

See description

Expected behavior

Blacklisted elements remain hidden.

Actual behavior

Blacklisted elements reappear.

uBO version

1.5.4.0

Browser name and version

Firefox-121.0

Operating System and version

FreeBSD-14

gwarser commented 10 months ago

Do you have "My filters" lists enabled?

Please share troubleshooting information. Go to the site, click the uBO toolbar icon -> the "chat" icon -> "Troubleshooting Information" text on the bottom -> select all, copy and attach here.

gwarser commented 10 months ago

@gorhill there is an issue in dev build (1.54 seems fine) - even with "My filters" list disabled, filters are applied. They are cached somehow - editing the content of "My filters" purges them.

gorhill commented 10 months ago

in dev build

This happens in 1.55.0 too. Toggling on then off "My filters" fix the issue. Pretty sure this is related to the MRU cache code I modified for cosmetic filters in last release.

As for @UnitedMarsupials, the most likely explanation is that their "My filters" is not enabled, will need to wait for troubleshooting information.

UnitedMarsupials commented 10 months ago

Please share troubleshooting information. Go to the site, click the uBO toolbar icon -> the "chat" icon -> "Troubleshooting Information" text on the bottom -> select all, copy and attach here.

uBlock Origin: 1.54.0
Firefox: 121
filterset (summary):
 network: 143884
 cosmetic: 218420
 scriptlet: 32326
 html: 2239
listset (total-discarded, last-updated):
 removed:
  user-filters: null
  ublock-quick-fixes: null
 added:
  https://filters.adtidy.org/extension/ublock/filters/14.txt: 76422-7581, 1d.5h
  https://secure.fanboy.co.nz/fanboy-annoyance_ubo.txt: 95055-80619, 9h.59m
  ublock-annoyances: 6505-11, 3h.59m
  fanboy-thirdparty_social: 68-0, 8d.11h.10m
  fanboy-cookiemonster: 49205-218, 5d.10h.2m
  fanboy-social: 16057-17, 5d.18h.2m
  adguard-social: 22343-738, 3d.23h.1m
 default:
  ublock-filters: 37035-75, 3h.59m
  ublock-badware: 7746-11, 3h.59m
  ublock-privacy: 957-0, 3h.59m
  ublock-unbreak: 2234-0, 3h.59m
  easylist: 77393-650, 3h.59m
  easyprivacy: 43439-832, 3h.59m
  plowe-0: 3784-1, 8d.15h.10m
  RUS-0: 40258-167, 3h.59m
  urlhaus-1: 9445-0, 4h.59m
filterset (user): [array of 1943 redacted]
trustedset:
 added: [array of 62 redacted]
switchRuleset:
 added: [array of 115 redacted]
hostRuleset:
 added: [array of 112 redacted]
userSettings:
 advancedUserEnabled: true
hiddenSettings: [none]
supportStats:
 allReadyAfter: 1775 ms (selfie)
 maxAssetCacheWait: 290 ms
popupPanel:
 blocked: 56
 no-scripting: true
 network:
  offthepress.com: 38
  amazon-adsystem.com: 2
  decide.dev: 1
  doubleclick.net: 2
  facebook.com: 1
  fonts.googleapis.com: 1
  google.com: 2
  googlesyndication.com: 1
  googletagmanager.com: 2
  sharethis.com: 1
  spiny.ai: 5
 extended:
  ##.social-nav
  ##.social-widget
  ##.share-widget
  ##.sharethis-inline-share-buttons
  ###taboola-below-article-thumbnails
  ###stickyAd
  ##.sidebar-ad:not(.adsbygoogle)
  #@#.sidebar-ad
gorhill commented 10 months ago

@UnitedMarsupials

user-filters: null

As suspected, your "My filters" is un-checked in "Filter lists" pane, you just need to check it:

image


ublock-quick-fixes: null

Additionally, you shouldn't disable "uBlock filters -- Quick fixes", that list is used to push urgent fixes (Youtube for example).

UnitedMarsupials commented 10 months ago

As suspected, your "My filters" is un-checked in "Filter lists" pane, you just need to check it

Oh... No idea, how that came about. Thank you. But shouldn't there have been a warning of some sort?

Prevent access to picker when "My filters" is not enabled

Ah, great! Yes, this makes sense -- assuming, the blocking provides an explanation of some sort, unless you want to deal with tickets like "The picker-button is disabled for some reason" :-)

BlazeFTL commented 10 months ago

Instead Of Disabling Element Picker Here https://github.com/gorhill/uBlock/commit/bc641fc02445058617b7d3a7df1542681281bc9c Why Not Disable Only The Create Button In The Element Picker ?

This Is Problematic If I Want To Test Sites As I May Have Lots Of Filters In My Filters For That Site

**Oh I Did Not Read The Post ;( But It Seems A Problem For Me

BlazeFTL commented 2 months ago

I Once Again Ask For A Way To Use Element Picker While My Filter Is Disabled Would Be A Life Saver In A Situation When I Know The Style Rules In My Filters In Causing The Issue

My Suggestion Disable Only The Create Button In Element Picker

garry-ut99 commented 2 months ago

The current workaround/alternative is:

On Desktop: in My filters: to press Ctrl+A & Tab (will select and comment out everything), then to press Save. (repeat the procedure to uncommment all again)

On Mobile: instead of Ctrl+A, can tap and hold then select "Select all", but there is no Tab key on Android in most default virtual keyboards, as Android doesn't support it by default, but alternative keyboards with Tab support can be installed: https://www.reddit.com/r/androidapps/comments/lxe8a5/looking_for_a_good_alternative_keyboard_with_a/. Also on some keyboards after pressing Tab, Save button in My filters is still inactive, until "Enable my filters" checkbox is ticked off and then on (it happens so on SwiftKey, I didn't test on other keyboards so far, might be related to Codemirror quirks LINK).

(I guess these workarounds might be a bit cumbersome for some users, especially on Mobile)

garry-ut99 commented 1 week ago

gwarser: https://github.com/uBlockOrigin/uBlock-issues/issues/3076#issuecomment-1893240639: there is an issue in dev build (1.54 seems fine) - even with "My filters" list disabled, filters are applied.

gorhill: https://github.com/uBlockOrigin/uBlock-issues/issues/3076#issuecomment-1893655396: This happens in 1.55.0 too. Toggling on then off "My filters" fix the issue. Pretty sure this is related to the MRU cache code I modified for cosmetic filters in last release.

Network filters created via logger are applied too, even with "My Filters" disabled (and the same workaround: "Toggling on then off "My filters" works as well in this case)