Strange net::ERR_BLOCKED_BY_ADBLOCKER in Opera
Asked Answered
G

2

6

I hope this suits on Stackoverflow.

When I work from localhost and "reach out" to the Stripe JavaScript library I get this error:

Failed to load resource: net::ERR_BLOCKED_BY_ADBLOCKER

I have first of all verified that Opera's AdBlocker and Tracking cookie blocker are disabled for localhost. I have even enabled and disabled them. I have restarted Opera, and I have restarted the entire machine. I have also verified I have the latest version of Opera (v. 68).

I've tested a few other websites, where the same error occurs, but only if the AdBlocker is active. And I'm 100% confident the AdBlocker is de-activated for localhost (I'm not mixing up localhost or 127.0.0.1 either).

I'm using Opera's native AdBlocker, not a 3rd party.

If I disable ad-blocking browser-wide (ie from Opera's settings) it doesn't cause this problem.

It seems Opera is confused about localhost, no?

The problem does not occur in Chrome.

Google has very, very limited information about this error type.

I have to, the best of my knowledge, no other software which would block these "ads."

My project is coded in Vue and operated on port 5300 with NPM.

It doesn't seem to actually block the scripts Stripe wants to execute, but they fill up my console to the point of huge inconvenience.

Does anybody have any idea?

Gosser answered 7/5, 2020 at 5:26 Comment(0)
P
4

In Settings => Privacy Protection => Manage Exceptions => Block Ads => Exceptions

Have you tried adding the exceptions using this form (add one at a time):


127.0.0.1:5300
[*.]127.0.0.1:5300

Also, what OS are you using?

Have you tried mapping 127.0.0.1:5300 to something, like vuedev.local in your hosts file and use that name in the address-bar?

Just add an additional line in your hosts file, like:

# /etc/hosts IP -> host Mapping

127.0.0.1    localhost
127.0.0.1:5300    vuedev.local

If the above doesn't help, you could try installing vue-adblock-detect, with

npm i vue-adblock-detect

and then try adding something like:

<script>
import VueAdBlockDetect from 'vue-adblock-detect';
export default{
  mixins: [VueAdBlockDetect],
  beforeMount(){
    this.detectAdBlock().then((response)=>{
        if(response){
          // Pop-up an alert or something
        }else{
          // Do something else
        }
      })
  }
}
</script>

That should get you a bit further into the investigation at least!

Penza answered 9/5, 2020 at 19:48 Comment(0)
A
0

Disable the adblocker by clicking on the shield/tick icon and turn off the protection for the site.

It worked for me

Accentual answered 11/10, 2022 at 4:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.