Bug 31809 - PopToRootAsync isn't working in my Windows Phone Runtime(8.1) project
Summary: PopToRootAsync isn't working in my Windows Phone Runtime(8.1) project
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
: 41050 ()
Depends on:
Blocks:
 
Reported: 2015-07-10 01:52 UTC by Subha
Modified: 2016-06-29 17:39 UTC (History)
22 users (show)

Tags: ac Windows
Is this bug a regression?: ---
Last known good build:


Attachments
Project shows the issue related with PopToRootAsync (6.42 MB, application/zip)
2015-07-16 02:33 UTC, Subha
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Subha 2015-07-10 01:52:32 UTC
I have used PopToRootAsync call in many places in my Xamarin.Forms PCL project which is shared by all the three platforms Android, iOS & WindowsPhone. But PopToRoot method is not working in my Windows Phone project, its working nice in other platforms. In Windows Phone it executes the PopToRoot method without any exception, but its not navigating to the root page, it just remains in the same page.

But after executing PopToRoot method, apparently it clears the stack but not painting the root page. I noticed this behavior while calling PopToRoot method from deeper navigation, for example, If I want to navigate directly from fourth page to main page, currently in Windows Phone 8.1 after PopToRoot call its remains in the page, but when I press back button it shows Windows Phone home screen instead of previous pages, obviously its clearing the stack.

I have opened this issue in forum also.
https://forums.xamarin.com/discussion/comment/137876#Comment_137876
Comment 1 Abhishek 2015-07-10 12:08:30 UTC
I have tried this issue and unable to reproduce the reported behavior at my end.

Could you please provide me sample test project along with the bug so that I can reproduce this issue at my end. It would be great if you provide me IDE log and Environment Info.

For VS

IDE log via Help->Xamarin->Zip Xamarin Logs.
Environment Info via Help->About Microsoft Visual Studio.

For XS
IDE log via Help->open log directory.
Environment Info via Help->about->show details. 

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.6.00007
 
Installed Version: Professional
 
LightSwitch for Visual Studio 2013   06177-004-0446016-02589
Microsoft LightSwitch for Visual Studio 2013
 
Team Explorer for Visual Studio 2013   06177-004-0446016-02589
Microsoft Team Explorer for Visual Studio 2013
 
Visual Basic 2013   06177-004-0446016-02589
Microsoft Visual Basic 2013
 
Visual C# 2013   06177-004-0446016-02589
Microsoft Visual C# 2013
 
Visual C++ 2013   06177-004-0446016-02589
Microsoft Visual C++ 2013
 
Visual F# 2013   06177-004-0446016-02589
Microsoft Visual F# 2013
 
Visual Studio 2013 Code Analysis Spell Checker   06177-004-0446016-02589
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker
 
Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
 
The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
 
Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio
 
ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure
 
ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
 
ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/
 
Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
 
Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools
 
NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
 
Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU
 
PowerShell Tools   1.3
Provides file classification services using PowerShell
 
PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
 
SQL Server Compact & SQLite Toolbox   4.1.0
SQL Server Compact & SQLite Toolbox adds scripting, import, export, rename, query execution and much more to SQL Server Compact & SQLite Data Connections.
 
SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools
 
Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.
 
Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
 
