FirebasePushNotificationPlugin
FirebasePushNotificationPlugin copied to clipboard
Xiaomi MIUI app launch crash in FirebasePushNotificationManager.add_OnNotificationOpened
🐛 Bug Report
The crash occurs on the second launch onwards and this is the error which is reported. To clarify the app crashes only when opened from the launcher and not when opened through play store.
android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
at CoachingProject.AndroidApp+<>c_DisplayClass6_0.<OnStart>b_0 (System.Object s, Plugin.FirebasePushNotification.FirebasePushNotificationResponseEventArgs p) [0x00032] in <2a97dca7b7ca4d2e848cca1c506c7dae>:0
at Plugin.FirebasePushNotification.FirebasePushNotificationManager.add_OnNotificationOpened (Plugin.FirebasePushNotification.FirebasePushNotificationResponseEventHandler value) [0x0005f] in <684a8bd3bc494fd494047cfaa01cc3aa>:0
at CoachingProject.AndroidApp.OnStart () [0x00031] in <2a97dca7b7ca4d2e848cca1c506c7dae>:0
at Xamarin.Forms.Application.SendStart () [0x00000] in <978ec34c5c9c4c4eb3d73b6da958bcd6>:0
at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnStateChanged () [0x0001b] in <04c545f414d24a37af95d995791bb9a9>:0
at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnStart () [0x00046] in <04c545f414d24a37af95d995791bb9a9>:0
at Android.App.Activity.n_OnStart (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in
Expected behavior
The app should open successfully.
Reproduction steps
This only happens on Xiaomi phones MIUI version 12.0.8
Configuration
Version: 1.x
nuget version 3.3.10 xamarin forms: 5.0.0.2012
Platform:
- [ ] :iphone: iOS
- [x ] :robot: Android
- [ ] :checkered_flag: WPF
- [ ] :earth_americas: UWP
- [ ] :apple: MacOS
- [ ] :tv: tvOS
- [ ] :monkey: Xamarin.Forms
I can reproduce the same issue