Closed Kunal22shah closed 2 weeks ago
@nickrandolph, @eriklimakc, @kazo0 please sync with @francoistanguay if further discussions are needed regarding reserved route names to determine the expected fix for this issue please. (Initial discussion here).
The fix may involve for example:
There has been documentation added surrounding this scenario as part of https://github.com/unoplatform/uno.extensions/pull/2317
@eriklimakc / @vatsashah45 We should continue to investigate this and at least avoid the app crashing/going blank when a route like this is used. Perhaps just ignore the navigation and log a warning/error
fyi @agneszitte / @nickrandolph
Current behavior
When navigating to a route that matches a common type name with suffixes (e.g., List, resulting in ListView), the app goes blank and logs a warning: Uno.Extensions.Navigation.Navigators.ContentControlNavigator: Warning: CreateControlFromType - Type not registered ListView, so calling Activator.
Expected behavior
Navigating to a route that is not registered should handle the error and avoid causing the app to go blank/crash.
How to reproduce it (as minimally and precisely as possible)
Environment
Nuget Package (s):
Package Version(s):
Affected platform(s):
Visual Studio:
Relevant plugins:
Anything else we need to know?
Original Issue : https://github.com/unoplatform/uno/issues/17238
The issue seems to stem from the type resolution logic in RouteResolverDefault: https://github.com/unoplatform/uno.extensions/blob/main/src/Uno.Extensions.Navigation.UI/RouteResolverDefault.cs#L149-L173 https://github.com/unoplatform/uno.extensions/blob/848ac33909af8b4f5c14fd42ed3f7424f23350ed/src/Uno.Extensions.Navigation.UI/RouteResolverDefault.cs#L9