MvvmCross.Forms cannot replace app's MainPage #2577
Labels
p/forms
Xamarin.Forms platform
s/needs-investigation
Needs investigation by the MvvmCross team
t/bug
Bug type
Milestone
Steps to reproduce 📜
Create an app with root page that is content or navigation page. Add additional page to project with type of MvxTabbedPage and attribute [MvxTabbedPagePresentation(Position = TabbedPosition.Root, WrapInNavigationPage = false)]
When root view is loaded try navigate to tabbed page using IMvxNavigatingService.Navigate and await the call, app will crash with exception "Cannot replace MainPage".
The reason of the crash is that MvxFormsApplicationDelegate method FinishedLaunching is not calling base.FinishedLaunching, so FormsApplicationDelegate private field "_window" is not initialised, and app crashes at method UpdateMainPage of FormsApplicationDelegate.
Expected behavior 🤔
MainPage gets replaced
Actual behavior 🐛
App crash
Configuration 🔧
Version: 5.6.x
Platform:
The text was updated successfully, but these errors were encountered: