uBlock icon indicating copy to clipboard operation
uBlock copied to clipboard

Page refresh required before filtering works

Open stuartshapiro opened this issue 8 years ago • 12 comments

Filter issues MUST NOT be reported here. Read first: https://github.com/gorhill/uBlock/blob/master/CONTRIBUTING.md

Describe the issue

Every so often, a page will load on Firefox 57 but appear to only block some requests -- as if cosmetic filtering isn't being loaded properly. Refreshing the page fixes the issues. On Chrome, this problem does not appear to be an issue.

One or more specific URLs where the issue occurs

Example page used in screenshot: https://lifehacker.com/you-don-t-have-to-pay-to-check-a-bag-1822172991

This has occurred on other sites as well, such as Reddit.

Screenshot in which the issue can be seen

[Screenshot(s) for visual issues are mandatory]

Steps for anyone to reproduce the issue

The best way to see this happen is to use a news reader/RSS feed, such as Feedly. When links are opened in the background in new tabs, this occurs much of the time.

Your settings

[If you fail to provide this info, I will mark the issue as invalid. Lists all settings which differs from default settings]

  • OS/version: MacOS 10.13.2
  • Browser/version: Firefox 57.0.4
  • uBlock Origin version: 1.14.24
Your filter lists

uBlock filters​​​​​ uBlock filters – Badware risks​ uBlock filters – Privacy​​​​​ ​​uBlock filters – Resource abuse​​​​​ ​​uBlock filters – Unbreak ​​ Adblock Warning Removal List​ Adguard Base Filters​ EasyList​

Adguard Spyware Filters EasyPrivacy Fanboy’s Enhanced Tracking List​

Malvertising filter list by Disconnect​​​​​ Malware Domain List​​​​​ Malware domains Spam404​

Adguard’s Annoyance List Fanboy’s Annoyance List Fanboy’s Anti-Thirdparty Social

Dan Pollock’s hosts file​​​​​ hpHosts’ Ad and tracking servers​ MVPS HOSTS​ Peter Lowe’s Ad and tracking server list​

Your custom filters (if any)

gizmodo.com##._3fuZ4Zij-D lifehacker.com##._3fuZ4Zij-D jezebel.com##._3fuZ4Zij-D

screen shot 2018-01-18 at 9 45 21 am screen shot 2018-01-18 at 9 45 28 am

stuartshapiro avatar Jan 18 '18 14:01 stuartshapiro

Does this happen only when you launch the browser?

I need better, detailed steps to repro please.

gorhill avatar Jan 18 '18 15:01 gorhill

No, this happens even after the browser is open for awhile. I do have suspendTabsUntilReady set to false, but could try changing it.

The best way I have of reproducing is as follows (and it occurs almost every time I use this method).

Open Feedly to gather RSS feeds Use control click to open a series of tabs in background When viewing each individual tab, experience cosmetic (or other blocking) issue Refresh tab, filtering works perfectly

stuartshapiro avatar Jan 18 '18 15:01 stuartshapiro

What is "Feedly"? Does this require an account? Does this require configuration? If so, what would it be?

Did you look at what the logger says?

gorhill avatar Jan 18 '18 15:01 gorhill

Also, do you have other extensions? If so, did you try without these? Do you have custom about:config settings? If so, which ones?

gorhill avatar Jan 18 '18 15:01 gorhill

Ah, apologies -- it's an RSS reader. https://feedly.com/

I do have other extensions, but no custom about:config settings. I will try turning them on and off.

stuartshapiro avatar Jan 18 '18 15:01 stuartshapiro

Disabling other extensions doesn't solve the issue. It seems to be an issue on Firefox when opening tabs in the background. Not affected in Chrome.

stuartshapiro avatar Jan 18 '18 15:01 stuartshapiro

I could reproduce with the web page shown in your screenshot. At first glance I can't see why this would happen, this will require more investigation work.

I could also reproduce the issue with Adblock Plus 3.0.2.

When I switch to the new tab quick enough, the issue does not occur.

gorhill avatar Jan 18 '18 15:01 gorhill

I am not able to reproduce with reddit pages so far.

I am able to reproduce with lifehacker pages. Currently I suspect the issue lies with the lifehacker site, i.e. there is javascript code in there which executes according to the visibility of the page.

gorhill avatar Jan 18 '18 16:01 gorhill

I am going to blame the web site until proof to the contrary. Try this:

  • Open https://lifehacker.com/either-your-sick-co-worker-goes-home-or-you-do-1822172740.
  • Open the logger, and be sure the selector is at the top of the logger is for that page.
  • Activate another tab
  • Force a refresh of the lifehacker page using the logger's refresh button
    • This will force a reload of the page while it's not active and visible
  • Wait for the lifehacker page to reload, as per logger
  • Switch to the lifehacker page

Result:

Same visual issues as you reported in comment #0.

The site most certainly executes javascript conditionally to portion of the page being visible.

Further confirmation:

  • Disable uBO
  • Restart the browser, just to be sure no remnant of uBO or any other extension in memory.
  • Repeat repro steps
    • Be sure to wait for the opened page to fully load before switching to it

Result:

Same visual issues as you reported in comment #0:

a

Note: since the page takes longer to load now (due to all 3rd-party being freely allowed in), it may take a couple of reload before the issue is seen. I can see it all the time when the page finish to reload fast before switching to it.

gorhill avatar Jan 18 '18 16:01 gorhill

Interesting, yes -- that definitely reproduces the issue. Do you have any idea why this happens in Firefox and not Chrome? I'm wondering if it's also partially a Firefox bug somewhere.

stuartshapiro avatar Jan 18 '18 17:01 stuartshapiro

Do you have any idea why this happens in Firefox and not Chrome?

No clue, I would have to investigate the site's code. I rather have their own developers look at this.

gorhill avatar Jan 18 '18 17:01 gorhill

This happens to me too on reddit.com and soompi.com.

  • I open Firefox in private mode
  • open some pages then close them (none of them are reddit)
  • then i open a bunch of links at once, reddit pages are on background tabs
  • for cosmetic filtering to apply on reddit, i have to refresh the pages.

Matthewus avatar Jan 20 '18 09:01 Matthewus