Adblock crash angularjs

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
gsrgsdf

Adblock crash angularjs

Post by gsrgsdf »

Hello,

I got a strange exception with angularjs when I use a specific url and adblock addon is enabled, check my plunker:

http://plnkr.co/edit/6AYOOsncZ2mAzjylWo0R?p=preview
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Adblock crash angularjs

Post by mapx »

which is the exact link ? ("specific url ") and what's the issue ?
ABP version ?
subscriptions ?
FF version ?
gsrgsdf

Re: Adblock crash angularjs

Post by gsrgsdf »

When the plunker is loaded, you'll see 2 buttons on the right, the first display an exception on the console, the second not (only with ADB installed).
The URLs are in controllers.js, it's : "http://localhost:3000/api/ads/search" which doesn't work (I don't talk about a CORS issue).

ADB 2.6.4
Subscriptions "default subscriptions"
FF 31 (same issue with nightly)
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Adblock crash angularjs

Post by mapx »

when I click the first submit
a request is blocked

Code: Select all

http://localhost:3000/api/ads/search
by the easylist filter

Code: Select all

/api/ads/*
gsrgsdf

Re: Adblock crash angularjs

Post by gsrgsdf »

mapx wrote: by the easylist filter

Code: Select all

/api/ads/*
Oh dear, thanks, my bad... easy :roll:
I'm not developing an advertising service, but I have to rename my API URLs so :(
Virat21
Posts: 1
Joined: Sat Sep 01, 2018 1:18 pm

Re: Adblock crash angularjs

Post by Virat21 »

My angular app depends on a third-party angular service:

var app = angular.module("ninjaModule", ['angular-google-analytics']);
The app loads up just fine, as long as my ad-blocking plugins are off. However, with ad-blockers on angular throws an $injector:nomod error, failing to load the whole app.

I'm looking for a way to gracefully handle these errors, and therefore be able to load the app regardless of ad-blockers. If angular-google-analytics won't be there - fine, it's not critical, I can deal with it or set up some fallback. But a situation where the whole app crashes is not an option for me. Any ideas?

To be precise - I don't want to work around ad-blockers, e.g. by renaming my script files. I'd expect an angular try-catch magic trick.
Post Reply