Issue metadata
Sign in to add a comment
|
Ordering of WebViewClient callbacks is inconsistent after the chrome 69 update
Reported by
cjp...@gmail.com,
Sep 28
|
||||||||||||||||||||||
Issue description
Steps to reproduce the problem:
1. Create an Android app using a WebView
2. Register a WebViewClient with the WebView that logs on onPageStarted, onPageFinished and onReceivedHttpAuthRequest
3. Load a page that uses NTLM authentication in the WebView
Example Code:
package com.example.webviewtest;
import android.graphics.Bitmap;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.HttpAuthHandler;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView myWebView = new WebView(this.getApplicationContext());
setContentView(myWebView);
myWebView.setWebViewClient(new MyWebViewClient());
myWebView.loadUrl("http://IP/app");
}
class MyWebViewClient extends WebViewClient {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
android.util.Log.d("MyWebViewClient", "Page Started");
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
android.util.Log.d("MyWebViewClient", "Page Finished");
}
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
super.onReceivedHttpAuthRequest(view, handler, host, realm);
android.util.Log.d("MyWebViewClient", "Auth Request: " + host + " " + realm);
}
}
}
What is the expected behavior?
The order of events should be PageStarted, ReceivedHttpAuthRequest, PageFinished.
What went wrong?
If the URL has a domain name the order of events is PageStarted, ReceivedHttpAuthRequest, PageFinished. If the URL has an IP address or machine name as the host the order of events is ReceivedHttpAuthRequest, PageStarted, PageFinished.
If the Android System WebView or Chrome app is reverted to 68 it works consistently.
Did this work before? Yes 68
Does this work in other browsers? N/A
Chrome version: 69.0.3497.100 Channel: stable
OS Version: 5,6,7,8
Flash Version:
May be related to https://bugs.chromium.org/p/chromium/issues/detail?id=889387
,
Oct 1
This issue seems similar to issue 889387 , hence merging into it. If this is not same please provide sample apk to test this issue further. Thanks!
,
Oct 1
This is possibly related but I don't think it's a dupe and we may need a separate repro/test for it.
,
Oct 2
cjp822@ I setup the environment and can't reproduce this, the callback sequence is always PageStarted, ReceivedHttpAuthRequest, PageFinished, not matter IP or hostname is used. Is your service public for us to test?
,
Oct 2
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by chelamcherla@chromium.org
, Oct 1Labels: Needs-triage-Mobile