java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process ${myApplicationId}. Make sure to call FirebaseApp.initializeApp(Context) first.
See original GitHub issueI get notification from server but my App crashes as soon as I get that message. (After I console.log(“notification”, notification)); I receive this message while debugging and testing my app on mobile phone:
FATAL EXCEPTION: Firebase-FirebaseMessagingService
E/AndroidRuntime( 8691): Process: ${myAppId}, PID: 8691
E/AndroidRuntime( 8691): java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process ${myAppId}. Make sure to call FirebaseApp.initializeApp(Context) first.
E/AndroidRuntime( 8691): at com.google.firebase.FirebaseApp.getInstance(com.google.firebase:firebase-common@@17.0.0:234)
E/AndroidRuntime( 8691): at com.google.firebase.messaging.MessagingAnalytics.zza(Unknown Source)
E/AndroidRuntime( 8691): at com.google.firebase.messaging.MessagingAnalytics.logNotificationReceived(Unknown Source)
E/AndroidRuntime( 8691): at com.google.firebase.messaging.FirebaseMessagingService.zzd(Unknown Source)
E/AndroidRuntime( 8691): at com.google.firebase.iid.zzb.run(Unknown Source)
E/AndroidRuntime( 8691): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/AndroidRuntime( 8691): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/AndroidRuntime( 8691): at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source)
E/AndroidRuntime( 8691): at java.lang.Thread.run(Thread.java:818)
W/ActivityManager( 634): Force finishing activity ${myAppId}/.MainActivity
W/ActivityManager( 634): getRunningAppProcesses: caller 10310 does not hold REAL_GET_TASKS; limiting output
W/DropBoxManagerService( 634): Dropping: data_app_crash (1019 > 0 bytes)
V/RNPushNotification( 8691): sendNotification: Bundle[{google.delivered_priority=high, google.sent_time=1560600723749, google.ttl=2419200, google.original_priority=high, userInteraction=false, id=1089807904, google.message_id=0:1560600723761847%01cd96a801cd96a8, notification=Bundle[{body=Now you can use our application, title=Welcom to app}], collapse_key=${myAppId}, foreground=false}]
D/RNPushNotification( 8691): Cannot send to notification centre because there is no 'message' field in: Bundle[{google.delivered_priority=high, google.sent_time=1560600723749, google.ttl=2419200, google.original_priority=high, userInteraction=false, id=1089807904, google.message_id=0:15606007237sad847%01cd9as01cd96a8, notification=Bundle[{body=Now you can use our application, title=Welcom to asd}], collapse_key=com.techlocksmithbid, foreground=false}]
D/ForegroundUtils( 1364): Foreground changed, PID: 1417 UID: 10017 foreground: true
D/ForegroundUtils( 1364): Foreground UID/PID combinations:
D/ForegroundUtils( 1364): UID: 10017 PID: 1417
D/ForegroundUtils( 1364): UID: 10310 PID: 8691
I/OpenGLRenderer( 634): Initialized EGL, version 1.4
D/WindowManager( 634): adjustConfigurationLw, config:{0 1.0 ?mcc?mnc ?locale ?layoutDir sw360dp w360dp h615dp 480dpi nrml long port ?uimode ?night finger -keyb/v/h -nav/v} mLidState:1 mHasDockFeature:false mHasKeyboardFeature:false mHasHallSensorFeature:true config.hardKeyboardHidden:2
V/ActivityManager( 634): Displayed ActivityRecord{9a28214 u0 com.asus.launcher/.search.activity.SmartSearchActivity t3855} Resume. Not First Launch.
W/ActivityManager( 634): getRunningAppProcesses: caller 10310 does not hold REAL_GET_TASKS; limiting output
this is my project setup:
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-push-notification": "^3.1.3",
buildscript {
ext {
googlePlayServicesVersion = "+"
firebaseVersion = "+"
buildToolsVersion = "28.0.3"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
androidMapsUtilsVersion = "0.5+"
}
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Default FirebaseApp is not initialized - android - Stack Overflow
Lang.IllegalStateException: Default FirebaseApp is not initialized in this process Make sure to call FirebaseApp.initializeApp(Context) first. This is a known ...
Read more >Resolved: Default FirebaseApp is not initialized in this process ...
Default FirebaseApp is not initialized in this process (App ID). Make sure to call Firebase. initializeApp ( context ) first....
Read more >How can I fix 'Default FirebaseApp is not initialized in ... - MSDN
Lang.IllegalStateException: 'Default FirebaseApp is not initialized in this process com.psycho.pushnotification. Make sure to call FirebaseApp.
Read more >FirebaseApp - Google
Use of Firebase in processes other than the main process is not supported and will ... Returns the default (first initialized) instance of...
Read more >error... FirebaseApp is not initialized | B4X Programming Forum
java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process name.app.com. Make sure to call FirebaseApp.
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
This solution helped for me https://github.com/wix/react-native-notifications/issues/285#issuecomment-459178520
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.