cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-12560) InAppWebBrowser throws NullPointerException when attempting Callback
Date Wed, 26 Apr 2017 05:49:04 GMT


ASF GitHub Bot commented on CB-12560:

Github user dblood commented on the issue:
    Of course.  I will work on a test script.  The library I was using is
    with type of "id_token token" and monitoring on.  This would attempt to request a "token/userinfo"
endpoint on the server once a second regardless of if the previous request had completed.
 This allowed the completion handler of both requests to be executed concurrently.
    A bit of background for why I didn't do an automated test:  
    1) Although this issue consistently occurred sometime within 300 seconds for me, that
is 300 potential requests (or possibly non) that would fail based on my local environment
and servers.
    2) Though it would prove a null pointer could happen with the old code, a negative test
for an exception is already handled by every other test (if the app didn't crash, there wasn't
a null pointer).  This could be applied to every method everywhere, with every type of runtime
exception, and adds no value.
    3) I didn't want to address the bigger issue, and the risk around the handling of cancelling
an in-progress request or if the response has completed but the callback hasn't completed

> InAppWebBrowser throws NullPointerException when attempting Callback
> --------------------------------------------------------------------
>                 Key: CB-12560
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>    Affects Versions: 6.5.0
>            Reporter: Douglas Blood
>            Priority: Minor
>              Labels: android, pluginsrelease, pull-request-available
> Using oidc-client.js and a redirection url of "http://localhost/".  After login the "monitor"
will attempt a request every second using the InAppBrowser instance that was logged in with.
> Occasionally, this will result in the following null pointer exception.
> java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.sendPluginResult(org.apache.cordova.PluginResult)'
on a null object reference
>     at org.apache.cordova.inappbrowser.InAppBrowser.sendUpdate(
>     at org.apache.cordova.inappbrowser.InAppBrowser.sendUpdate(
>     at org.apache.cordova.inappbrowser.InAppBrowser.access$1100(
>     at org.apache.cordova.inappbrowser.InAppBrowser$InAppBrowserClient.onPageFinished(
>     at
>     at org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(
>     at android.os.Handler.dispatchMessage(
>     at android.os.Looper.loop(
>     at
>     at java.lang.reflect.Method.invoke(Native Method)
>     at$
>     at
> Additional logs, and a patch will be coming soon.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message