Opened on 04/06/2017 at 06:10:22 AM

Closed on 04/06/2017 at 06:25:52 AM

#5111 closed defect (rejected)

imgur.com is not working in AdblockWebView demo app

Reported by: asmirnov Assignee: asmirnov
Priority: P4 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: fhd, robert, vicky Blocked By:
Blocking: Platform: Android
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

While testing for some milestone (March,31) we've found that "imgur.com" can't be shown in AdblockWebView demo app ("m.imgur.com" to be more detailed). Turning Adblock off in the settings did not help. Quick looking into the logs shown that nothing is wrong with AdblockWebView. We need to investigate.

How to reproduce

  1. Launch AdblockWebView demo app
  2. navigate to "imgur.com"
  3. make sure black screen is shown

...

Observed behaviour

Black webpage screen

Expected behaviour

Regular webpage surface (with images).

Attachments (7)

device-2017-04-06-105640.png (34.9 KB) - added by asmirnov on 04/06/2017 at 06:11:16 AM.
black screen
imgur.adblock_on.txt (15.8 KB) - added by asmirnov on 04/06/2017 at 06:12:19 AM.
logs (adblock is on)
imgur.adblock_off.txt (8.9 KB) - added by asmirnov on 04/06/2017 at 06:12:36 AM.
logs (adblock is off)
Снимок экрана 2017-04-06 в 10.43.26.png (1.2 MB) - added by asmirnov on 04/06/2017 at 06:15:51 AM.
user agent
Снимок экрана 2017-04-06 в 10.43.22.png (5.1 MB) - added by asmirnov on 04/06/2017 at 06:16:21 AM.
working on desktop
device-2017-04-06-105601.png (1.6 MB) - added by asmirnov on 04/06/2017 at 06:21:25 AM.
shown with webView.getSettings().setDomStorageEnabled(true);
imgur.adblock_on_working.txt (27.5 KB) - added by asmirnov on 04/06/2017 at 06:22:55 AM.
logs with enabled local storage (working)

Download all attachments as: .zip

Change History (12)

Changed on 04/06/2017 at 06:11:16 AM by asmirnov

black screen

Changed on 04/06/2017 at 06:12:19 AM by asmirnov

logs (adblock is on)

Changed on 04/06/2017 at 06:12:36 AM by asmirnov

logs (adblock is off)

comment:1 Changed on 04/06/2017 at 06:14:29 AM by asmirnov

Checking UserAgent in AdblockWebView:
"User-Agent" -> "Mozilla/5.0 (Linux; Android 5.1.1; Android SDK built for x86 Build/LMY48X) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36"

It's working in desktop browser with the same user agent

comment:2 Changed on 04/06/2017 at 06:15:01 AM by asmirnov

  • Ready set

Changed on 04/06/2017 at 06:15:51 AM by asmirnov

user agent

Changed on 04/06/2017 at 06:16:21 AM by asmirnov

working on desktop

comment:3 Changed on 04/06/2017 at 06:19:59 AM by asmirnov

Checking errors in JS log shown that some object is null and it was unexpected - the problem is in "imgur.mobile.lib.min.js" script.
The missing object is window.localStorage.

This can be fixed by settings AdbockWebView setting setDomStorageEnabled(true):
https://developer.android.com/reference/android/webkit/WebSettings.html#setDomStorageEnabled(boolean)

However by default the value if false and imgur script have to check if it's null to work correctly.
Settings the value confirmed it can be shown now (see attachment) and logs.

Changed on 04/06/2017 at 06:21:25 AM by asmirnov

shown with webView.getSettings().setDomStorageEnabled(true);

Changed on 04/06/2017 at 06:22:55 AM by asmirnov

logs with enabled local storage (working)

comment:4 Changed on 04/06/2017 at 06:25:04 AM by asmirnov

However, here are my considerations:
1) imgur should check if window.localStorage is not null
2) this is app logics to enable some settings (as default ones are not suitable for imgur) and i've checked it can be fixed in the app code, not in library code.

So i'd say it's invalid issue for AdblockWebView.

comment:5 Changed on 04/06/2017 at 06:25:52 AM by asmirnov

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

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 asmirnov.
 
Note: See TracTickets for help on using tickets.