Maui Android System.NotImplementedException: Either set MainPage or override CreateWindow

189 Views Asked by At

I have quite a few crashes from Firebase which always come from notifications being opened (based on Firebase logs). The last event before the crash is always notification_open.

The stack trace is below:

1520|2023-12-20T17:54:18.7150104+00:00|INFO|1|EventService|app_lifecycle| {state - deactivated}
1523|2023-12-20T17:56:11.8418742+00:00|ERROR|1|CrashService| --> System.NotImplementedException: Either set MainPage or override CreateWindow.
   at Microsoft.Maui.Controls.Application.CreateWindow(IActivationState activationState)
   at MyApp.App.CreateWindow(IActivationState activationState)
1526|2023-12-20T17:56:13.7117073+00:00|ERROR|1|CrashService|RegisterUnhandledExceptionLogging --> System.NotImplementedException: Either set MainPage or override CreateWindow.
   at Microsoft.Maui.Controls.Application.CreateWindow(IActivationState activationState)
   at MyApp.App.CreateWindow(IActivationState activationState)
   at Microsoft.Maui.Controls.Application.Microsoft.Maui.IApplication.CreateWindow(IActivationState activationState)
   at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(Activity activity, IApplication application, Bundle savedInstanceState)
   at Microsoft.Maui.MauiAppCompatActivity.OnCreate(Bundle savedInstanceState)
   at MyApp.MainActivity.OnCreate(Bundle savedInstanceState)
   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_(IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState)
   at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0)

I have included the lifecycle state as well if that helps. Any help is much appreciated, I have a feeling it has to do with the Prism framework. Has anyone else encountered this?

0

There are 0 best solutions below