Xamarin   3.11.666.0 (ebae43a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
 
Xamarin.Android   5.1.4.16 (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)
Visual Studio plugin to enable development for Xamarin.Android.
 
Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.
 
Xamarin.iOS   8.10.2.0 (67b390d0d1bd741582cf7b7fd3ffea08583a3f83)
Visual Studio extension to enable development for Xamarin.iOS.
 
Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
 
Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 2 John Hardman 2015-07-15 14:28:41 UTC
I have the same problem on Windows / WinRT. On Android, iOS and WinPhone 8.0, PopToRootAsync works as expected, on Windows / WinRT, running on a Windows 10 Preview tablet, it fails.
Comment 3 Subha 2015-07-16 02:33:57 UTC
Created attachment 12052 [details]
Project shows the issue related with PopToRootAsync
Comment 4 Subha 2015-07-16 02:52:47 UTC
Additional required information.

Environment Info:

Microsoft Visual Studio Premium 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Premium

LightSwitch for Visual Studio 2013   06191-004-0454001-02380
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06191-004-0454001-02380
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06191-004-0454001-02380
Microsoft Visual Basic 2013

Visual C# 2013   06191-004-0454001-02380
Microsoft Visual C# 2013

Visual C++ 2013   06191-004-0454001-02380
Microsoft Visual C++ 2013

Visual F# 2013   06191-004-0454001-02380
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06191-004-0454001-02380
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06191-004-0454001-02380
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.3
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SAPReferenceManager   1.0
Manages References to Shared Projects

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
Comment 5 stefano.balzarotti 2015-09-14 09:16:39 UTC
I confirms that doesm't works on Windows Phone 8.1 RT Project.
My use case:
I have a TabbedMenuPage, inside first tab I have a NavigationPage.
NavigationPage containts a ContentPage with list menu, when you click on an item of listmenu I push a new Content Page.
I click on second tab and I go to another ContentPage.
If i Click on First tab I go back again to first ContentPage.
I have an event listener on CurrentPageChanged in the tabbed page, when CurrentPageChanged occurs I call PopToRootAsync of NavigationPage to go back on first Page (the list menu).
PopToRootAsync works on iOS and on Android, but it does nothing on Windows Phone.
Please fix this BUG!
Comment 6 KubarUS 2015-10-03 06:45:00 UTC
Is someone from Xamarin who can say something about this bug ? I would like to confirm that if you use PopToRootAsync on windows phone 8.1 app and then in normal workflow you would like to use PopAsync then you the app throw exception.

Solution of RossPace is ok but its ugly on the screen (if you have more views you have to watch all of them back) - it can be temporary solution but not for customers who pay for the apps.

Xamarin team do something with that
Comment 7 E.Z. Hart [MSFT] 2015-10-21 09:26:30 UTC
Confirmed that this problem exists with Subha's attached repro project using  1.5.2.6469-pre1.
Comment 8 John Miller [MSFT] 2016-02-10 16:03:19 UTC
This is still an issue with 2.1pre4. 

If you need another sample, use ours: https://developer.xamarin.com/samples/xamarin-forms/Navigation/Hierarchical/

Download this and update to 2.1pre4. Then, navigate twice to get to the page that has the Return to Root button. Press this button, nothing happens. Press it again a few times and it will crash.
Comment 9 Klaus Keith 2016-02-24 05:58:19 UTC
Still an issue with v2.1.0.6517-pre5
Comment 10 Gerard C 2016-05-03 13:44:33 UTC
Still an issue with v2.1.0.6529

Also reproduced using xamarin-forms-book-samples-master -> Chapter24 -> StackManipulation

Tested UWP (Universal Windows) project on desktop and device.
Comment 11 John Miller [MSFT] 2016-05-21 13:51:03 UTC
There is a PR for this now: https://github.com/xamarin/Xamarin.Forms/pull/185
Comment 12 Paul DiPietro [MSFT] 2016-05-26 21:05:04 UTC
This should be fixed in a future version.
Comment 13 Tom_Qv 2016-06-15 19:07:16 UTC
Same here with XF 2.3.0.46-pre3

PopToRootAsync works fine with Android and iOS XF-projects, but not with UWP.

So why is status FIXED?
Comment 14 David Waterman 2016-06-17 15:59:21 UTC
Same here with XF 2.3.0.49
PopToRootAsync fails on UWP, WinRT 8.1 and WinPhone 8.1
Works fine on android

This bug needs to be reopened
Comment 15 Paul DiPietro [MSFT] 2016-06-17 16:04:57 UTC
It will be in 2.3.1.
Comment 16 Parmendra Kumar 2016-06-21 15:12:17 UTC
*** Bug 41050 has been marked as a duplicate of this bug. ***
Comment 17 Jan Nepras 2016-06-23 11:26:30 UTC
I suggest to reopen the bug aswell. There is empty project with two pages replicating this bug. Also I updated Xamarin.Forms to latest version.

https://1drv.ms/u/s!As1Bb4lGxggCgtsK8Xe0_CxxWrwzBw
Comment 18 Paul DiPietro [MSFT] 2016-06-23 14:25:27 UTC
Jan, as stated, this is going to be in 2.3.1.
Comment 19 Parmendra Kumar 2016-06-29 17:39:32 UTC
As Bug #41050 duplicate bug of this and Bug: https://bugzilla.xamarin.com/show_bug.cgi?id=41050 is verified state.

Hence mark this issue as Verified.