Opened 3 years ago

Closed 3 years ago

#4619 closed defect (fixed)

Acceptable Ads are not displayed at the end of the search results on Kayak.com in AdblockWebView

Reported by: scheer Assignee:
Priority: Unknown Milestone:
Module: Libadblockplus-Android Keywords:
Cc: Anton, sergz Blocked By:
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Scheer Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29361445/#ps29361947

Description

With AA enabled, related ads should be shown at the bottom of search results on http://www.kayak.com, but currently, no ads are shown at all. The Chrome screenshot depicts how ads should appear on the mobile site.

Environment

AdblockWebView (95) Lightning Browser
Galaxy S7
Android 6.0.1
Easylist
AA Enabled

How to reproduce

  1. Enable Acceptable Ads
  2. Navigate to http://www.kayak.com
  3. Enter search criteria and search

Observed behaviour

No related acceptable ads are shown at the bottom of the search results.

Expected behaviour

Acceptable ads should be shown at the bottom of the search criteria.

Attachments (4)

Kayak AdblockWebView.txt (207.8 KB) - added by scheer 3 years ago.
Chrome.PNG (70.3 KB) - added by scheer 3 years ago.
Screenshot_20161108-103953.png (690.8 KB) - added by scheer 3 years ago.
ide.png (143.6 KB) - added by asmirnov 3 years ago.
AA is blocked by filter engine (IDE)

Download all attachments as: .zip

Change History (13)

Changed 3 years ago by scheer

Changed 3 years ago by scheer

Changed 3 years ago by scheer

comment:1 Changed 3 years ago by asmirnov

i can see no AA elem hide selectors and some ad requests are rejected:

// no AA elem hide selectors
11-08 10:39:10.465 2273-2666/acr.browser.barebones D/AdblockWebView: Requesting elemhide selectors from AdblockEngine for https://www.kayak.de/?ispredir=true in Thread[Thread-1098,5,main]
...
11-08 10:39:10.465 2273-2666/acr.browser.barebones D/AdblockWebView: Finished requesting elemhide selectors, got 0 in Thread[Thread-1098,5,main]

// blocked some ads
11-08 10:39:12.495 2273-2304/acr.browser.barebones D/AdblockWebView: Header referrer for https://ad.doubleclick.net/ddm/adj/N232003.197812NSO.CODESRV/B10240412.136907051;sz=1x2;ord=452333514538;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=? is https://www.kayak.de/hotels?ispredir=true&mgtm=mgtm
908	11-08 10:39:12.505 2273-2304/acr.browser.barebones W/AdblockWebView: Blocked loading https://ad.doubleclick.net/ddm/adj/N232003.197812NSO.CODESRV/B10240412.136907051;sz=1x2;ord=452333514538;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?
909	11-08 10:39:12.505 2273-2304/acr.browser.barebones D/AdblockWebView: Header referrer for https://cdn.krxd.net/controltag?confid=KvEl8iHW is https://www.kayak.de/hotels?ispredir=true&mgtm=mgtm
910	11-08 10:39:12.505 2273-2304/acr.browser.barebones D/AdblockWebView: Allowed loading https://cdn.krxd.net/controltag?confid=KvEl8iHW
911	11-08 10:39:12.505 2273-2304/acr.browser.barebones D/AdblockWebView: Header referrer for https://d2s3bizpgknsvz.cloudfront.net/?adv_id=439309&event=&product_type=hotel&kayak_cid=kUkFQKfG0A_4yWQ7ZTMGBzbJbyE is https://www.kayak.de/hotels?ispredir=true&mgtm=mgtm
912	11-08 10:39:12.505 2273-2304/acr.browser.barebones D/AdblockWebView: Allowed loading https://d2s3bizpgknsvz.cloudfront.net/?adv_id=439309&event=&product_type=hotel&kayak_cid=kUkFQKfG0A_4yWQ7ZTMGBzbJbyE
913	11-08 10:39:12.515 2273-2304/acr.browser.barebones D/AdblockWebView: Header referrer for https://ib.adnxs.com/px?id=611257&member=362&member_id=362&seg_code=kayak_mweb,kayak_hotel&order_id=kUkFQKfG0A_4yWQ7ZTMGBzbJbyE&t=2&site=kayak is https://www.kayak.de/hotels?ispredir=true&mgtm=mgtm
914	11-08 10:39:12.515 2273-2304/acr.browser.barebones D/AdblockWebView: Allowed loading https://ib.adnxs.com/px?id=611257&member=362&member_id=362&seg_code=kayak_mweb,kayak_hotel&order_id=kUkFQKfG0A_4yWQ7ZTMGBzbJbyE&t=2&site=kayak
915	11-08 10:39:12.515 2273-2304/acr.browser.barebones D/AdblockWebView: Header referrer for https://ad.doubleclick.net/ddm/activity/src=4694850;type=invmedia;dc_lat=;dc_rdid=;ord=1;u3=hotel;u8=mweb;cat=qbokg03w;site=kayak is https://www.kayak.de/hotels?ispredir=true&mgtm=mgtm
916	11-08 10:39:12.525 2273-2304/acr.browser.barebones W/AdblockWebView: Blocked loading https://ad.doubleclick.net/ddm/activity/src=4694850;type=invmedia;dc_lat=;dc_rdid=;ord=1;u3=hotel;u8=mweb;cat=qbokg03w;site=kayak

