Getting "net::ERR_BLOCKED_BY_CLIENT" error on some AJAX calls

461,714

Solution 1

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

Solution 2

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.

Solution 3

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

Solution 4

Add PrivacyBadger to the list of potential causes

Solution 5

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

Share:
461,714
s.alem
Author by

s.alem

Apparently, I prefer to keep an air of mystery about me.

Updated on February 09, 2022

Comments

  • s.alem
    s.alem about 2 years

    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?

  • s.alem
    s.alem almost 10 years
    We had to change the api eventually but we solved it. Thanks a lot for the hint...
  • Will Strohl
    Will Strohl over 9 years
    Argh! I just spent 30 minutes or more troubleshooting other things - but this was it! :(
  • Andrei
    Andrei about 9 years
    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
  • bokkie
    bokkie almost 9 years
    after half a day of searching why delete and get won't work, found this...it's so funny we are not even mad :))
  • Servus7
    Servus7 over 8 years
    Great. Im having a admin page ;)
  • Mark
    Mark about 8 years
    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.
  • Francisco De La Fuente
    Francisco De La Fuente almost 8 years
    In my case the problem was having a folder called "ads" with pictures that was shown in the website. I just changed the folder to "publish" and it was solved.
  • krick
    krick over 7 years
    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.
  • Madan Bhandari
    Madan Bhandari over 7 years
    I have disabled Ad Blocker for page but still getting same error
  • Niklas
    Niklas about 7 years
    In my understanding the ad_status.js gets created when using google products such as embedded youtube videos. So is it even possible to avoid the adBlock when having this file ?
  • ferdynator
    ferdynator over 6 years
    Was uMatrix for me. Just check your addons.
  • Henry Lynx
    Henry Lynx about 6 years
    So how do you push to production something that will be blocked by AdBlocker?
  • parlad
    parlad about 6 years
    wait, what , why adblocker block these url?
  • cdsaenz
    cdsaenz almost 5 years
    This is a major problem indeed. You saved me days of headaches, my app was called ADS and it was in the /ads folder..
  • Matt K
    Matt K over 4 years
    Wonderful, our app is using authentication with Active Directory and can you guess what the url that's being blocked is? "ad/auth"...
  • Ozal  Zarbaliyev
    Ozal Zarbaliyev over 4 years
    Thanks for answer. the /api/adverts/most-recent uri was blocking by adblocker so I changed it to something else and it works.
  • Tony O'Hagan
    Tony O'Hagan almost 4 years
    I've confirmed this and also notified the team at unsplash.com
  • Deolu A
    Deolu A about 3 years
    Wrote an article on logical fallacies. Was wondering why my ad-hominem images were being blocked...😑
  • Ryan
    Ryan about 3 years
    For me, I had to disable the Brave browser's shields: support.brave.com/hc/en-us/articles/…
  • delphirules
    delphirules over 2 years
    +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
  • Jeroen van Dijk
    Jeroen van Dijk about 2 years
    I had an issue with the URL including "stats"
  • Dazag
    Dazag almost 2 years
    I use Vivaldi, it was the ad blockers, thanks.