0

I'm using Xamarin.Forms 2.3.3.193 and Prism.Forms 6.3.0 My app is crashing in Windows 8.1 when navigating with Absolute URI

Pls see below my App Navigation Flow.

1 - App.xaml.cs

if (!IsUserLoggedIn)
{
    NavigationService.NavigateAsync("NavigationPage/LoginPage");
}
else
{
    NavigationService.NavigateAsync("NavigationPage/HomePage");
}

2 - LoginPageViewModel

if (response.AuthStatus)
{
    NavigationParameters navParams = new NavigationParameters();

    await _navigationService.NavigateAsync("OTPPage", navParams);
}

3 - OTPPageViewModel

if (ValidOTP)
{
    App.IsUserLoggedIn = true;
    await _navigationService.NavigateAsync("app:///NavigationPage/HomePage");
}

My App is Crashing in the OTPPageViewModel when I try to navigate to HomePage after OTP Validation.

Please note that the same Code is working in Android and UWP without any issues, but crashing only in Windows 8.1

If I use

await _navigationService.NavigateAsync("HomePage");

the app is working fine, but I am able to navigate back to OTPpage which I have to restrict.

And If I skip OTPPage and call HomePage directly from Login Page like below, it is working properly.

4 - LoginPageViewModel

if (response.AuthStatus)
{
    await _navigationService.NavigateAsync("app:///NavigationPage/HomePage");
}
Dennis Schröer
  • 2,392
  • 16
  • 46
Uday
  • 1
  • 2
  • How exactly does it crash? Are you getting an exception? If yes, what does it say? – Dennis Schröer Jun 22 '17 at 09:53
  • I am not able to debug the app..and its not going to Catch block. its crashing and there is no proper reason available in the event viewer and other logs. – Uday Jun 22 '17 at 10:09
  • That's strange. Which IDE are you using? Maybe you didn't configurate the exception settings properly? – Dennis Schröer Jun 22 '17 at 10:23
  • Im using VS 2015 Prof in my laptop with windows 10, and the win 8.1 device is HP Elitepad 900 both are in my ORG domain. I am not able to deploy the app to Simulator as the applocker is blocking the package deployment to my local machine. Also I am not able to connect the Hp Elitepad device to my laptop. This is the problem im facing and so i always create a package and install that in Device to test the app. After lot of verification I have concluded that the crash is due to the navigation with absolute URI (app:///...) – Uday Jun 22 '17 at 10:47

0 Answers0