InAppBrowser problem in Android


I’ve installed the inappbrowser plugin to open a new window with external content, everything goes fine when using iOS or WebBrowser for testing, but in android the new window never shows.

Using logcat I’ve found this error message from plugin:

E/PluginManager(10308): Uncaught exception from plugin
E/PluginManager(10308): java.util.NoSuchElementException
E/PluginManager(10308): at java.util.StringTokenizer.nextToken(
E/PluginManager(10308): at org.apache.cordova.inappbrowser.InAppBrowser.parseFeature(
E/PluginManager(10308): at org.apache.cordova.inappbrowser.InAppBrowser.execute(
E/PluginManager(10308): at org.apache.cordova.CordovaPlugin.execute(
E/PluginManager(10308): at org.apache.cordova.CordovaPlugin.execute(
E/PluginManager(10308): at org.apache.cordova.PluginManager.exec(
E/PluginManager(10308): at org.apache.cordova.CordovaBridge.jsExec(
E/PluginManager(10308): at org.apache.cordova.engine.SystemExposedJsApi.exec(
E/PluginManager(10308): at Method)
E/PluginManager(10308): at
E/PluginManager(10308): at android.os.Handler.dispatchMessage(
E/PluginManager(10308): at android.os.Looper.loop(
E/PluginManager(10308): at

But I don’t know how to fix it.

This is the piece of code that opens the new window:

var externalPaymentWindow = $"","payPal",'_blank', 'location=yes,enableViewportScale=yes');
    // listen to page load events
    externalPaymentWindow.addEventListener('loadstart', function(event) {
        var url = event.url;
        if (url.indexOf("") !== -1) {
            // failed
        } else if (url.indexOf("") !== -1) {

I’ve downloaded and installed cordoba whitelist plugin, configured it to allow everything from all sites.

Thanks in advanced.

Best regards

I have no idea about the root cause but looking at your code I see that you use it for PayPal, so as a workaround why not using PayPal-Cordova-Plugin?
I use it and it’s great cause it’s native, for instance it can take a picture of your card and OCR the numbers.

Hi, I’ve tried it but I was completely unable to make it working. Samples are not clear for me when trying to adapt the code to use with my ionic app.

If you were so kind to provide me a full sample I really appreciate it.


I did follow what was described in this topic.

I can provide a full example by the end of next week.

Thank you so much for your help, I’ll keep you posted.

Best regards

Finally I’ve got it working using the paypal-plugin!!!


1 Like