Help when move to root page again #3028
-
Hello i have a app, and im some cases got this error
The error only happens when I page nav/Login open the page Settings then I go back and go to the page ../MainPage and if on the main page I logout and go back to nav/Login I get the error, If don't open the settings it works correctly I already tried to simulate it in another project but I didn't get error, it work correctly, any tips? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Try to debug prism, When nav works my _container and Resolved, when dont work Resolved is null. I use Modules it will be because of this |
Beta Was this translation helpful? Give feedback.
-
Without a reproduction of the issue it's impossible for anyone to tell you what the problem you're facing is. If you are using Regions and you attempt to Navigate to a Page that has a Region and the Page has not been properly disposed you will see an error similar to this. |
Beta Was this translation helpful? Give feedback.
-
Sorry for late reply, the problem is when i use Modules, and navigate from there. I converted another project to .NET 8 and I'm having this problem again. I'm trying to make an example project |
Beta Was this translation helpful? Give feedback.
-
I discovered the problem I have several classes registered with Singleton INavigationService If the Singleton initialization is in the module this happens. |
Beta Was this translation helpful? Give feedback.
The INavigationService has never in any version supported being referenced from a singleton. Navigation in Xamarin.Forms/MAUI is based on the page you are Navigating from. Without a reference page for the Navigation Service any Navigation would be absolute.