React-native-firebase: Exception in HostObject

Created on 12 Mar 2019  路  3Comments  路  Source: invertase/react-native-firebase

i following firebase implementation documentation but application at tun time show this issue. let me know how to fix it . this is my work. https://github.com/ArunaMahaGamage/React_Native_Firebase_Authentication

Screenshot_20190312-073100

Most helpful comment

I encountered this same issue and it was because I glazed over a few steps in the setup process. In particular:

In MainApplication.java:

import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;

and then add the following to the getPackages() list:

new RNFirebaseMessagingPackage(),
new RNFirebaseNotificationsPackage()

Finally, in your app build.gradle, add the following to your dependencies:

implementation "com.google.firebase:firebase-messaging:17.3.4"
implementation 'me.leolin:ShortcutBadger:1.1.21@aar'

That fixed it for me.

All 3 comments

Encountering same issue here after upgrading to 0.59

I encountered this same issue and it was because I glazed over a few steps in the setup process. In particular:

In MainApplication.java:

import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;

and then add the following to the getPackages() list:

new RNFirebaseMessagingPackage(),
new RNFirebaseNotificationsPackage()

Finally, in your app build.gradle, add the following to your dependencies:

implementation "com.google.firebase:firebase-messaging:17.3.4"
implementation 'me.leolin:ShortcutBadger:1.1.21@aar'

That fixed it for me.

@ArunaMahaGamage looks like you're using an old version of the Firebase Auth Android SDK here (11.8.0)

This should be 16.1.0 as the docs indicate.


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

Was this page helpful?
0 / 5 - 0 ratings