Default FirebaseApp is not initialized in this process
See original GitHub issueI sending push notification node-gcm to my token. Yey i have token. .configure({ })
is working. But the application crashes directly when I use the plugin and throw notification. This time I’m sending it again after the crash comes notification. When I try for the 3rd time, the app doesn’t come crashed.
Everyone said check xml file. I couldn’t find my fault. I think the readme.md file should be given piece by piece information about the xml file
For example;
For Local Notification ...
For GCM ...
For FCM ...
RN Version: 0.60.4 OS: Android OS Version: 9 Plugin Version: lastest
AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.localreminder.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
...
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name"
android:value="YOUR NOTIFICATION CHANNEL NAME"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="YOUR NOTIFICATION CHANNEL DESCRIPTION"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color"
android:resource="@android:color/white"/>
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.localreminder" />
</intent-filter>
</receiver>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/>
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerServiceGcm"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
Error
java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.localreminder. Make sure to call FirebaseApp.initializeApp(Context) first.
at com.google.firebase.FirebaseApp.getInstance(com.google.firebase:firebase-common@@17.1.0:186)
at com.google.firebase.messaging.MessagingAnalytics.zza(com.google.firebase:firebase-messaging@@19.0.1:75)
at com.google.firebase.messaging.MessagingAnalytics.logNotificationReceived(com.google.firebase:firebase-messaging@@19.0.1:2)
at com.google.firebase.messaging.FirebaseMessagingService.zzc(com.google.firebase:firebase-messaging@@19.0.1:50)
at com.google.firebase.messaging.zzg.run(com.google.firebase:firebase-messaging@@19.0.1:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source:6)
at java.lang.Thread.run(Thread.java:764)
Issue Analytics
- State:
- Created 4 years ago
- Comments:13
Top Results From Across the Web
Default FirebaseApp is not initialized - android - Stack Overflow
We're seeing a few exceptions with the message Default FirebaseApp is not initialized in this process com.example.app. Make sure to call FirebaseApp.
Read more >How can I fix 'Default FirebaseApp is not initialized in ... - MSDN
1.Package name in AndroidManifest.xml is identical to one in the google-services.json ; 2. google-services.json build action is set to ...
Read more >Default FirebaseApp is not initialized in this process. Make ...
The Firebase SDK should be initialised automatically on Android. I'd suggest checking your application's startup logs to make sure there aren't ...
Read more >FirebaseApp is not initialized in this process. Make sure to call ...
Firebase – Default FirebaseApp is not initialized in this process. Make sure to call FirebaseApp.initializeApp(Context) first. firebasexamarinxamarin.forms.
Read more >FirebaseApp is not initialized in this process com.example ...
[Solved]-Default FirebaseApp is not initialized in this process com.example.example. Make sure to call FirebaseApp.initializeApp(Context) first-kotlin.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I stumbled upon the same problem in android, and I was only using local notifications.
Seems that firebase is called when configuring the library with
requestPermissions: true
.This fixed the problem for me:
Hi @arqex Thanks for sharing this! It’s a good way to avoid crash for Android when you are not using Firebase 👍