PrismLibrary/Prism · error · NavigationException
Cannot process an absolute Navigation Uri when navigating…
Error message
Cannot process an absolute Navigation Uri when navigating within a specified Tab
What it means
Prism's PageNavigationService throws this when you ask SelectTabAsync to navigate using an absolute URI (e.g. ':///MyPage' or 'https://app/MyPage') while targeting a tab of an existing TabbedPage. Tab-level navigation only supports relative segments because it operates on an already-resolved child page inside the tab, not the root navigation stack.
Solutions
- Use a relative URI or page name for tab navigation, e.g. 'ViewA?id=5' instead of 'app://.../ViewA?id=5'
- Strip the scheme/host from your deep link before passing it to tab navigation: new Uri(link).PathAndQuery trimmed of leading '/'
- Handle absolute deep links at the app root (NavigateAsync) and reserve tab selection for relative segments
Example fix
// before
await _navigationService.SelectTabAsync(new Uri("app:///ViewB"), tabbedPage, "ViewB");
// after
await _navigationService.SelectTabAsync("ViewB", tabbedPage, "ViewB"); Defensive patterns
Strategy: validation
Validate before calling
if (uri is not null && uri.IsAbsoluteUri)
throw new ArgumentException("Use a relative URI for tab navigation"); Type guard
static bool IsRelativeNavUri(Uri? uri) => uri is null || !uri.IsAbsoluteUri;
Prevention
- Reserve absolute URIs for root deep links, relative segments for tab/stack navigation
- Centralize URI construction in one helper that enforces relative form for tabs
- Add unit tests for tab navigation URI shapes
When it happens
Trigger: Calling navigationService.SelectTabAsync(uri, tabbedPage, selectedTab, parameters) (directly or via a tab-select URI segment) with a uri whose IsAbsoluteUri is true.
Common situations: Passing a full deep-link URI into a tab-selection flow; concatenating an app scheme root onto a tab path; reusing a deep-link handler that always builds absolute URIs when the user taps a tab.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- The page type ' ' is not supported.
- Unable to determine the current page.
- NavigationException.NoPageIsRegistered
- The builder does not implement IRegistryAware
- NavigationException.NoPageIsRegistered
AI-assisted analysis of PrismLibrary/Prism@358118cd64 (2026-09-15).
Data as JSON: /api/errors/22dfa3c4eb8b6075.
Report an issue: GitHub.
Appendix: source
Thrown at src/Maui/Prism.Maui/Navigation/PageNavigationService.cs:411
&& (ViewModelLocator.GetNavigationName(navPage) == parts[0] || (rootRegistration is not null && IsPage(navPage, rootRegistration, parts[0])))
&& (ViewModelLocator.GetNavigationName(navPage.RootPage) == parts[1] || (leafRegistration is not null && IsPage(navPage.RootPage, leafRegistration, parts[1]))));
}
else
throw new NavigationException($"Invalid Tab Name: {tabName}");
if (selectedChild is null)
throw new NavigationException($"No Tab found with the Name: {tabName}");
var navigatedFromPage = _pageAccessor.Page;
if (!await MvvmHelpers.CanNavigateAsync(navigatedFromPage, parameters))
throw new NavigationException(NavigationException.IConfirmNavigationReturnedFalse, navigatedFromPage);
var navigatedToTarget = selectedChild is NavigationPage navPage ? navPage.CurrentPage : selectedChild;
if (uri is not null)
{
if (uri.IsAbsoluteUri)
{
throw new NavigationException("Cannot process an absolute Navigation Uri when navigating within a specified Tab");
}
var navigationSegments = UriParsingHelper.GetUriSegments(uri);
await ProcessNavigation(navigatedToTarget, navigationSegments, parameters, null, null);
tabbedPage.CurrentPage = selectedChild;
}
else
{
tabbedPage.CurrentPage = selectedChild;
parameters.GetNavigationParametersInternal().Add(KnownInternalParameters.NavigationMode, NavigationMode.New);
MvvmHelpers.OnNavigatedFrom(navigatedFromPage, parameters);
MvvmHelpers.OnNavigatedTo(navigatedToTarget, parameters);
}
return new NavigationResult();
}
catch (Exception ex)
{View on GitHub (pinned to 358118cd64)