dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.12k stars 1.73k forks source link

[Android] DnsSafeHost - System Invalid Exception for Shell Navigation Current State on Android. It doesn't render UI for the next page. #23414

Open Khadeeja-Madathil opened 3 months ago

Khadeeja-Madathil commented 3 months ago

Description

Shell Navigation doesn't render the next page on Android. Shell Current State shows DnsSafeHost - System Invalid Exception.

The code breakpoint directs to the next page. However, the UI doesn't render the next page. On checking the Current State of Shell - it returns the result as shown in image - DnsSafeHost - System Invalid Exception.

Screenshot 2024-07-02 at 16 34 12

Steps to Reproduce

The steps -

MainPage = new AppShell();

Routing.RegisterRoute("secondpage", typeof(SecondPage));

private async void Button_OnClicked(object sender, EventArgs e) { await Shell.Current.GoToAsync("secondpage"); }

Behavior -

The breakpoint redirects to the second page. But UI is never rendered.

When checked the current state of the Shell, I get the following result -

Screenshot 2024-07-02 at 16.38.12

Dns safe host - System Invalid Exception.

When checked the state when just after setting Shell, gives the same result. No crashes or errors. Just the navigation is blocked.

The app never navigates to next page on UI.

https://github.com/dotnet/maui/assets/99326677/4d2aa3e5-8c37-4275-b161-112ff05e3e18

Link to public reproduction project repository

https://github.com/Khadeeja-Madathil/ShellTest

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 14

Did you find any workaround?

None. Tried removing everything - nuget, unwanted files, and cleaning up the project file. But issue still exists.

Relevant log output

No response

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

RoiChen001 commented 3 months ago

I can repro this issue at Android platform on the latest 17.11.0 Preview 2.1 (8.0.61).