cordova-issues mailing list archives

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

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

Mathieu N commented on CB-12184:
--------------------------------

[~jcesarmobile], Thanks, I'll try with _blank instead. 

Note that this isn't documented either. At least not here: https://github.com/apache/cordova-plugin-inappbrowser#inappbrowserexecutescript

> 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