s.alem
s.alem

Reputation: 13079

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

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?

Upvotes: 545

Views: 727677

Answers (18)

saqib idrees
saqib idrees

Reputation: 91

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

Upvotes: 2

parsecer
parsecer

Reputation: 5106

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.

Upvotes: 0

TrySpace
TrySpace

Reputation: 2460

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

Upvotes: 1

Valera Kvip
Valera Kvip

Reputation: 390

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.

Upvotes: 1

Sanket Patil
Sanket Patil

Reputation: 1095

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

Upvotes: 53

Luke Hutchison
Luke Hutchison

Reputation: 9190

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

Upvotes: 4

Michaël Witrant
Michaël Witrant

Reputation: 7714

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.

Upvotes: 2

shrikanta mazumder
shrikanta mazumder

Reputation: 373

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

Upvotes: 9

Dimitri Kopriwa
Dimitri Kopriwa

Reputation: 14353

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

Upvotes: 16

yusufmalikul
yusufmalikul

Reputation: 548

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

enter image description here

Upvotes: 7

eQ19
eQ19

Reputation: 10691

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

Upvotes: 11

MichaelMao
MichaelMao

Reputation: 2796

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

Upvotes: 19

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!

Upvotes: 0

Bill_VA
Bill_VA

Reputation: 973

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

Upvotes: 57

ShapCyber
ShapCyber

Reputation: 3652

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.

Upvotes: 136

bvanlew
bvanlew

Reputation: 1495

Add PrivacyBadger to the list of potential causes

Upvotes: 24

Jan
Jan

Reputation: 2273

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.

Upvotes: 2

nmaier
nmaier

Reputation: 33162

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

Upvotes: 849

Related Questions