Opened 3 years ago

Closed 3 years ago

#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 3 years ago.
black screen
imgur.adblock_on.txt (15.8 KB) - added by asmirnov 3 years ago.
logs (adblock is on)
imgur.adblock_off.txt (8.9 KB) - added by asmirnov 3 years ago.
logs (adblock is off)
Снимок экрана 2017-04-06 в 10.43.26.png (1.2 MB) - added by asmirnov 3 years ago.
user agent
Снимок экрана 2017-04-06 в 10.43.22.png (5.1 MB) - added by asmirnov 3 years ago.
working on desktop
device-2017-04-06-105601.png (1.6 MB) - added by asmirnov 3 years ago.
shown with webView.getSettings().setDomStorageEnabled(true);
imgur.adblock_on_working.txt (27.5 KB) - added by asmirnov 3 years ago.
logs with enabled local storage (working)

Download all attachments as: .zip

Change History (12)

Changed 3 years ago by asmirnov

black screen

Changed 3 years ago by asmirnov

logs (adblock is on)

Changed 3 years ago by asmirnov

logs (adblock is off)

comment:1 Changed 3 years ago 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 3 years ago by asmirnov

  • Ready set

Changed 3 years ago by asmirnov

user agent

Changed 3 years ago by asmirnov

working on desktop

comment:3 Changed 3 years ago 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 3 years ago by asmirnov

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

Changed 3 years ago by asmirnov

logs with enabled local storage (working)

comment:4 Changed 3 years ago 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 3 years ago by asmirnov

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