Skip to content
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

uBlock blocking domain but not showing it in the dynamic filtering pane #2053

Closed
dsedivec opened this issue Oct 6, 2016 · 5 comments
Closed

Comments

@dsedivec
Copy link

dsedivec commented Oct 6, 2016

Describe the issue

http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js?ver=2.1.1 is being blocked by uBlock in medium mode, yet cloudflare.com is not (usually) appearing in the dynamic filtering pane so that I can unblock it.

One or more specific URLs where the issue occurs

http://chicagoweathercenter.com/

Screenshot in which the issue can be seen

Note cloudflare.com does not appear in the dynamic filtering pane:

image

Steps for anyone to reproduce the issue

  1. Create a fresh Chrome profile.
  2. Install uBlock Origin.
  3. Update all third party filter lists.
  4. Turn on medium mode per the instructions: check "I am an advanced user," enable the "uBlock experimental" list (all others for medium mode are enabled by default), and add the two dynamic filtering rules given there.
  5. Visit http://chicagoweathercenter.com.
  6. Click the uBlock button on the toolbar.

Expected results: see cloudflare.com in the dynamic filtering pane, so that I can noop it.

Observed results: cloudflare.com is not listed in uBlock's dynamic filtering pane.

Other notes:

Chrome developer tools console shows http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js?ver=2.1.1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT.

Disabling uBlock for the domain by hitting the big friendly disable button allows jQuery to be loaded from Cloudflare on this site.

I have tested this several times, and I have finally gone so far as to blow away all of ~/Library/Application Support/Google/Chrome* on my Mac just to make sure this wasn't something unique to my profile. The problem is still happening on a really new and fresh Chrome profile.

Regrettably, I must say that, sometimes the first time I load this page in a new profile I will see cloudflare.com in the dynamic filtering pane, as I expect. However, if I simply reload the page (e.g. cmd-r), it will no longer appear in the dynamic filtering pane from that point forward. I have seen this at least once.

Your settings

  • Browser/version: Chrome 53.0.2785.143 (64-bit) on Mac OS X 10.11.6
  • uBlock Origin version: 1.9.10 from Chrome web store, also tested with 1.9.15b0

Changes from the default uBlock settings for medium mode:

  • Checked "I am an advanced user"

  • Enabled "uBlock filters – Experimental‎" filter list

  • Added the following dynamic filtering rules:

    * * 3p-frame block
    * * 3p-script block
    

LastPass is installed on my system, so a new Chrome profile automatically gets the LastPass extension installed. I first uninstalled the extension from the new profile with which I reproduced this issue.

Your filter lists

Default filter lists plus "uBlock filters – Experimental‎."

Your custom filters (if any)

None

@okiehsch
Copy link
Contributor

okiehsch commented Oct 7, 2016

Followed all your steps but can´t reproduce,
even if I reload the site multiple times.

aufzei

The only difference between our settings is that I am running Windows 10.

@gorhill
Copy link
Owner

gorhill commented Oct 7, 2016

I could reproduce. I see the resource reported blocked in the console, I also see it reported blocked in the logger, but it's not present in the popup panel. I will investigate.

@dsedivec
Copy link
Author

dsedivec commented Oct 7, 2016

In case it helps, I think I am now also seeing this with https://trello.com/login. https://d2k1ftgv7pobq7.cloudfront.net/meta/p/res/js/67806f9ff1ce059372fafdc52c3073c2/jquery.min.js is reported in Chrome's console as blocked, but d2k1ftgv7pobq7.cloudfront.net does not show up in the dynamic blocking pane.

@gorhill
Copy link
Owner

gorhill commented Oct 7, 2016

I found the problem. It's a tricky one, due to the way Chrome's API events are fired. uBO receives the confirmation that a new page is effectively loaded in the tab after it has started to receive network requests for that page. When uBO receives the confirmation of a new page being loaded, it wipes out all the current statistics and starts from scratch. As per Chrome API documentation:

There is no defined ordering between events of the webRequest API and the events of the webNavigation API.

It is a tricky one because I can't just rely on the flow of network requests to detect when a new page is loaded in a tab: sometimes there are network requests for documents which are not to be loaded in the tab (i.e. not as a result of navigation), other times it's a page reload, in which case we have the same URL, but the page statistics must be reset.

Still trying to figure a sane fix.

@gorhill
Copy link
Owner

gorhill commented Oct 7, 2016

Here is an explanation of the problem.

The sequence of events which ideally uBO would always see:

...
>>> chrome.webRequest.onBeforeRequest(http://chicagoweathercenter.com/) <<<
>>> chrome.webNavigation.onCommitted(http://chicagoweathercenter.com/) <<<
chrome.webRequest.onBeforeRequest(http://static.chicagoweathercenter.com/style/normalize.css)
chrome.webRequest.onBeforeRequest(http://static.chicagoweathercenter.com/js/fancybox/jquery.fancybox.css)
chrome.webRequest.onBeforeRequest(http://static.chicagoweathercenter.com/style/screen.css)
chrome.webRequest.onBeforeRequest(http://chicagoweathercenter.com/cms/wp-content/plugins/jetpack/css/jetpack.css?ver=4.3.1)
chrome.webRequest.onBeforeRequest(http://use.typekit.net/iry6qro.js)
chrome.webRequest.onBeforeRequest(http://static.chicagoweathercenter.com/js/modernizr-2.8.3.js)
chrome.webRequest.onBeforeRequest(http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js?ver=2.1.1)
chrome.webRequest.onBeforeRequest(http://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201640)
...

But here is what happens sometimes, notice the position of the chrome.webNavigation.onCommitted notification:

...
>>> chrome.webRequest.onBeforeRequest(http://chicagoweathercenter.com/) <<<
chrome.webRequest.onBeforeRequest(http://static.chicagoweathercenter.com/style/normalize.css)
chrome.webRequest.onBeforeRequest(http://static.chicagoweathercenter.com/js/fancybox/jquery.fancybox.css)
chrome.webRequest.onBeforeRequest(http://static.chicagoweathercenter.com/style/screen.css)
chrome.webRequest.onBeforeRequest(http://chicagoweathercenter.com/cms/wp-content/plugins/jetpack/css/jetpack.css?ver=4.3.1)
chrome.webRequest.onBeforeRequest(http://use.typekit.net/iry6qro.js)
chrome.webRequest.onBeforeRequest(http://static.chicagoweathercenter.com/js/modernizr-2.8.3.js)
chrome.webRequest.onBeforeRequest(http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js?ver=2.1.1)
>>> chrome.webNavigation.onCommitted(http://chicagoweathercenter.com/) <<<
chrome.webRequest.onBeforeRequest(http://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201640)
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants