Main page of my app is checking for user information. Based on some condition, popup shows, that navigates to a page with a webview. I navigate to it using standard approach:
await Shell.Current.Navigation.PushAsync(new BindCardPage(user.uid), false);
But when I start an app for the first time, after trying to navigate to a webview page NRE is thrown:
System.NullReferenceException: Object reference not set to an instance of an object.
at Xamarin.Forms.ShellSection.OnPushAsync (Xamarin.Forms.Page page, System.Boolean animated) [0x00013] in D:\a\1\s\Xamarin.Forms.Core\Shell\ShellSection.cs:514
at Xamarin.Forms.ShellSection+NavigationImpl.OnPushAsync (Xamarin.Forms.Page page, System.Boolean animated) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Shell\ShellSection.cs:714
at Xamarin.Forms.Internals.NavigationProxy.PushAsync (Xamarin.Forms.Page root, System.Boolean animated) [0x00013] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:117
at Xamarin.Forms.Shell+NavigationImpl.OnPushAsync (Xamarin.Forms.Page page, System.Boolean animated) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Shell\Shell.cs:1161
at Xamarin.Forms.Internals.NavigationProxy.PushAsync (Xamarin.Forms.Page root, System.Boolean animated) [0x00013] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:117
But when I start an app again (condition didn't change) same popup navigates to a page with no problems. I tried adding an empty constructor and setting a default value, but it didn't help. Looked at the breakpoints - all of my data, that I pass is not null, WebView component is also not null. This is a wierd bug and I don't know what to do with it
My Xamarin.Forms version is 4.4.0.991537