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

Shell navigation back is not working after update 2 NuGet packages 'Microsoft.Maui.Controls' and 'Microsoft.Maui.Controls.Compatibility' #24555

Closed
bhuwancb99 opened this issue Aug 31, 2024 · 11 comments
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@bhuwancb99
Copy link

bhuwancb99 commented Aug 31, 2024

Description

<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.72" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.72" />

After updating these two packages to the latest versions, Shell navigation's back functionality stopped working. When clicking the back arrow button, nothing happens, and it gets stuck. It works fine with version 8.0.72, but after updating to the newer version, it's no longer functional.

Steps to Reproduce

add button inside page

<Button Grid.Row="2" x:Name="Btn_MonthlyPointReport" 
    Clicked="Btn_MonthlyPointReport_Clicked"
    Text="{x:Static resources:GlobalResource.MONTHLY_POINT}" 
    Style="{StaticResource ButtonStyle}"/>

when click on this button

 /// <summary>
/// Btn_MonthlyPointReport_Clicked
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
 private async void Btn_MonthlyPointReport_Clicked(object sender, EventArgs e)
{
    try
    {
        ShellNavigationState state = Shell.Current.CurrentState;
        await Shell.Current.GoToAsync($"{state.Location}/{nameof(StudentListPage)}");
    }
    catch (Exception ex)
    {
       
    }
}

Link to public reproduction project repository

No response

Version with bug

9.0.0-preview.7.24407.4

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.82 SR8.2

Affected platforms

Android

Affected platform versions

Android 14

Did you find any workaround?

No response

Relevant log output

No response

@bhuwancb99 bhuwancb99 added the t/bug Something isn't working label Aug 31, 2024
Copy link
Contributor

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.

@bhuwancb99 bhuwancb99 changed the title Shell navigation back is not working after update 2 pages 'Microsoft.Maui.Controls' and 'Microsoft.Maui.Controls.Compatibility' Shell navigation back is not working after update 2 NuGet packages 'Microsoft.Maui.Controls' and 'Microsoft.Maui.Controls.Compatibility' Sep 2, 2024
@samhouts samhouts added platform/android 🤖 potential-regression This issue described a possible regression on a currently supported version., verification pending area-controls-shell Shell Navigation, Routes, Tabs, Flyout labels Sep 4, 2024
@mattleibow
Copy link
Member

I just want to check what versions are working and what are not. In the issue you have a few versions mentioned:

  • 8.0.72
  • 9.0 preview 7
  • 8.0.82

Which version is having the issue?

@mattleibow mattleibow added s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue labels Sep 9, 2024
@mattleibow
Copy link
Member

Are you able to attach a repro where this is no longer working? This appears to be a case of a navigation from /mylocation to /mylocation/students. If you write the full path in the string for a test, does it work?

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue labels Sep 9, 2024
@bhuwancb99
Copy link
Author

i am facing issue after update this 2 packages
image

@jaosnz-rep
Copy link

@bhuwancb99 Could you provide us with a sample project so we can investigate it further? Looking forward to your reply!

@bhuwancb99
Copy link
Author

@jaosnz-rep - I have created a sample app, and it's working there, but it's not working in my mobile application. If you'd like, I can share my test APK along with the credentials.

@bhuwancb99
Copy link
Author

bhuwancb99 commented Sep 12, 2024

Hi @mattleibow / @jaosnz-rep

I have now reproduced the issue, and it occurs when adding different <Shell.TitleView> elements inside a NavigationPage based on the pages (TitleView content change based on your requirement). The back arrow stops working with the mentioned NuGet packages. Please find the attached project for your reference.

DemoApp.zip

Screenshot_1726139688
Screenshot_1726139694
Screenshot_1726139701

@bhuwancb99
Copy link
Author

any update on this ?

@QianaJiao
Copy link

Thanks for your sharing.
I just verified this issue on VS 17.11.3. It can be repro on Android platform with Maui 8.0.82, 8.0.80. And not repro on 8.0.72. It's a regression issue.

@QianaJiao QianaJiao added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version and removed potential-regression This issue described a possible regression on a currently supported version., verification pending labels Sep 14, 2024
@mattleibow
Copy link
Member

Were there any errors or messages in the logcat or output windows when navigating or when clicking back?

But thanks for the info and reports, we will have a look.

@mattleibow mattleibow added this to the .NET 8 SR9 milestone Sep 14, 2024
@bhuwancb99
Copy link
Author

bhuwancb99 commented Sep 15, 2024

Tested on the latest release (8.0.90), and now it's working as expected. Thanks for fixing this issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants