InAppBrowser broken in Android RC.3


Since I updated to RC.3 the InAppBrowser is crashing my app whenever I open it in an Android device. The code I’m using is very simple:

import {InAppBrowser} from ‘ionic-native’;

let browser = new InAppBrowser(url, ‘_blank’);;

I tried using _system too and the app crashes as soon as I call openInAppBrowser. Everything works Ok in iOS, the app opens the InAppBrowser and loads the url.

Is someone else experiencing the same issue?

1 Like

Android RC.3 / cordova-plugin-inappbrowser 1.5.0

I do:

public open() {
    new InAppBrowser(myUrl, '_blank', 'location=no');

works for me.

I tried your method and it crashes the app in 2 devices. I have RC.3 and cordova-plugin-inappbrowser 1.5.0 too…

In your package.json in the cordova plugins do you have the cordova-plugin-inappbrowser listed? Because after installing the plugin with ionic plugin add cordova-plugin-inappbrowser the plugin installs but it is not added to the cordova plugins list in my package.json file.

Even though it is not in the package.json file I checked and the plugin is present in the android.json file. I do not know what is going on. I’ll keep trying other things…

I tried on an old iPhone and nexus 5x, both worked fine…strange. on which did it crash for you?

I tried it in a Samsung Galaxy S6 Edge and in a Moto G (3rd gen). I sent the error details to the developer console in android and the error shown is as follows in both devices:

android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.Resources.getValue(
at android.content.res.Resources.getDrawable(
at android.content.res.Resources.getDrawable(
at android.content.res.Resources.getDrawable(
at org.apache.cordova.inappbrowser.InAppBrowser$
at org.apache.cordova.inappbrowser.InAppBrowser.showWebPage(
at org.apache.cordova.inappbrowser.InAppBrowser$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)

Freak … didn’t tried on these devices, I’m a little bit concern now :frowning:

I applied ionic plugin remove cordova-plugin-inappbrowser and then ionic install… and now it is working. It is very weird because after starting the new project from scratch I installed the plugin with the same command.

1 Like