Android Webview: Cannot call determinedVisibility () - nunca vio una conexión para el pid


Tengo un Android Webview y cuando hago clic en un enlace para descargar un archivo (imagen de pdf, etc.) recibí un mensaje de error.

Error message:
Cannot call determinedVisibility() - never saw a connection for the pid

¿Alguna idea de lo que hago mal? Quién puede ayudar por favor!?

Author: Laurens V, 2015-10-12

11 answers

Solo un poco de configuración:

    webview.getSettings().setJavaScriptEnabled(true);
    webview.getSettings().setDomStorageEnabled(true);
 15
Author: Burhan ARAS,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-10-26 14:46:58

Recibí el mismo error y la solución de Burhans no me estaba ayudando. Creo que las cosas salieron mal cuando estás tratando de cargar diferentes URL demasiado rápido.

Editar: Encontró una mejor solución los créditos van a user2652394 WebView debe cargarse dos veces para cargarse correctamente

Tienes Que hacer algo como esto:

        webView.postDelayed(new Runnable() {

            @Override
            public void run() {
                webView.loadUrl(landingpage);
            }
        }, 500);
 5
Author: Dennis Allert,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 11:47:05

Este problema en mi caso se produce por ajustes incorrectos en propiedades de diseño. Yo había utilizado:

    <WebView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/webView"
    android:layout_below="@+id/textView"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="false"
    android:layout_alignWithParentIfMissing="false" />

En lugar de establecer:

    <WebView
    android:id="@+id/webView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/textView" />

Los problemas se habían resuelto, cuando eliminé la configuración "layout_alignParent".

 3
Author: Hessam J.E,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-03-24 16:30:57

Me enfrenté al mismo problema.

Se resolvió dando a una vista web una altura estática (es decir, 300dp) o especificando el valor minHeight.

 2
Author: AlexVPerl,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-07-23 22:51:23

Así es como solucioné un problema similar:

    mWebView.setWebChromeClient(new WebChromeClient());
    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.getSettings().setDomStorageEnabled(true);

    mWebView.setWebViewClient(new WebViewClient() {
        public boolean shouldOverrideUrlLoading(WebView view,String url) {
            return false;
        }
    });

    mWebView.loadURL(...
 2
Author: manuel,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-08-12 12:08:11

Antecedentes

Aquí está el código fuente del método en el motor del navegador que da el error (BindingManagerImpl.java ), de Fuente de cromo:

@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;
    }

Análisis

Es un advertencia de renderizado del contenido.

Llamadas consecutivas a loadUrl causan una condición de carrera . El problema es que loadUrl("file://..") no se completa inmediatamente, por lo que cuando se llama loadUrl("javascript:..") a veces ejecutará antes la página se ha cargado.

Detalle

Para más detalles vea esta respuesta de stackoverflow.

 2
Author: Jon Goodwin,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-05 20:28:02

Tarde a la fiesta, pero podría ayudar a algunos. Puede sonar tonto como el infierno, pero el error que cometí no fue agregar http:// al principio de la URL.

 1
Author: kashyap jimuliya,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-31 09:41:33

Compruebe si el permiso de Internet está configurado correctamente en el archivo de manifiesto. Asegúrese de que la etiqueta de permiso debe estar fuera de de su etiqueta de aplicación.

<uses-permission android:name="android.permission.INTERNET" />

Espero que esto pueda ayudar a alguien.

 0
Author: Manu Antony,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-02 05:07:18

Encontré una solución alternativa usando el método onPageFinished en lugar de shouldOverrideUrlLoading. También proporciona la URL necesaria en la lista de argumentos.

El único truco es establecer una comprobación para que la lógica principal del método (en mi caso hacer un Brindis) no se active cuando se llame a onPageFinished en la carga de la página en sí.

 0
Author: Bord81,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-08-14 08:41:09
mWebView.setDownloadListener(new DownloadListener() {
  @Override
  public void onDownloadStart(String url, String userAgent, String contentDisposition, 
    String mimetype, long contentLength) {
    Log.d("download",url);
  }
});
 0
Author: qingsong xu,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-15 04:22:37

Me enfrenté al mismo problema. Puedo solucionar mi problema dando este código:

webView.postDelayed(new Runnable() {
        @Override
        public void run() {
            webView.loadUrl(url);
        }
    }, 500);

En lugar de:

webview.loadUrl(url);

Luego, establece que url comienza con https://

 0
Author: Ameer Sabith,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-10-24 18:50:07