Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Expected Navigation Failed. No Root Window has been created. #3057

Closed
roubachof opened this issue Jan 26, 2024 · 1 comment
Closed

Comments

@roubachof
Copy link

roubachof commented Jan 26, 2024

Description

I have a big maui application for a big android device (not a mobile).
There are tons of initialization and async calls in OnInitialized and then:

navigationService.NavigateAsync(
    $"/{nameof(MainMasterDetailView)}/{nameof(CommonNavigationPage)}/{nameof(MainView)}?{MainView.ShowDashboardNavigationParameter}=False");

is called in OnAppStart.
For obvious reasons I can't make a repo sample of this, but I was wondering if you had some pointers to see what is not working.
For what I understand, it seems that Activity.OnCreate is called before the navigation is made, and since the prism root window is created when we first navigate, the exception occurs...

Steps to Reproduce

Unfortunately no repo sample.

Platform with bug

.NET MAUI

Affected platforms

Android, I was not able test on other platforms

Did you find any workaround?

No response

Relevant log output

10:25:49:202	[0:] Navigation: http://localhost/MainMasterDetailView/CommonNavigationPage/MainView?ShowDashboard=False
10:25:49:202	[0:] Result: Failed
10:25:49:202	[0:] NavigationRequestContext { Cancelled = False, Type = Navigate, Uri = http://localhost/MainMasterDetailView/CommonNavigationPage/MainView?ShowDashboard=False, Parameters = , Result = Prism.Navigation.NavigationResult }
10:25:49:514	**Microsoft.Maui.Controls.InvalidNavigationException:** 'Expected Navigation Failed. No Root Window has been created.'
@roubachof
Copy link
Author

HOLD ON: I am maybe an idiot: navigation failed x) so window has NOT been built.
Will re-open if I'm not an idiot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant