505

Recently I've realised that, some adblocker extensions (such as adBlocker plus) block some Ajax calls. I get that error on the console:

GET http://localhost/prj/conn.php?q=users/list/ net::ERR_BLOCKED_BY_CLIENT 

Why does it block some Ajax call but not the others and what causes that? Is there any workaround other than telling user to turn off adblocker?

Vertexwahn
  • 7,709
  • 6
  • 64
  • 90
s.alem
  • 12,579
  • 9
  • 44
  • 72
  • 1
    Possible duplicate of [I am getting Failed to load resource: net::ERR\_BLOCKED\_BY\_CLIENT with Google chrome](https://stackoverflow.com/questions/22318119/i-am-getting-failed-to-load-resource-neterr-blocked-by-client-with-google-chr) – Joshua Drake Sep 13 '17 at 18:50
  • 1
    I wrote a blog post and video that should shed some light on this issue. https://love2dev.com/blog/what-the-heck-does-neterr_blocked_by_client-mean-and-how-can-you-fix-it/ – Chris Love Feb 27 '18 at 14:58
  • 2
    This worked. Right click on AbBlock plugin in Chrome (top right side), and click on "pause on all sites" – Manohar Reddy Poreddy Mar 07 '19 at 14:17
  • 3
    Would be great to have a non assumptive answer. I'm using no ad blockers but can't seem to find a way to debug this properly. Why the browser doesn't identify the source of the block is beyond me. – Philip Ingram Jun 02 '20 at 18:44

15 Answers15

803

AdBlockers usually have some rules, i.e. they match the URIs against some type of expression (sometimes they also match the DOM against expressions, not that this matters in this case).

Having rules and expressions that just operate on a tiny bit of text (the URI) is prone to create some false-positives...

Besides instructing your users to disable their extensions (at least on your site) you can also get the extension and test which of the rules/expressions blocked your stuff, provided the extension provides enough details about that. Once you identified the culprit, you can either try to avoid triggering the rule by using different URIs, report the rule as incorrect or overly-broad to the team that created it, or both. Check the docs for a particular add-on on how to do that.

For example, AdBlock Plus has a Blockable items view that shows all blocked items on a page and the rules that triggered the block. And those items also including XHR requests.

Blockable items

nmaier
  • 32,336
  • 5
  • 63
  • 78
  • We had to change the api eventually but we solved it. Thanks a lot for the hint... – s.alem Jun 27 '14 at 13:14
  • Argh! I just spent 30 minutes or more troubleshooting other things - but this was it! :( – Will Strohl Dec 05 '14 at 02:49
  • 1
    same here. I kept changing my code and looking for the cause of this problem and it turned out to be my AdBlock was simply blocking the call that I was working on :D – Andrei Apr 14 '15 at 15:41
  • 10
    after half a day of searching why delete and get won't work, found this...it's so funny we are not even mad :)) – bokkie Jul 03 '15 at 13:52
  • You can enable this view in Firefox with Adblock Plus plugin installed by pressing Ctrl + Shift + V. I didn't manage to open it in Chrome, but the filter list by default is the same in both browsers, so it did the trick and helped mi with finding part of url that caused AdBlock to react. – Mark Apr 11 '16 at 11:54
  • Was uMatrix for me. Just check your addons. – ferdynator Dec 18 '17 at 12:44
  • So how do you push to production something that will be blocked by AdBlocker? – Henry Lynx Apr 25 '18 at 16:57
  • Thanks for answer. the /api/adverts/most-recent uri was blocking by adblocker so I changed it to something else and it works. – Ozal Zarbaliyev Jan 04 '20 at 04:45
  • For me, I had to disable the Brave browser's shields: https://support.brave.com/hc/en-us/articles/360022973471-What-is-Shields- – Ryan Apr 09 '21 at 16:05
  • Such a serious issue. This means my app won't load on many people's computers. Even though I don't have any ads there, just the mention of `/img/1.gif` was blocked and the entire site was a white page. – Tamal Anwar Chowdhury Nov 10 '22 at 16:03
