Android-AdvancedWebView icon indicating copy to clipboard operation
Android-AdvancedWebView copied to clipboard

onPageStarted with old/previous url

Open ahar-zz opened this issue 6 years ago • 5 comments

Hello,

We use your lib and it looks fine, except for unnecessary call onPageStarted with previous url, which leads to redirect to this url.

Any workaround?

ahar-zz avatar Apr 03 '19 15:04 ahar-zz

Thanks!

Any chance you could run the project in Source, with its library and sample modules, and make some modifications for debugging purposes?

We think this is related to https://github.com/delight-im/Android-AdvancedWebView/issues/231 and could be solved in the same way.

ocram avatar Apr 03 '19 17:04 ocram

Already tried that, does not fix the problem. I copied AdvancedWebViewClient to my sources for debug purposes. Turns out that first appearance of old url is in https://github.com/delight-im/Android-AdvancedWebView/blob/master/Source/library/src/main/java/im/delight/android/webview/AdvancedWebView.java#L469 . To be honest, I don't have any further ideas. May be you have? :)

ahar-zz avatar Apr 03 '19 17:04 ahar-zz

That’s strange.

Could you check if shouldOverrideUrlLoading is called for these requests and if they are perhaps cancelled via return true?

Apart from that, could you check if you have accidentally implemented both WebViewClient#onPageStarted and AdvancedWebView.Listener#onPageStarted?

ocram avatar Apr 03 '19 17:04 ocram

  1. shouldOverrideUrlLoading - is not called for these requests.
  2. I had that, but know I don't implement them in my code. Only onPageStarted from AdvancedWebView.Listener.

Just FYI this bug is not permanent, it has strange nature, it appears and disappears by itself.

ahar-zz avatar Apr 03 '19 17:04 ahar-zz

Thanks for the additional information – and sorry, for now, we don’t have any solution since we don’t know what may be causing these problems.

ocram avatar Apr 03 '19 18:04 ocram