WebView reloads current URL instead of new one
Reported by
david.ba...@gmail.com,
Oct 3 2017
|
|||||||||||||||
Issue descriptionSteps 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.
,
Oct 4 2017
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?
,
Oct 4 2017
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
,
Oct 5 2017
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!!
,
Oct 5 2017
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.
,
Oct 5 2017
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
,
Oct 13 2017
,
Oct 13 2017
,
Oct 13 2017
Sandeep, please try on Nexus 6.
,
Oct 20 2017
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.
,
Oct 23 2017
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).
,
Oct 23 2017
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
,
Oct 23 2017
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
,
Oct 24 2017
You need to call WebView.stopLoading(), before load new url. please reopen the bug if you still have issue.
,
Oct 25 2017
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.
,
Oct 31 2017
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..
,
Nov 3 2017
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?
,
Nov 6 2017
Requesting test confirmation and bisect for #13. cc'ing ntfschr for navigation test coverage in #17.
,
Nov 10 2017
reassigning to sandeepkumars@chromium.org for #18
,
Nov 20 2017
@david.bauer: Could you please help us with the screencast as we were unable to reproduce the issue from our end. Thanks!!
,
Feb 2 2018
tried on 4 different device, still not able to repro this issue Nexus 6/N SAungs S6/N Sony Xperia z5 Asus predector/L
,
Feb 2 2018
@david.bauer.sophos instructions for a screen recording are here: https://developer.android.com/studio/command-line/adb.html#screenrecord
,
Feb 5 2018
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
,
Feb 5 2018
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 |
|||||||||||||||
Comment 1 by sandeepkumars@chromium.org
, Oct 4 2017Labels: Needs-triage-Mobile Triaged-Mobile Needs-Feedback