126

If your URL contains words such as "advert", "ad", "doubleclick", "click", or something similar…

For example:

  • GET googleads.g.doubleclick.net/pagead/id
  • static.doubleclick.net/instream/ad_status.js

…Then ad-blocker will block it.

2540625
  • 11,022
  • 8
  • 52
  • 58
ShapCyber
  • 3,382
  • 2
  • 21
  • 27
52

I've discovered that if the filename has 300 in it, AdBlock blocks the page and throws a ERR_BLOCKED_BY_CLIENT error.

moritzg
  • 4,266
  • 3
  • 37
  • 62
Bill_VA
  • 913
  • 7
  • 12
29

I was facing same issue, I was using Brave Browser, disabling protection against site on which I was facing issue worked

enter image description here

Sanket Patil
  • 807
  • 1
  • 11
  • 19
22

Add PrivacyBadger to the list of potential causes

bvanlew
  • 1,465
  • 16
  • 13
  • I just had an issue where PrivacyBadger was blocking something. I think the reason was that the content was on a "test" subdomain. i.e. test.example.com but I'm not sure that was the reason. – krick Aug 19 '16 at 15:42
  • +1 , i've been trying to fix this issue for days and just after seeing this topic, i could find out Privacy Badger was the culprit – delphirules Dec 26 '21 at 11:54
18

I find a case is if your url contains the key word banner, it will blocked too.

MichaelMao
  • 2,596
  • 2
  • 23
  • 54
16

I had sentry calls failing with this and disabling brave ads shield on Brave browser did solve the issue for me.

Dimitri Kopriwa
  • 13,139
  • 27
  • 98
  • 204
11

As it has been explained here, beside of multiple extensions that perform ad or script blocking you may aware that this may happen by file names as below:

Particularly in the AdBlock Plus the character string "-300x600" is causing the Failed to Load Resource ERR_BLOCKED_BY_CLIENT problem.

As shown in the picture, some of the images were blocked because of the '-300x600' pattern in their name, that particular text pattern matches an expression list pattern in the AdBlock Plus.

ERR_BLOCKED_BY_CLIENT problem

David
  • 5,882
  • 3
  • 33
  • 44
eQ19
  • 9,880
  • 3
  • 65
  • 77
8

If there are any ad blockers (Brave browser use default blocker), turn it off. This worked for me

7

In my case, it is not the adblocker but Bitdefender anti tracker. Disable it then you all fine.

enter image description here

yusufmalikul
  • 508
  • 1
  • 9
  • 26
4

Just switching the order of some URL query params fixed the issue for me (so apparently the uBlock Origin adblocking rules are not very robust).

Luke Hutchison
  • 8,186
  • 2
  • 45
  • 40
2

In my case it was a Chrome extension and Firefox add-on by Avira called "Avira Browser Safety". I had problems with version 1.7.4. In my specific case I wanted to login to a website called gliffy.com for making diagrams, but after logging in I got an blank page. If you use F12 (console) in Chrome you can see all these ERR_BLOCKED_BY_CLIENT (and other) errors.

Jan
  • 2,165
  • 1
  • 18
  • 13
2

This error can also happen if you run chrome in headless mode (for example with Puppeteer or Ferrum) with a white list of URLs and the request doesn't match the list.

Michaël Witrant
  • 7,525
  • 40
  • 44
0

Opera Blocker and others check all files/urls in Network. Then compares to the list. It is EasyPrivacy and EasyList. If your file/url in this, your will be ban. Good luck.

So... I find FilterLists for all addBlockers!

0

Thanks for the answers! They led me to a solution:

I cheated this by using a third party server that wrapped my request.
Check it out:
https://codetabs.com/cors-proxy/cors-proxy.html

GET "https://api.codetabs.com/v1/proxy?quest=your_blocked_url"

Of course, it is better to wrap it with your own server.

Valera Kvip
  • 334
  • 5
  • 14