Android Webview: Cannot call determinedVisibility() - never saw a connection for the pid

前端 未结 11 1015
南笙
南笙 2020-12-01 14:11

I have a Android Webview and when I click on a link to download a file (image of pdf etc) I got a error message.

Error message:
Cannot call determinedVisibil         


        
11条回答
  •  执念已碎
    2020-12-01 14:46

    Background

    Here is the source code of the method in the browser engine that gives the error (BindingManagerImpl.java), from Chromium source:

    @Override
    public void determinedVisibility(int pid) {
        ManagedConnection managedConnection;
        synchronized (mManagedConnections) {
            managedConnection = mManagedConnections.get(pid);
        }
        if (managedConnection == null) {
            Log.w(TAG, "Cannot call determinedVisibility() - never saw a connection for the pid: "
                    + "%d", pid);
            return;
        }
    

    Analysis

    It's a rendering warning from content.

    Consecutive calls to loadUrl cause a race condition. The problem is that loadUrl("file://..") doesn't complete immediately, and so when you call loadUrl("javascript:..") it will sometimes execute before the page has loaded.

    Detail

    For more detail see this stackoverflow answer.

提交回复
热议问题