Bug in Adblock Plus for Chrome and Opera caused acceptable ads setting to be reverted · 2013-08-16 12:51 by Wladimir Palant
Adblock Plus for Chrome and Opera releases starting with version 1.5.1 had a very bad bug: acceptable ads were enabled on update, even for users who previously opted out. This issue is fixed in the Adblock Plus 1.5.4 release but the damage is already done — there is no way to distinguish users who opted out and had acceptable ads re-enabled on update from those who didn’t opt out.
What should somebody who opted out previously do now?
If you use Adblock Plus for Chrome or Opera and unchecked “Allow some non-intrusive advertising” previously then chances are that it is checked again now. You will have to go into Adblock Plus options and uncheck it again. Unfortunately, this issue cannot be repaired automatically. We are really sorry about that.
How could this happen?
The acceptable ads feature was first introduced in Adblock Plus 1.3 for Chrome. So Adblock Plus for Chrome had some code to enable acceptable ads for people installing Adblock Plus for the first time and those updating from versions older than 1.3. It’s the second part that malfunctioned now.
If you are interested in the technical details: Adblock Plus for Chrome and Adblock Plus for Firefox share lots of code but currently don’t use the same version numbers. To compensate for that, Adblock Plus for Chrome was using hardcoded version numbers from Firefox internally, not the real version number of the extension. So the check to see whether the previously installed version already had the acceptable ads feature compared the previous version against version number 2.1 (Adblock Plus for Firefox release corresponding to Adblock Plus 1.3 for Chrome).
Now hardcoded version numbers that have to be changed manually aren’t a great solution. Among other platform changes before Adblock Plus 1.5.1 for Chrome release I also updated the
info module to be more consistent and do less hardcoding. This still left the extension version hardcoded and I realized that we can avoid that and use the real extension version instead (build tools change, Adblock Plus for Chrome change).
It’s not like this change happened mindlessly. I actually checked whether that version number is used anywhere but for some reason I only found the filter list compatibility check (currently ignored in Chrome). This change was also reviewed but while the reviewer noted the version number change he didn’t find any relevant use of it either.
The previously mentioned update code became problematic with the update from version 1.5.2 to 1.5.3 because the previous version was suddenly lower than 2.1 and acceptable ads were enabled. Note that the previous releases didn’t trigger that issue because most people skipped the update to 1.5.1 and in the update from 1.5.0 to 1.5.2 the previously installed version was still calling itself 2.1. Yesterday I fixed this by removing the check for updates when acceptable ads are enabled — versions predating Adblock Plus 1.3 for Chrome are now old enough that this is pointless.
Why are acceptable ads an opt-out feature again?
This question comes up regularly so I want to link to the official documentation here. The point of acceptable ads is to create an incentive for advertisers to use better forms of advertising (something where we achieved some successes already) but this is simply unrealistic with an opt-in feature.
Why did this take more than two weeks to notice?
There were several factors that contributed to the delay, one being that all developers had acceptable ads turned on so it wasn’t noticed in dogfooding. Community reports about that issue were also scarce, simply because most people also have this feature turned on. In addition, the issue we had in Adblock Plus 1.5.1 for Chrome further masked this bug. The first report I got went like this: “the issue isn’t really fixed, Adblock Plus 1.5.3 resets the filters again” — yet I was absolutely certain that the bug we had in version 1.5.1 didn’t come back. Normally we would need a more thorough investigation here but there is a long-standing and very annoying Chrome bug causing filters to be reset occasionally so I wrote it off as being this issue. It took this detailed bug report to recognize this as a new and very serious problem (many thanks to Banzi, mapx and Anonymous).
What can we do better in future?
Both the bug in Adblock Plus 1.5.1 and the one fixed now highlight an issue with our testing: we don’t test the update scenario consistently before a release. Unfortunately, we cannot really rely on automatic testing here other than for testing smaller aspects of an update, this test rather needs to be performed manually. Manual testing is also complicated however: unlike with Firefox we don’t even have the final release build before we upload it to the Chrome Web Store, the builds are signed in the Web Store and not on our side. I think the following approach should mostly work however:
- For each Chrome/Opera release create release builds that are signed by us and go into the downloads repository (which makes them available via
downloads.adblockplus.org). These builds won’t match the ones that end users get but should be identical with the exception of the signature — that’s the best we can do.
- Add testing the update scenario with these builds to our release checklist. In addition to general functionality tests (what we currently do for Firefox) we should explicitly test that filter list settings, acceptable ads setting and custom filters don’t change on update.
Commenting is closed for this article.