90

anmol Does uBo block anything for you (when content blockers are disabled)?

    @Vlad it does work on some sites correctly when the content blockers are disabled. For eg. On youtube.com it does work but then doesn't on music.youtube.com.

      11 days later

      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:

      1. We have site A and B
      2. Using uBlock Origin, block a DOM element on website B
      3. Click on a link on website A that leads to website B in the same tab
      4. uBlock Origin successfully blocks the DOM element

      Scenario 2:

      1. We have site A and B
      2. Using uBlock Origin, block a DOM element on website B
      3. Click on a link on website A that leads to website B in a new tab (target="_blank")
      4. uBlock Origin fails to blocks the DOM element
      5. Refresh the page
      6. 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.

      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)

      9 days later

      Is someone able to summarize a minimal ask from this entire thread for us to look at - so many things here to parse. Thanks.

        Vlad

        Basically to sum it up, uBlock Origin cosmetic (DOM) filtering sometimes doesn't work. It seems to be correlated with the way the page loads (Fresh tab vs Reused tab). It's hard to say if this is the real reason (it might be a different underlying issue), but I'm able to reproduce 100% of the time with this method. I'll copy the test scenarios from a previous post:

        Scenario 1:

        1. We have websites A and B
        2. Using uBlock Origin, block a DOM element on website B
        3. Click on a link on website A that leads to website B in the same tab
        4. uBlock Origin successfully blocks the DOM element

        Scenario 2:

        1. We have websites A and B
        2. Using uBlock Origin, block a DOM element on website B
        3. Click on a link on website A that leads to website B in a new tab (target="_blank")
        4. uBlock Origin fails to blocks the DOM element
        5. Refresh the page
        6. uBlock Origin successfully blocks the DOM element

        Does that make sense? Let me know if there's anything else I can do to help.

          Steps to reproduce:
          Click on element picker mode on ublock origin's UI on one of the following sites: https://www.espncricinfo.com, https://news.ycombinator.com/news

          Expected behavior:
          Mouse cursor should be a picker icon, and element being hovered on should have a red overlay. There should be an interface for specifying the blocking filter.

          It does work on some sites like reddit.com, but doesn't work on others.

          Orion, OS version; hardware type:
          Version 0.99.112-beta (WebKit 614.1.1), Mac Mini M1, Monterey 12.2

          Image/Video:
          Doesn't work:

          Works but not on the Promoted elements:

            a year later

            Came here to report the same. Good to see there's a topic already.

            Element zapper mode and element picker mode are not functioning on some websites.

            Version 0.99.123.1-beta (WebKit 615.1.16.1)
            uBlock Origin 1.44.2

            • Vlad replied to this.
              Merged 4 posts from Ublock origin element picker mode doesn't always work.
                15 days later

                @Vlad It looks like it is working for some elements/websites but not others.

                One example is Reddit: "promoted" posts are blocked in Firefox, but not in Orion.

                After some experimentation, I've narrowed it down to the following.

                • The first time, some websites (with ads) are opened in a new tab (like Reddit) some ads are not blocked (like "Promoted" posts)
                • Once the page reloads at least once (either by refreshing it or by closing the tab and reopening it with History > Reopen Last Closed Tab), the ads are properly blocked.
                • If a new tab is opened pointing to the same websites, the unblocked ads are back.

                This can also be observed using this page. The first time it is opened, the actual ads are blocked, but the text "Advertisement" appears all around the test description where the ads would be. After a page refresh, that text gets removed too.

                The extension "version" (Chrome vs Firefox vs Firefox (Orion-curated)) does not seem to affect this.

                I also think that it may be domain-related. If you navigate from one page to the next on the same domain, the ads stay hidden. However, moving to a new domain using the same tab seems to cause the ads to reappear.

                Hope this helps!

                P.S.: I know Orion isn't open-source, but I would be glad to contribute if you're looking for help 🙂

                • yee replied to this.
                • Vlad likes this.
                  3 months later

                  Gadiguibou can confirm this weird behaviour, both uBlock Origin and SponsorBlock for YouTube have to reload a site to be working.

                    25 days later

                    Can confirm this issue is still present in the latest RC (0.99.124.4.3-rc) at the time of writing: cosmetic filters are only enforced after refreshing the page (and not on first page load, which would be the intended behavior).

                      Yeah the batch of webextension fixes in the latest RC unfortunately didn't fix the issue. @Vlad I'm not sure if you guys were able to have a look at this yet, but if this is difficult to figure out, could we at least get some sort of temporary workaround? I imagine loading a blank page and then immediately redirecting to the actual page would likely fix the issue, as janky as that sounds. This would only need to happen whenever a new tab is opened.

                      • Vlad replied to this.

                        szlend We haven't yet, but we do plan for the next release. Can you summarize the most important thngs to look at from this thread as it is getting long?

                          Vlad It's mostly just reiterating the same issue and finding alternative ways to reproduce it.

                          To summarize, selector based cosmetic filters are unreliable. It seems like the extension doesn't initialize correctly on a newly opened tab vs a reused one.

                          Steps to reproduce:

                          5 days later

                          For me, "Picker Mode" doesn't work in uBlock at all. Also the menu doesn't render properly and seems like I can't edit any of uBlock's settings. I had this issues in older versions and now have the same issue in latest (0.99.124.4.1-beta) version on macOS Ventura 13.4

                            Figured out how to consistently reproduce on my end.

                            Pretext:
                            I have ublock set to block the "Creator on the Rise" and "Trending Shorts" trays on the YouTube trending page (among other things), so intended behabiour is that they don't show up.

                            Reproduce:

                            1. Go to a new tab (orion://newtab)
                            2. Go to YouTube using my keyword invokation, which is set to go to www.youtube.com/feed/trending when I type "ytt"
                            3. uBlock Origin will not work. Refreshing the page will block elements as expected.
                            4. Repeat as before from new tab, but this time, type youtube.com/feed/trending manually in the address bar. uBlock Origin will work as expected on page load, no reload required.
                            5. type "orion://newtab" in the address bar to go back to a blank page. (Presumably this works with any other tab i.e. go to google.com or another site)
                            6. Keyword invokation again causes uBlock Origin to not work.
                            7. repeat back and forth and it keeps happening

                            Caveats I've found:

                            • Invoking "ytt" from the YouTube page itself will not cause the issue.
                            • Having a tab open with YouTube Trending already open will cause subsequent open tabs to not have the issue.
                            • Same as above, but closing the YouTube tab and then open a new tab open invoke ytt from a blank new tab page will not cause the issue.
                            • typing youtube.com/feed/trending manually in the address bar makes uBlock Origin work as expected, but typing that and then clicking the top suggestion (instead of pressing enter) will cause the issue again.

                            Speculation:
                            When visiting a site from the suggestions bar (Top hits, bookmarks, etc.) the page is loaded in a way that prevents uBlock Origin from working. This is fixed immediately upon refresh. After this is fixed, new tabs visits to the same site won't have the problem anymore.

                            Video:
                            Note the appearance of the "Creator on the Rise" and "Trending Shorts" trays in the video list.

                            Actions taken in the video:

                            1. YouTube visited from manual URL entry: uBlock works
                            2. YouTube visited using bookmark keyword invokation: uBlock does not work
                            3. YouTube visited by clicking from suggestions bar: uBlock does not work