Firebase not intialise android react native

I am building an app for android from react native. 

I am able to setup everything but once I run the project in android I get this error. Please help me to resolve this I am unable to find anything related to this.

2020-07-24 11:11:43.951 3200-3229/com.basicstructure E/BasicStructure - UALib: Unable to register with FCM.

java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.basicstructure. Make sure to call FirebaseApp.initializeApp(Context) first.
at com.urbanairship.push.fcm.FcmPushProvider.isAvailable(
at com.urbanairship.push.PushManager.performPushRegistration(
at com.urbanairship.push.PushManager.extendChannelRegistrationPayload(
at com.urbanairship.push.PushManager.access$000(
at com.urbanairship.push.PushManager$1.extend(
at com.urbanairship.job.Job$
at com.urbanairship.util.SerialExecutor$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
at com.urbanairship.util.AirshipThreadFactory$
2020-07-24 11:11:43.951 3200-3229/com.basicstructure W/BasicStructure - UALib: PushManager - Push registration failed. Push provider unavailable: FCM Push Provider 13.3.0

Didn't find what you were looking for?

New post


1 comment

  • Hello Krupali!

    This is Mikey with Airship Technical Support. Thank you for providing these log files. It looks like your Firebase integration is not properly configured to register for push notifications with Airship. I recommend reviewing our documentation on the React Native Android setup to ensure that no steps were missed in the process. Specifically, the implementation of the google-services.json from the application’s Firebase console into the root directory at android/app/google-services.json. 

    If you are using a third-party push provider in tandem with Airship, you'll need to follow the steps outlined here to forward onNewToken and onMessageReceived received calls to the Airship SDK. 


    If all else fails, we strongly encourage using our Sample App for React Native to build a working implementation that can help you better understand where the break down is happening. 

    I hope this helps!

    Mikey R.

    Airship | Technical Support Engineer | Portland, OR

    Comment actions Permalink

Please sign in to leave a comment.