FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

Xiaomi MIUI app launch crash in FirebasePushNotificationManager.add_OnNotificationOpened

Open ssnavalakha opened this issue 3 years ago • 1 comments

🐛 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 :0 at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.35(intptr,intptr) at crc643f46942d9dd1fff9.FormsAppCompatActivity.n_onStart(Native Method) at crc643f46942d9dd1fff9.FormsAppCompatActivity.onStart(FormsAppCompatActivity.java:128) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1433) at android.app.Activity.performStart(Activity.java:7923) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3332) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7560) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

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

ssnavalakha avatar May 20 '21 21:05 ssnavalakha

I can reproduce the same issue

bbenetskyy avatar May 24 '22 09:05 bbenetskyy