UBlock Origin doesn't work, sometimes
joystmp I think it is a duplicate indeed, it's also about element/visual filters in uBlock Origin not working.
Same issue can be seen often on (old) Reddit, where promoted articles will very often be visible, but sometimes it works and they're hidden, even on the exact same URL it's possible to see it suddenly work/break on refresh.
Still present in latest beta with improvements for various extensions.
Initially it worked when I installed the new beta, but it always has worked intermittently. And soon enough it stopped working again.
Here's a screenshot where reddit promoted posts and cookie banner should be filtered but aren't on the latest beta:
The discussion gets hard to follow.
What is the Ask here and what are steps to reproduce?
- Edited
I can reproduce this reliably:
- Add a custom blocking rule
twitter.com##a[href="/vladquant"]
- Click the link below:
Expected: The post avatar and other links to the profile should be hidden
Actual: The avatar is still visible
Sorry for the weird example, but I had to use embedded media to force the page to open a new tab. A regular link reuses the same tab on this forum software.
Refreshing the Twitter page fixes the issue for me. I've also seen this when opening a new tab and pasting the address. But it doesn't happen reliably.
I found that if the content blockers is turned off, uBlock Origin would not work properly.
Steps to reproduce:
<Include steps to reproduce the bug; Did you try using Compatibility mode? If applicable, does Safari behave in the same way?>
- Open a webpage
- Ads get blocked by uBlock origin
- But certain cosmetic filters or blank areas where the ads used to be are not properly removed
- Refresh the page to see how it's supposed to actually look.
Expected behavior:
<What you expected to happen?>
Not needing to refresh the page every time I visit a webpage for uBlock to work properly.
Orion, OS version; hardware type:
Orion Version 0.99.115.1-beta (WebKit 614.1.12)
macOS Monterey Version 12.5 Beta (21G5046c)
MacBook Pro (Retina, 15-inch, Mid 2015)
Image/Video:
<Copy/paste or drag and drop to upload images or videos (up to 20MB)>
Partially fixed with the Version 0.99.115.2-beta (WebKit 614.1.12) update, some pages are still janky like when you open a page in a new window or tab. Besides that, there's still a noticeable delay for when the cosmetic filter is properly applied and you can briefly see the placeholder area before it gets blocked.
Sounds like a duplicate of this issue: https://orionfeedback.org/d/718-ublock-origin-doesnt-work-sometimes/4
I have managed to find a specific example for this @Vlad.
Here are the steps to reproduce this along with the video for it on : https://music.youtube.com
Steps are as follow :-
- Just after install simply install the ublock origin extension.
- Open youtube music and play any song and ublock will work as expected.
- Now open the preferences and disable content blockers (in-built ones)
- Quit the browser
- Reopen the browser
- Again revisit youtube music and play any song and now the ads will show up.
Btw, this is not just for ublock but also happens for other ad blockers like adguard as well. The reason for disabling the in-built content blockers is the FAQ mentions to not use them side by side with ublock here :- https://browser.kagi.com/faq.html#ubo
It seems like disable in-built content blockers is somehow messing up with the 3rd party blockers like ublock
Hope you are able to reproduce this and test out on your end and then maybe we can have a fix for this.
- Edited
anmol Vlad
I wonder if this is a different issue altogether, or if this is because of the different ways you load the site the first time vs. the second time. The first time you enter music.youtube.com, you have to click on the privacy agreement, which results in the page being refreshed. And that sounds oddly familiar to the steps to reproduce I posted a while ago (see szlend). I'm able to reproduce the inconsistent uBlock behaviour regardless of whether Orion's content blocking is enabled or not.
The fact that this can be resolved by a tab refresh leads me to speculate it has something to do with how uBlock gets initialized in a fresh tab vs. a reused one.
@Vlad I can only reproduce the issue with uBlock Origin cosmetic (DOM element) filters when the page loads in a new tab, which I think is a major clue.
Scenario 1:
- We have site A and B
- Using uBlock Origin, block a DOM element on website B
- Click on a link on website A that leads to website B in the same tab
- uBlock Origin successfully blocks the DOM element
Scenario 2:
- We have site A and B
- Using uBlock Origin, block a DOM element on website B
- Click on a link on website A that leads to website B in a new tab (target="_blank")
- uBlock Origin fails to blocks the DOM element
- Refresh the page
- uBlock Origin successfully blocks the DOM element
I can reproduce this every single time. In practice this results in most external links (as they're often configured to open in a new tab) not being adblocked properly, which is frustrating. All links to social media content (e.g. Twitter, YouTube) are typically opened with target=_blank.
I think it's possible that people correlate this with Orion's content blockers being disabled because those will often block the same content. So disabling Orion's content blocker make the issue more likely to appear as uBlock Origin's flakiness is more apparent. I suggest testing with custom uBlock filters for this reason.
- Edited
It seems to be pretty consistent behavior but I can't quite explain it in simple words because despite the consistent way it works (or doesn't), there's some outliers (like the first navigation from the start page in a new private window blocking correctly).
I recorded a video to show you, hope it helps.
Edit: I should have show in the beginning of the video instead of the end: the cookie banner at the bottom of reddit should be hidden via a uBlock Origin filter on its HTML #id
Version 0.99.121.1-beta (WebKit 614.1.20)
MacBook Pro (macOS Catalina 10.15.7 build 19H2026)