OneSignal / OneSignal-Xamarin-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Other
104 stars 50 forks source link

[Bug]: Issue with FirebaseApp not initialized on Android #336

Closed devperson closed 1 year ago

devperson commented 1 year ago

What happened?

My app is getting crashed when receiving a notification with java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process xxx. Make sure to call FirebaseApp.initializeApp(Context) first. Here is the stacktrace:

com.google.firebase.FirebaseApp.getInstance FirebaseApp.java:183
com.google.firebase.messaging.MessagingAnalytics.logToScion com.google.firebase:firebase-messaging@@22.0.0:28
com.google.firebase.messaging.MessagingAnalytics.logNotificationReceived com.google.firebase:firebase-messaging@@22.0.0:2
com.google.firebase.messaging.FirebaseMessagingService.passMessageIntentToSdk com.google.firebase:firebase-messaging@@22.0.0:7
com.google.firebase.messaging.FirebaseMessagingService.handleMessageIntent com.google.firebase:firebase-messaging@@22.0.0:3
com.google.firebase.messaging.FirebaseMessagingService.handleIntent com.google.firebase:firebase-messaging@@22.0.0:3

The Xamarin Forms version is 5.0.0.2515

Steps to reproduce?

Launch the app and try to get a push notification

What did you expect to happen?

should not crash

OneSignal Xamarin SDK version

4.1.3

Which platform(s) are affected?

Relevant log output

No response

Code of Conduct

devperson commented 1 year ago

This seems related to the push content which forced to crash the onesignal component, once the server guy changed the content it starts working now