Opened on 03/20/2017 at 07:39:28 PM
Closed on 03/21/2017 at 02:33:36 PM
Last modified on 06/28/2017 at 01:33:58 PM
#5019 closed defect (fixed)
Anti-adblock notification not added on first-run
Reported by: | greiner | Assignee: | jsonesen |
---|---|---|---|
Priority: | P2 | Milestone: | |
Module: | User-Interface | Keywords: | |
Cc: | sebastian, Ross | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Ross | Verified working: | yes |
Review URL(s): |
Description
Environment
Windows 10
Chrome 56
Adblock Plus 1.13.1749
see https://issues.adblockplus.org/ticket/5014#comment:8
Ubuntu 16.04
Chrome 56.0.2924.87
Adblock Plus 1.13.1
How to reproduce
- Remove Adblock Plus if it's installed
- Install Adblock Plus
- Go to https://forums.nexusmods.com/index.php?c=411,419
Observed behaviour
Anti-adblock notification does not appear. After reloading Adblock Plus and reloading the page the notification does appear though.
Expected behaviour
Anti-adblock notification appears.
Further information
This issue is caused by the following code in antiadblockInit.js:
let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl); if (subscription.lastDownload && subscription.disabled) addAntiAdblockNotification(subscription);
After a fresh install the anti-adblock filter list has not been downloaded yet so subscription.lastDownload is 0 whereas after reloading the extension this value is great than 0.
That code can also be found in the initial implemention of this feature.
Attachments (0)
Change History (5)
comment:1 Changed on 03/21/2017 at 07:22:49 AM by sebastian
comment:2 Changed on 03/21/2017 at 10:01:02 AM by jsonesen
- Owner set to jsonesen
- Review URL(s) modified (diff)
comment:3 Changed on 03/21/2017 at 12:56:29 PM by abpbot
A commit referencing this issue has landed:
Issue 5019 - Fixes anti adblock notification not being added on first run
comment:4 Changed on 03/21/2017 at 02:33:36 PM by jsonesen
- Resolution set to fixed
- Status changed from new to closed
comment:5 Changed on 06/28/2017 at 01:33:58 PM by Ross
- Tester changed from Unknown to Ross
- Verified working set
Fixed. Now works on first run/without browser restart.
ABP 1.13.2.1785
Chrome 49 / 59 / Windows 7
Please correct me if I'm wrong, but it seems the problem is in the code below:
So it seems the case that the subscription hasn't been (successfully) downloaded yet is handled, but the handler seems to only add the notification if the subsciption is NOT disabled, which seems incorrect and inconsistent with the logic above.