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.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
🐛 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.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: