8 ms·
A JavaScript browser library fails due to an adblocker blacklisting 'beacon.js'
- kevingadd 9y agoAn interesting related anecdote on this is that at least in Chrome, adblockers can also interfere with extensions' attempts to load scripts, load stylesheets, or open windows. I maintain an extension with a smallish active userbase (~20k people) and a couple different times I've encountered mysterious failures that were the result of clumsy keyword blocklists in ublock/adblock/etc - for example an extension asset (packed into the extension, not on a web server!) containing the word 'popout' caused it to get killed silently, and renaming it made it work. Naturally you can troubleshoot a lot of this with 'does it work if you disable adblock?' but it's a real pain to have to convince users that they can't use your software along with their broken adblocker.
- vbrandl 9y agoShouldn't adblockers whitelist local request to prevent something like this?
- mp3geek 9y agoWhy whitelist, when its easier to rename a file?
- mp3geek 9y agoAlso the filter in question "/beacon.js" is 3 years old in Easyprivacy, to be exact "Feb 23, 2014". I could understand if it was a recent commit but its not, the onus shouldn't be on the List authors to fix it, but the site owner (yourself) to fix it.
- kiallmacinnes 9y agoIs this meant to be sarcastic? becaon.js is a perfectly valid name for a JavaScript filename, being forced to name your files something different from their content just to placate ad blockers dodgy blocklists is not right. Even more not right though, is every developer having to check every blacklist to see if their component name happens to also be used in advertising. Is this really what your suggesting? Then there's the whole *ad.js blacklist another commenter brought up, this is frankly just a sign of a terrible blocklist. And new entries that are just as bad get added all the time, so now every developer has to check every blocklist every single day if they want to keep their site running smoothly. (A happy user of an ad blocker, who is aware that 9 time out of 10, when a site I'm using is broken, it's the ad blockers fault - not the sites)
- nsgi 9y ago> it's a real pain to have to convince users that they can't use your software along with their broken adblocker The reality for most extension developers is that our extension is less essential to users than their adblocker, and if they had to choose between them they would choose the latter.
- vbrandl 9y agoTo be honsest, I might do the same. Surfing the web without an adblocker nowerdays isn't much fun, to say the least
- Doctor_Fegg 9y agoYes. We seem to have moved from a position of "four different browsers with differing behaviour" to "four consistent browsers with consistent behaviour, each with hundreds of potential content-rewriting extensions that may arbitrarily break your site in unexpected ways". I'm not convinced this is an improvement.
- Spivak 9y agoIt seems to be an improvement for the user.
- makecheck 9y agoWell we also used to have mostly non-HTTPS, where wifi networks and ISPs could and did insert crap into pages. I much prefer now being able to guarantee that what the user downloads is what the site provided. At least then the "turn everything off and see if it works now" option should be viable.
- goodplay 9y agoCan you really blame them? Websites became hostile to users and users reacted. I don't know what your software is, and this certainly isn't directed at you, but if I'm forced to make a choice between using an ad blocker or using some software, I'll always choose the ad blocker (unless I was forced to use said software), especially if there are alternatives. There are no real alternatives to using an ad blocker.
- DanBC 9y agoDon't assume most people are polite and reasonable like you. Many people are arseholes. You're choosing to use either the ad-blocker, or the software, and you've chosen the ad-blocker. You can see how tiresome it would be to have a flood of rude people saying "your software sucks", when there's nothing wrong with the software. There's a problem with the ad-blocker that the user has. The bug report should go to that ad-blocker. You can also see how it must be a bit frustrating to have people saying "ZOMG why can't I use both? Fix your software so that I can use both!", when the fix needed is only achievable by the ad-block creator.
- pwg 9y ago> when the fix needed is only achievable by the ad-block creator. It seems to me that there are two possible fixes. One, the ad-block creator updates their list, yes. But the other is the extension writer renames the file that is triggering the ad-blocker so the ad-blocker is no longer triggered. The only one of those two fixes that is within the direct control of the extension writer is renaming the file within the extension that is triggering the ad-blocker.
- deleted 9y ago[deleted]
- akvadrako 9y agoExcept software which doesn't work with an adblocker does "suck". Sure, potential users could phrase it more politely, but for many of them (me included), it's a minimum requirement. At least "sucking" is better than being totally useless.
- bangonkeyboard 9y agoIf extensions can interfere with each other's internal resources then the real breakage is in the browser's extension mechanism.
- PrivWeeble 9y agoWell normally you wouldn't want one browser extension to interfere with another extension. However, there are contexts where that is very beneficial. Take a security or privacy extension which correctly identifies a harmful resource load. It doesn't matter whether that resource is being loaded in a content tab, loaded by another extension behind the scenes, or is local vs remote. It it still a harmful load. So a protective extension should be able to detect it, then inform the user and/or perform an appropriate blocking action. This, like some other special powers, is something that the user should have to explicitly grant to an extension via permissions interface.
- gorhill 9y agoI'm puzzled. Content blocking extensions can't interfere with your extension's internals, and can't interfere with network requests made by another extension. If your extension injects resources in the DOM, than a content blocker can interfere with the proper loading or rendering of these resources. However I am very surprised about your statement that a content blocker extension intefered with your extension assets, my understanding is that should not be possible. You mind disclosing what is your extension?
- nsgi 9y agoYou can't inject a content script into another extension's page but the last time I used it the webRequest API could intercept internal requests, including those from extensions. Although they're planning to crack down on e.g. extensions redirecting search requests from the new tab page and the omnibox.
- kevingadd 9y agoMost Chrome extensions need to interact with content, so if you want to do that you have to run code inside the content context. Adblockers can intercept any requests you make, even if it's to extension content (i.e. not over the internet, not to an ad/tracking server). This goes so far that they will silently block attempts to open a popup window (in this case, in a click handler to open extension-specific UI for the user.) The content was under chrome-extension:// and was just an html file. Incidentally I use ublock. I'd be happy to help you troubleshoot this if it's possible to fix the issue.
- kmfrk 9y agoUsing Little Snitch can be pretty eye-opening; I wouldn't for the life of me have imagined that my terminal installations of packages with stuff like Homebrew would send calls to Google Analytics. It's bloody everywhere.
- vbrandl 9y agoThat one is actually documented in their repository: https://github.com/Homebrew/brew/blob/master/docs/Analytics.md https://github.com/Homebrew/brew/blob/master/docs/Analytics....
- throwanem 9y agoAnd aroused considerable controversy, here and elsewhere, when it was new. The two major active discussions here, 7 months and a year ago respectively: https://news.ycombinator.com/item?id=13034936 https://news.ycombinator.com/item?id=13034936 https://news.ycombinator.com/item?id=11566720 https://news.ycombinator.com/item?id=11566720 I'm not too terribly fussed over it, especially considering what it must cost to support Homebrew - if analytics data helps the maintainers make more effective choices around how to allocate limited resources, that seems to me like a good goal, and I'm not sure how providing information on packages I've installed via Homebrew, to be included in anonymized reports on packages ~everyone has installed in Homebrew, poses any meaningful risk to me. That said, if you feel otherwise, see https://github.com/Homebrew/brew/blob/master/docs/Analytics.md#opting-out https://github.com/Homebrew/brew/blob/master/docs/Analytics.... on how to make Homebrew not send analytics data any more.
- f4rker 9y agoUsers can setup your domain on a white list
- jakub_g 9y agoAnother protip: don't name your images "banner.jpg"; "ads.js" and "analytics.js" etc are also not exactly great names. Another protip: Always make sure that critical flows in the app won't fail if analytics event fails. You probably want to wrap calls to analytics provider with your own function, and in that function check for existence of global analytics object like "window.ga" which may fail to load due to adblockers and similar tools. In other words, don't 'ga("send", ...)' all over your code. I had airplane ticket booking fail mysteriously because "pay" button had a analytics listener bound to it, and it would throw an exception when adblocker was on. Without devtools, I would not understand what's going on.
- paol 9y agoYup, had an "analytics.js" in a project recently (related to an app dashboard, nothing to do with tracking) and it got blocked. Luckily I caught it right away because I have uBlock installed in the same browser I do development in. Moral of the story: blocklists are a bit shitty and prone to overblocking due to excessively generic rules. Take that into consideration when naming things.
- deleted 9y ago[deleted]
- dmurray 9y ago> Another protip: don't name your images "banner.jpg"; "ads.js" and "analytics.js" etc are also not exactly great names. This is good advice even if you are designing banner ads or intrusive analytics! I often wondered how many ads get blocked by the very simple rules usually seen at the top of adblock lists: /ads/ etc. Ads vs adblockers is an arms race, and it seems like renaming the ads files to a random per-deployment name would have been the first escalation by the "bad guys". But maybe many developers of ad software don't even bother to fight adblock, preferring to optimize for users who don't use one.
- prebrov 9y agoThey do. I've recently encountered a video ad startup that runs a proxy wrapping VAST responses into a VMAP. So, a website would request an ad not from DFP, but from an inconspicuous CloudFront URL. These CF distributions are deployed for each publisher and you'd have to block them one by one, not being able to block the whole ad platform. They said that some adblockers can discover ad servers by parsing responses. If a response, say, is a VAST tag, they tag and blacklist a server. Adblockers are starting to employ heuristics to analyse what a server does, rather than relying on just URL pattern matching. Just like Virus VS. Antivirus arms race. Fascinating!
- aequitas 9y agoHad similar issues while debugging why the advertisement team had trouble deploying their updates using our CI system. Took a really long time to discover the xhr requests for their projects where blocked by the ad-blockers, the irony :)
- z3t4 9y agoits also common for antivirus to block arbitrary JS. not fun to debug or tell users to disable AV on your site.
- vsund 9y agoHere's @vsund, author of this commit message. I understand that the title may was a bit clickbaity and now the title got renamed to a more rational one (which is totally ok). Unfortunately the new title "A JavaScript browser library fails due to an adblocker blacklisting 'beacon.js'" doesn't reflect the situation very well in my opinion. The library didn't fail (mainly because there is no library yet), what instead happened is that the adblocker blocked GitHub internal requests which resulted in a unusable repository. The adblocker blocks requests that simply has "beacon.js" anywhere in the URL. I see this rather as an issue of adblockers blocking to much than bad naming of projects :)
- chillydawg 9y agoAs one of an extremely large group of people who will never use that library but DO get protected from some ads and tracking by blacklisting beacon.js, I disagree that it's an issue with ad blockers. The internet is a toxic place, to put it mildly, and if you're getting into any kind of public facing service on it, you need to know exactly what you're doing.
- vsund 9y agoI totally agree with you, but I think adblockers could do better than just block all requests that have "beacon.js" in it. But yeah, I definitely prefer many protected users about one working library :) There are so many possibilities to block content, I'm sure that we could do better with protecting users against tracking while ensuring that less content gets blocked false-positive.
- f4rker 9y agoThey are called "ad blockers" but block all kinds of "non ad" content that breaks sites in unexpected ways.
- Ajedi32 9y agoWait, you're saying that a false positive in an ad blocker is _not_ an issue with the ad blocker? Of course it is! Blocking files based solely on their names is a brittle and error-prone way of doing things, and this false positive is a clear example of that.
- keeperofdakeys 9y agoOne time I came across a github user with a username that started with a hyphen. I could browse their repos fine, but I couldn't view their github.io site on Linux. It turns out that Windows and OSX allow domain components to start with a hyphen, but Linux does not. There is at least one DNS RFC that disallows this though. Relevant Ubuntu bug. https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/668926 https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/66...
- seretogis 9y agoSolution: remove the "e" from the filename... "bacon.js", everyone loves bacon.
- bshimmin 9y agoAlready taken, of course: https://baconjs.github.io/ https://baconjs.github.io/ (and they have a picture of Francis Bacon, just to be contrary!)
- kowdermeister 9y agoSites constantly break because their codebase rely on some tracking lib. AirBnb currently fails to display the map because of uBlock.
- pastelsky 9y agoHappened to me as well when I published the source for a analytics browser extension on github (https://chrome.google.com/webstore/detail/google-analytics-logger/mnocefeloijpdenhbidaoildegppmkoi https://chrome.google.com/webstore/detail/google-analytics-l...) Anything to do with JavaScript on the page would fail. Thankfully, github's support team was very helpful in pointing out that uBlock was the cause.
- WiseWeasel 9y agoIn the same vein, I was recently working on a web app with a path at /advertisers, and discovered that ad blockers were preventing any AJAX requests to resources in that path. You might think twice before naming your paths to something containing the word 'advert'.
- always_good 9y agoA couple years ago I was bucketing hash filenames into subfolders by their first byte, like "b328ab391bbeb686b5fc.jpg" into the "b3" folder. Every once in a while, an image wouldn't load for some people on my website, and I couldn't figure out why until I listed out the paths of the images that had been reported over the last few days. /ad/ad67f2864a97aa80be22.jpg /ad/ad381cbc443a4fc56e7a.jpg /ad/adc225a332e69437a3b5.jpg
- hhh000 9y agonice way to promote your repo
- carrier_lost 9y agoThis seems like a good case in favor of Privacy Badger's model, where content blocking is based on the number of times a domain tries to track you across websites, rather than a blacklist of URL patterns and file names.
- Doxin 9y agoPrivacy badger has a nasty habbit of breaking login for sites using a login subdomain though. In my experience privacy badger has vastly more false positives than ublock for instance.
- cpeterso 9y agoI heard that Google's AdWords management portal ran into a similar problem because their web pages had HTML and CSS using names containing the word "ad" because that is related to the domain of ad management. AdWords customers running ad blockers couldn't manage their own AdWords campaigns. :)
- nashashmi 9y agoThis extreme vetting made me disable all of those adblocking lists. Now I manually go through web scripts and block the stuff I don't like. It turns out that majority of ads on the web are served by just a handful of advertisers. So my list of blocks include only 27 websites. And these site turn out to be the notorious displays of junk on the internet. I don't see ads on the web anymore. I also don't get called foul on by sites that block adblockers.
- jdormit 9y agoCould you publish that list somewhere?
- catshirt 9y ago> So the moral of this commit message is: Yes, objectively bad names exist. more like objectively bad content blocking algorithms... i'm not going to pretend i have a better solution than hardcoding file names. but i'm also not going to pretend it's not the responsibility of the ad blocker to eliminate false positives.
- LarryMade2 9y agoHad a similar thing on my website, I put all my images (regular jpegs, pngs, etc.) in a directory named ads (which contained more than ads) and the adblocker was dutifully hiding them - took me a while to figure out the culprit was the adblocker + folder name.
- seangrogg 9y agoWell, I guess between the rising popularity of ad-blockers and issues like these I'll actually install one and make sure to test with it active. May as well take note of the trends and adapt to them.
- patd 9y agoHad the exact same issue so I've recently started working on http://blockedby.com http://blockedby.com to check regularly if my content didn't get blocked. It's still very early but any feedback is welcome