Opened on 05/09/2017 at 05:00:49 PM

Closed on 06/22/2017 at 10:59:15 AM

Last modified on 06/23/2017 at 01:52:42 PM

#5227 closed defect (fixed)

Ad blocking shuts down when visiting specific websites

Reported by: misha Assignee:
Priority: P1 Milestone: Adblock-Browser-for-iOS-1.5.3
Module: Adblock-Browser-for-iOS Keywords: ad, acceptable, blocking
Cc: mario, jand, tomasnovella Blocked By:
Blocking: Platform: Adblock Browser for iOS
Ready: yes Confidential: no
Tester: Scheer Verified working: yes
Review URL(s):

Description (last modified by mario)

Environment

Adblock Browser 1.5.2 on iOS 10.2.1 (iPhone 6s)

How to reproduce

  1. Ensure ad blocking is enabled, and Acceptable Ads are disabled
  2. Go to radaronline.com and tmz.com and browse both sites for a few minutes (open articles and videos)

Observed behaviour

At some point after browsing both websites, ABB starts to show ads for all websites. It appears that ABP shuts down in the background altogether.
On radaronline.com I saw in-line banner ads near the top of (or at the top of) pages (these most likely adhere to AA standards, so I was not at first upset), and then one larger (most likely over 30%) in-line ad. At that point, I double checked my settings and reloaded, after which an animated sticky-ad appeared at the bottom. Screenshot collage attached.

Expected behaviour

When ad blocking is enabled, and acceptable ads are disabled, I expect none of these ads to display. If acceptable ads are enabled, the small in-line ads would be acceptable, but I believe the other ads still fall outside of the AA standards, and should not be displayed in any case.

Hint for testers

This issue was most likely introduced while switching from the UIWebView website rendering component to WKWebView with the release of 1.5.2. UIWebView is still used for displaying websites, however, background scripts were changed from using UIWebView to WKWebView (due to stability reasons).
It appears, now, ad blocking just stops working instead of the whole application crashing as before. Switching back to UIWebView was no option, as the app would just crash instead of shutting down ad blocking. This very issue (ad blocking not working) was mitigated by monitoring the thread ABP runs in and restarting it immediately after it shuts down.
Thus, as soon as memory pressure gets too high for WKWebView to handle, it is restarted.

Attachments (2)

IMG_0230.jpg (510.1 KB) - added by misha on 05/09/2017 at 05:04:08 PM.
IMG_0232.jpg (570.5 KB) - added by misha on 05/10/2017 at 05:53:29 PM.

Download all attachments as: .zip

Change History (16)

Changed on 05/09/2017 at 05:04:08 PM by misha

Changed on 05/10/2017 at 05:53:29 PM by misha

comment:1 Changed on 05/10/2017 at 05:53:37 PM by misha

Today after performing the steps provided via email (below) the issues with radaronline.com seem to be resolved.

  1. Start ABB
  2. Make sure ad blocking is enabled and Acceptable Ads is disabled
  3. Kill ABB by double-tapping the home button and swiping up on ABB
  4. Open ABB
  5. Visit radaronline.com -> ads still visible?

No ads visible today. There is some blank space (image attached) where ads may have loaded, but would not consider this an issue.

comment:2 Changed on 05/16/2017 at 01:18:13 PM by mario

  • Cc mario jand tomasnovella added
  • Description modified (diff)
  • Priority changed from Unknown to P2
  • Summary changed from Ads displaying on iOS even when Adblocking enabled and Acceptable Ads disabled to Ad blocking shuts down when visiting specific websites

Changed the scope of the issue. After investigation it appears that the mentioned website/s kill ABP in the background at some point and thus ABB starts to show apps for all websites. @Misha, this is also why you don't see ads anymore when you reload ABB.

comment:3 Changed on 05/16/2017 at 04:12:16 PM by misha

I would like to note that I have since seen ads on a couple sites (knowable.com and boredpanda.com) and had to restart in order to get them to go away, so it does seem to still be an existing bug unfortunately.

comment:4 Changed on 05/16/2017 at 04:20:40 PM by mario

@Misha, thanks for the feedback. Yes, the root problem causes ads to be shown on various sites. However radaronline.com and tmz.com seem to be "perfect" to trigger that misbehaviour. ABB functions normally until, at some point, the ad blocking engine shuts down in the background. From that point on, ABB starts displaying ads until it is reloaded.
We're currently looking into publishing a minor release for this bug specifically, which would also fix ads being shown on other sites. I'll keep you updated.

Last edited on 05/16/2017 at 04:24:57 PM by mario

comment:5 Changed on 05/24/2017 at 10:02:59 AM by mario

  • Priority changed from P2 to P1

Adjusting Priority. According to app store feedback, a lot of users are affected.

comment:6 Changed on 06/06/2017 at 08:22:57 AM by jand

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed on 06/06/2017 at 08:24:49 AM by mario

  • Milestone set to Adblock-Browser-for-iOS-next
  • Ready set

comment:8 Changed on 06/13/2017 at 09:16:20 AM by mario

  • Description modified (diff)

comment:9 Changed on 06/13/2017 at 10:53:34 AM by scheer

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Tester changed from Unknown to Scheer

The main issue here is seemingly fixed. No longer, after a memory pressure is ABP disabled and ads shown. Instead, WebView is caught and restarted. During testing, I did not experience any ads as described above.

However, there are two issues connected to this one issue that needs to be looked at.

  1. There is still currently a pop-up message in place that reads: 'Reloading - WebView has been reloaded - OK' when ABP is re-initialized. This pop-up needs to be removed.
  1. In a few very rare cases the app still crashed. Upon restarting the app the last page was reloaded, but ads were shown. Once the user then manually refreshed the page again, the ads were gone. My suspicion here is that ABP fails as per this issue, but instead of it being restarted as per the fix here, it is not and is only restarted upon the user manualy refreshing the page again. Is there any way to get the fix from this issue to also apply upon the restart of app after memory crash?

ABB 1.5.3 (1557)
iPhone 6s Plus
iOS 10.2.1

comment:10 Changed on 06/19/2017 at 09:03:46 AM by jand

Thanks for your feedback. Regarding connected issues:

  1. I looked into the code, I saw that pop-up message is not conditionally compiled just for debug configuration. That is bug which need to fix and I will do it.
  1. This issue is probably caused by the fact that the extension is loading slower then the browser do. Only possible solution is to delay loading of browser. This issue is not probably connected to #5227 and it is more general problem of browser.

comment:11 Changed on 06/19/2017 at 01:39:58 PM by mario

  1. In a few very rare cases the app still crashed. Upon restarting the app the last page was reloaded, but ads were shown. Once the user then manually refreshed the page again, the ads were gone. My suspicion here is that ABP fails as per this issue, but instead of it being restarted as per the fix here, it is not and is only restarted upon the user manualy refreshing the page again. Is there any way to get the fix from this issue to also apply upon the restart of app after memory crash?

As it doesn't seem to be related, I've opened a follow-up for this one: #5328
Point 1. is then the only regression left.

comment:12 Changed on 06/22/2017 at 10:59:15 AM by jand

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:13 Changed on 06/22/2017 at 10:30:10 PM by traynard

Verified issue #1 from above is no longer happening on ABB iOS.

comment:14 Changed on 06/23/2017 at 01:52:42 PM by traynard

  • Verified working set

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.