New issue
Advanced search Search tips

Issue 888775 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 884100
Owner: ----
Closed: Sep 25
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



Sign in to add a comment

WebChromeClient truncates prompt messages beyond a certain length.

Reported by brant.dm...@gmail.com, Sep 24

Issue description

Steps to reproduce the problem:
We have an Android app that uses WebChromeClient that receives messages (i.e. prompts, logs, etc) from the WebView.  Occasionally the message payloads from the WebView can be quite large, on the order of tens of KB.  Recently we've noticed that the onJsPrompt() callback seems to be "truncating" the message sent from the WebView.  Suppose we set up a simple WebChromeClient:

    private class MyWebChromeClient extends WebChromeClient {
        public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {

            Log.d("tag", "Received message of length: " + message.length());

            result.confirm();
            return true;
        }
    }

...And then from the WebView call window.prompt() with a very long message (e.g. 20K characters), then it looks like only the first 10240 characters are actually received in the callback.

What is the expected behavior?
The entire message should be passed to the onJsPrompt() callback.

What went wrong?
Only the first 10240 characters are received in onJsPrompt().

Did this work before? Yes This works in the current AOSP emulator(s), as well as in the System Webview prior to around Sep 6 2018.

Does this work in other browsers? Yes

Chrome version: 69.0.3163.98  Channel: stable
OS Version: 8
Flash Version:
 
Labels: Needs-triage-Mobile
Cc: chelamcherla@chromium.org
Labels: Triaged-Mobile
Mergedinto: 884100
Status: Duplicate (was: Unconfirmed)
This seems to be related to  issue 884100 . Hence merging into it.

Please feel free to undupe if this is not the case.

Thanks!

Sign in to add a comment