550

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?

4
  • 1
    Possible duplicate of I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome Commented Sep 13, 2017 at 18:50
  • 1
    I wrote a blog post and video that should shed some light on this issue. love2dev.com/blog/… Commented Feb 27, 2018 at 14:58
  • 2
    This worked. Right click on AbBlock plugin in Chrome (top right side), and click on "pause on all sites" Commented Mar 7, 2019 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. Commented Jun 2, 2020 at 18:44

18 Answers 18

858

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

Sign up to request clarification or add additional context in comments.

11 Comments

We had to change the api eventually but we solved it. Thanks a lot for the hint...
Argh! I just spent 30 minutes or more troubleshooting other things - but this was it! :(
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
after half a day of searching why delete and get won't work, found this...it's so funny we are not even mad :))
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.
|
136

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.

11 Comments

Great. Im having a admin page ;)
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.
I have disabled Ad Blocker for page but still getting same error
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 ?
I had an issue with the URL including "stats"
|
61

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

4 Comments

Brave for me too. I always forget about that thing. It causes weird issues on sites.
Holy ... Thanks a lot for you answer I was becoming crazy and that's exactly the problem I had ... 🤦‍♂️
I can't believe it was this simple! This totally solved my problem
Had the same issue, thought it was my Cors layer on one of my microservices
57

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

1 Comment

I've confirmed this and also notified the team at unsplash.com
24

Add PrivacyBadger to the list of potential causes

2 Comments

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.
+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
20

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

Comments

16

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

3 Comments

Thanks! I was testing and it didn't work on my phone either. Turns out I use Brave on both...now fixed
Thank you, thank you, thank you!!! I've spent hours on this.
Additional question would be how to disable this on development?
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

Comments

9

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

2 Comments

I use Vivaldi, it was the ad blockers, thanks.
yeah, ublock origin caused the same error
7

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

enter image description here

Comments

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).

Comments

3

Disable all of your adblocker then it will work fine. This solved my problem for clarity api calls.

Comments

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.

Comments

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.

Comments

1

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.

Comments

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!

Comments

0

My issue was ClearURLs was blocking or mangling some of the urls enter image description here

Comments

0

My website was requesting images and other stuff from localhost:8082/api instead of sitename.com/api (which would Nginx then redirect to localhost:8082). It should have been the same, as the front-end and back-end are on the same server, but Brave and DDG didn't like it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.