comment:2 Changed 3 years ago by asmirnov

i've temporarily removed "kayak.ru/mobileads" from blocking and i've found AA is shown now.

changed source code (AdblockWebView):

if (adblockEngine.matches(url, contentType, referrerChainArray))
      {
        if (url.startsWith("https://www.kayak.ru/s/mobileads/"))
        {
          w("Temporarily (hardcoded) exclude this URL (" + url + ") from blocking");
        }
        else
        {
          w("Blocked loading " + url);

          // if we should block, return empty response which results in 'errorLoading' callback
          return new WebResourceResponse("text/plain", "UTF-8", null);
        }
      }

      d("Allowed loading " + url);

      // continue by returning null
      return null;

log:

11-08 16:19:27.054 24070-24197 D/AdblockWebView: Header referrer for https://www.kayak.ru/s/mobileads/hotel?_pt_=1&checkin_date=08.11.2016&checkout_date=11.11.2016&citycode=14713&gdadPage=mwebresults&gdads=1&gtadPage=1&gtads=4&guests=2&initialRequest=true&inlines=1&output=json&rooms=1&searchid=uMEEA3ooco&version=1 is https://www.kayak.ru/hotels/%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0,%D0%A0%D0%BE%D1%81%D1%81%D0%B8%D1%8F-c14713/2016-11-08/2016-11-11/2guests?ispredir=true
11-08 16:19:27.054 24070-24197 D/AdblockWebView: Checking .matches() https://www.kayak.ru/s/mobileads/hotel?_pt_=1&checkin_date=08.11.2016&checkout_date=11.11.2016&citycode=14713&gdadPage=mwebresults&gdads=1&gtadPage=1&gtads=4&guests=2&initialRequest=true&inlines=1&output=json&rooms=1&searchid=uMEEA3ooco&version=1 with type OTHER, referrers:
                                                 #0: https://www.kayak.ru/hotels/%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0,%D0%A0%D0%BE%D1%81%D1%81%D0%B8%D1%8F-c14713/2016-11-08/2016-11-11/2guests?ispredir=true
11-08 16:19:27.064 24070-24197 W/AdblockWebView: Temporarily (hardcoded) exclude this URL (https://www.kayak.ru/s/mobileads/hotel?_pt_=1&checkin_date=08.11.2016&checkout_date=11.11.2016&citycode=14713&gdadPage=mwebresults&gdads=1&gtadPage=1&gtads=4&guests=2&initialRequest=true&inlines=1&output=json&rooms=1&searchid=uMEEA3ooco&version=1) from blocking
11-08 16:19:27.064 24070-24197 D/AdblockWebView: Allowed loading https://www.kayak.ru/s/mobileads/hotel?_pt_=1&checkin_date=08.11.2016&checkout_date=11.11.2016&citycode=14713&gdadPage=mwebresults&gdads=1&gtadPage=1&gtads=4&guests=2&initialRequest=true&inlines=1&output=json&rooms=1&searchid=uMEEA3ooco&version=1

so. it's blocked becuase filterEngine blocks it:
1) subscribed to AA
2) contenttype = OTHER (as it's not matched to known other regex patterns)
see attached ide screenshot

Changed 3 years ago by asmirnov

AA is blocked by filter engine (IDE)

comment:3 Changed 3 years ago by asmirnov

  • Cc sergz added

comment:4 Changed 3 years ago by asmirnov

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed 3 years ago by asmirnov

please confirm it's fixed in Lightning+ABP 96

comment:6 Changed 3 years ago by asmirnov

Exception is for XmlHttpRequest

@@/s/mobileads/*$xmlhttprequest,domain=kayak.com.au|kayak.com.br|checkfelix.com|kayak.dk|kayak.fr|kayak.com.hk|kayak.it|kayak.com.mx|kayak.nl|kayak.no|kayak.pl|kayak.ru|kayak.sg|kayak.es|kayak.se|kayak.ch|swoodoo.com|kayak.co.uk|kayak.com|kayak.de|kayak.co.in|kayak.ie|kayak.pt|kayak.se|kayak.com.tr

and contentType was OTHER. Now we detect if it's XmlHttpRequest using header.

Unfortunately it will not work before android-21 (5.0) as request headers are not available.

comment:7 Changed 3 years ago by scheer

  • Tester changed from Unknown to Scheer
  • Verified working set
  • Acceptable Ads are now correctly shown at the end of the search results.

AdblockWebView (97) Lightning Browser
Galaxy S7
Android 6.0.1

comment:8 Changed 3 years ago by asmirnov

The source code changes will be included in issue 4399 files

comment:9 Changed 3 years ago by asmirnov

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.