Getting "net::ERR_BLOCKED_BY_CLIENT" error on some AJAX calls
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.
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.
s.alem
Apparently, I prefer to keep an air of mystery about me.
Updated on February 09, 2022Comments
-
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 almost 10 yearsWe had to change the api eventually but we solved it. Thanks a lot for the hint...
-
Will Strohl over 9 yearsArgh! I just spent 30 minutes or more troubleshooting other things - but this was it! :(
-
Andrei about 9 yearssame 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 almost 9 yearsafter half a day of searching why delete and get won't work, found this...it's so funny we are not even mad :))
-
Servus7 over 8 yearsGreat. Im having a admin page ;)
-
Mark about 8 yearsYou 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 almost 8 yearsIn 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 over 7 yearsI 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 over 7 yearsI have disabled Ad Blocker for page but still getting same error
-
Niklas about 7 yearsIn 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 over 6 yearsWas uMatrix for me. Just check your addons.
-
Henry Lynx about 6 yearsSo how do you push to production something that will be blocked by AdBlocker?
-
parlad about 6 yearswait, what , why adblocker block these url?
-
cdsaenz almost 5 yearsThis 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 over 4 yearsWonderful, our app is using authentication with Active Directory and can you guess what the url that's being blocked is? "ad/auth"...
-
Ozal Zarbaliyev over 4 yearsThanks 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 almost 4 yearsI've confirmed this and also notified the team at unsplash.com
-
Deolu A about 3 yearsWrote an article on logical fallacies. Was wondering why my ad-hominem images were being blocked...😑
-
Ryan about 3 yearsFor me, I had to disable the Brave browser's shields: support.brave.com/hc/en-us/articles/…
-
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 about 2 yearsI had an issue with the URL including "stats"
-
Dazag almost 2 yearsI use Vivaldi, it was the ad blockers, thanks.