wix / react-native-notifications

React Native Notifications
MIT License
3.23k stars 763 forks source link

CRITICAL? bug. App crashing #924

Closed KingOfTNT closed 1 year ago

KingOfTNT commented 1 year ago

Hi, When I open my app for the first time it crashes and after I open it again it crashes again after a while. So I looked in the logs (logcat) and saw ...crashed service com.on_air_project/com.wix.reactnativenotifications, So I dug deeper and ran the command adb logcat --buffer=crash and it returns

12-06 18:52:48.947 11343 11367 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.on_air_project. Make sure to call FirebaseApp.initializeApp(Context) first.
12-06 18:52:48.947 11343 11367 E AndroidRuntime:        at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:183)
12-06 18:52:48.947 11343 11367 E AndroidRuntime:        at com.google.firebase.messaging.FirebaseMessaging.getInstance(com.google.firebase:firebase-messaging@@21.1.0:1)
12-06 18:52:48.947 11343 11367 E AndroidRuntime:        at com.wix.reactnativenotifications.fcm.FcmToken.refreshToken(FcmToken.java:75)
12-06 18:52:48.947 11343 11367 E AndroidRuntime:        at com.wix.reactnativenotifications.fcm.FcmToken.onAppReady(FcmToken.java:65)
12-06 18:52:48.947 11343 11367 E AndroidRuntime:        at com.wix.reactnativenotifications.fcm.FcmInstanceIdRefreshHandlerService.onHandleWork(FcmInstanceIdRefreshHandlerService.java:26)

What could be the reason? do you need more information? Please Help!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 1 year ago

The issue has been closed for inactivity.

arashkevich25 commented 1 year ago

have the same issue, any solution?

zhe1ka commented 4 months ago

same