New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 771186 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

WebView reloads current URL instead of new one

Reported by david.ba...@gmail.com, Oct 3 2017

Issue description

Steps to reproduce the problem:
1. Load a non existing file in the WebView
2. In the error callback load an existing file
3. -

What is the expected behavior?
1. The URL loaded in stept 2 should be loaded.
2. It should be possible to implement both onReceivedError and onReceivedHttpError without this leading to the problem mentioned.

What went wrong?
1. First onReceivedHttpError() is called, then onReceivedError() and the first URL of the non existing file is loaded again as you can see in the response error leading to an infinite loop.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 7.1.1
Flash Version: 

Uncommenting one of both error callbacks solves the problem.
 
WebViewBugExample.txt
2.5 KB View Download
Cc: msrchandra@chromium.org nyerramilli@chromium.org sandeepkumars@chromium.org
Labels: Needs-triage-Mobile Triaged-Mobile Needs-Feedback
@david: Thanks for the report!!

Could you please provide us the sample test .apk file or app to check the issue from our end?

Thanks!!
This is the app where you can see it:
https://play.google.com/store/apps/details?id=com.sophos.smsec

Or do you need a debug version?
Project Member

Comment 3 by sheriffbot@chromium.org, Oct 4 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Feedback
Tested the above issue using #61.0.3163.98 on Android 8.0.0 Pixel Build/OPR1 170623.027 as per the steps mentioned in comment #0. and did not observe such behavior.

@@david: Could you please provide a screencast of the exact issue you're facing and details of the device that would help us in further triaging of the issue.

Thanks!!
I tested it on Xperia z3 compact with Android 6, Nexus 6 with Android 7.1.1 and ASUS zenpad 10 with Android 6&7. Could not reproduce on Nexus 5x&Android 8 Emulator.

Reproducible on WebView on Nexus 6 device:
Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/NGI55D; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36

Not reproducible on WebView on Nexus 5x & Android 7.1.1 emulator nor Android 8:
Mozilla/5.0 (Linux; Android 7.1.1; Android SDK built for x86 Build/NYC; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36
...
10-21 10:28:44.732 28406-28406/com.sophos.smsec W/Sophos: Loading Eula for pt failed! Using fallback.
10-21 10:28:44.755 28406-28570/com.sophos.smsec E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/EULA_pt.html
10-21 10:28:44.759 28406-28406/com.sophos.smsec W/Sophos: Loading Eula for pt failed! Using fallback.
10-21 10:28:44.762 28406-28406/com.sophos.smsec W/Sophos: Loading Eula for pt failed! Using fallback.
10-21 10:28:44.781 28406-28570/com.sophos.smsec E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/EULA_pt.html
10-21 10:28:44.786 28406-28406/com.sophos.smsec W/Sophos: Loading Eula for pt failed! Using fallback.
10-21 10:28:44.789 28406-28406/com.sophos.smsec W/Sophos: Loading Eula for pt failed! Using fallback.
10-21 10:28:44.801 28406-28570/com.sophos.smsec E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/EULA_pt.html
10-21 10:28:44.807 28406-28406/com.sophos.smsec W/Sophos: Loading Eula for pt failed! Using fallback.
10-21 10:28:44.811 28406-28406/com.sophos.smsec W/Sophos: Loading Eula for pt failed! Using fallback.
10-21 10:28:44.820 28406-28570/com.sophos.smsec E/AndroidProtocolHandler: Unable to open asset URL: file:
...

1. Have you use my attached code? (attention: both onReceivedHttpError and onReceivedError must be uncommented to reproduce the issue)
2. Have you tested with the mentioned app?

Attached a screenshot from the Nexus 6, is that what you see with some flickering once in a while and eventually nothing being shown a few seconds.


device-2017-10-05-103125.png
127 KB View Download
Project Member

Comment 6 by sheriffbot@chromium.org, Oct 5 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: TE-NeedsTriageFromMTV
Components: Mobile>WebView
Labels: -TE-NeedsTriageFromMTV -Triaged-Mobile
Sandeep, please try on Nexus 6.

Comment 10 by ctzsm@chromium.org, Oct 20 2017

Labels: Needs-Feedback
david.bauer.sophos@, it's likely not a WebView issue since it only happens on a specific type of devices.

I had tried the app you mentioned in #2, but without clear steps, it is hard for us to repro on our end. Could you please provide a simplified testing app to illustrate the issue? Or at least a video showing the expected behavior and wrong behavior will also be helpful.
Ok, I will try to make a standalone project, but as I said, you don't need more than the code I already provided. You start the App I said, change the language of the device to some of the languages not supported by our app, let's say russian, and you will get what I am reporting (attention: we are releasing a new version of the app this week with a workaround for this problem, so it won't be reproducible anymore with it).
Project Member

Comment 12 by sheriffbot@chromium.org, Oct 23 2017

Cc: ctzsm@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "ctzsm@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Attached the standalone project, I implemented some logs so you can also see in the logs the methods being called.
Tested on Nexus 6:
Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/NGI55D; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36
WebViewBug.zip
6.1 MB Download
Status: WontFix (was: Unconfirmed)
You need to call WebView.stopLoading(), before load new url. please reopen the bug if you still have issue.
But that is only a workaround, I did not report this to get a workaround, I already had a workaround, I put some effort so you get the necessary info to reproduce the BUG and you come up with a workaround.

Comment 16 by torne@chromium.org, Oct 31 2017

Status: Unconfirmed (was: WontFix)
This doesn't sound like it's actually device-specific, but rather a regression in webview (the devices on which it doesn't repro are using an older webview version per comment 5). Calling loadUrl seems like it should interrupt the current navigation just fine..
See also  issue 775385  about loadurl("javascript:") seeming to interrupt the navigation in progress, which is almost the opposite problem to this..

Not sure if we've actually regressed here or if our behaviour has always been weird; I suspect we don't ahve any tests covering what happens if you call loadUrl during a navigation due to the inherent race there?
Cc: ntfschr@chromium.org
Labels: Needs-Bisect Needs-TestConfirmation
Requesting test confirmation and bisect for #13. cc'ing ntfschr for navigation test coverage in #17.
Owner: sandeepkumars@chromium.org
Status: Assigned (was: Unconfirmed)
reassigning to sandeepkumars@chromium.org for #18
Labels: Needs-Feedback
@david.bauer: Could you please help us with the screencast as we were unable to reproduce the issue from our end.

Thanks!!
tried on 4 different device, still not able to repro this issue

Nexus 6/N
SAungs S6/N
Sony Xperia z5
Asus predector/L
@david.bauer.sophos instructions for a screen recording are here: https://developer.android.com/studio/command-line/adb.html#screenrecord
Not reproducible anymore on:

ASUS zenpad 10:
02-05 09:06:42.239 31426-31426/com.example.webviewbug.webviewbug I/MainActivity: UA: Mozilla/5.0 (Linux; Android 5.0.1; YOGA Tablet 2-1050F Build/LRX22C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/64.0.3282.123 Safari/537.36

Nexus 6:
02-05 09:11:11.817 7031-7031/? I/MainActivity: UA: Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F27M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/64.0.3282.137 Mobile Safari/537.36
Labels: -Needs-Feedback
Status: WontFix (was: Assigned)
Thanks! Ping this if the issue comes back, but this was probably a bug that has already been fixed.

Sign in to add a comment