cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jcesarmobile (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-12184) executeScript leads to a null pointer on exception on Android.
Date Thu, 24 Nov 2016 16:25:58 GMT

    [ https://issues.apache.org/jira/browse/CB-12184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15693675#comment-15693675
] 

jcesarmobile commented on CB-12184:
-----------------------------------

It's documented, but maybe it's not clear enough

{quote}
Injects JavaScript code into the InAppBrowser window
{quote}

And on the open method doc

{quote}
ref: Reference to the InAppBrowser window when the target is set to '_blank'. (InAppBrowser)
{quote}

The InAppBrowser is the browser that opens when you use _blank param, a browser inside your
app, will try to make it more clear on the docs

> executeScript leads to a null pointer on exception on Android.
> --------------------------------------------------------------
>
>                 Key: CB-12184
>                 URL: https://issues.apache.org/jira/browse/CB-12184
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>         Environment: Android 6.0 / OnePlus One / Ionic2 (rc2)
>            Reporter: Mathieu N
>
> Hi,
> I am using the following typescript code:
> {code:javascript}
> let browser = new InAppBrowser('https://some_url', '_system');
> let script:string = "someJs";
> 			
> browser.executeScript({code: script});
> {code}
> Upon execution, it yields the following stacktrace:
> {panel}
> java.lang.NullPointerException: Attempt to invoke virtual method 'void android.webkit.WebView.evaluateJavascript(java.lang.String,
android.webkit.ValueCallback)' on a null object reference
> 	at org.apache.cordova.inappbrowser.InAppBrowser$3.run(InAppBrowser.java:333)
> 	at android.os.Handler.handleCallback(Handler.java:739)
> 	at android.os.Handler.dispatchMessage(Handler.java:95)
> 	at android.os.Looper.loop(Looper.java:148)
> 	at android.app.ActivityThread.main(ActivityThread.java:5461)
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
> 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
> {panel}
> M.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message