You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
An error of RootViewController will occur on iOS when resetting the navigation stack with a page that has xct:StatusBarEffect.Color using _navigationService.NavigateAsync("/NavigationPage/MainPage"); from a PopupPage. I had reproduced this issue in both environment, Xamarin.Forms independently, and Xamarin.Forms + Prism.Forms. By changing the Application.Current.MainPage in a PopupPage, it will occur as well. This error will occur if I am trying to reset the navigation stack to a page with xct:StatusBarEffect.Color.
Apparently, if the navigation stack is reset using Application.Current.MainPage = new NavigationPage(new MainPage()), before PopupNavigation.Instance.PopAllAsync() is called in a Xamarin.Forms independent environment, this error will not occur. Maybe the sequence of of navigation need to be rearranged in Prism.Plugin.Popups?
at Xamarin.CommunityToolkit.iOS.Effects.PlatformStatusBarEffect.UpdateStatusBarAppearance (UIKit.UIWindow window) [0x00010] in <b86a3dcb5c1f42eeafd9e295123844ec>:0
at Xamarin.CommunityToolkit.iOS.Effects.PlatformStatusBarEffect.SetColor (Xamarin.Forms.Color color) [0x00079] in <b86a3dcb5c1f42eeafd9e295123844ec>:0
at Xamarin.CommunityToolkit.iOS.Effects.PlatformStatusBarEffect.OnAttached () [0x0000b] in <b86a3dcb5c1f42eeafd9e295123844ec>:0
at Xamarin.Forms.Effect.SendAttached () [0x00009] in D:\a\_work\1\s\Xamarin.Forms.Core\Effect.cs:54
at Xamarin.Forms.RoutingEffect.SendAttached () [0x00000] in D:\a\_work\1\s\Xamarin.Forms.Core\RoutingEffect.cs:29
at Xamarin.Forms.Element.AttachEffect (Xamarin.Forms.Effect effect) [0x00045] in D:\a\_work\1\s\Xamarin.Forms.Core\Element.cs:513
at Xamarin.Forms.Element.set_EffectControlProvider (Xamarin.Forms.IEffectControlProvider value) [0x0007c] in D:\a\_work\1\s\Xamarin.Forms.Core\Element.cs:238
at Xamarin.Forms.Platform.iOS.EffectUtilities.RegisterEffectControlProvider (Xamarin.Forms.IEffectControlProvider self, Xamarin.Forms.IElementController oldElement, Xamarin.Forms.IElementController newElement) [0x0001a] in D:\a\_work\1\s\Xamarin.Forms.Platform.iOS\EffectUtilities.cs:20
at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00094] in D:\a\_work\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:141
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00032] in D:\a\_work\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:240
at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in D:\a\_work\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:378
at Xamarin.Forms.Platform.iOS.NavigationRenderer.OnPushAsync (Xamarin.Forms.Page page, System.Boolean animated) [0x0001d] in D:\a\_work\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:353
at Xamarin.Forms.Platform.iOS.NavigationRenderer.<ViewDidLoad>b__47_0 (Xamarin.Forms.Page p) [0x00024] in D:\a\_work\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:239
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSAction.cs:178
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.Type principalClass, System.Type delegateClass) [0x0003b] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/UIKit/UIApplication.cs:85
at BugTest2.iOS.Application.Main (System.String[] args) [0x00001] in C:\Users\DT005\source\repos\BugTest2\BugTest2\BugTest2.iOS\Main.cs:14
Description
An error of
RootViewController
will occur on iOS when resetting the navigation stack with a page that hasxct:StatusBarEffect.Color
using_navigationService.NavigateAsync("/NavigationPage/MainPage");
from a PopupPage. I had reproduced this issue in both environment, Xamarin.Forms independently, and Xamarin.Forms + Prism.Forms. By changing theApplication.Current.MainPage
in a PopupPage, it will occur as well. This error will occur if I am trying to reset the navigation stack to a page withxct:StatusBarEffect.Color
.Apparently, if the navigation stack is reset using
Application.Current.MainPage = new NavigationPage(new MainPage())
, beforePopupNavigation.Instance.PopAllAsync()
is called in a Xamarin.Forms independent environment, this error will not occur. Maybe the sequence of of navigation need to be rearranged in Prism.Plugin.Popups?Exception
Stack Trace
Link to Reproduction Sample
Xamarin.Forms Version
Xamarin.Forms + Prism.Forms Version
Steps to Reproduce
Expected Behavior
Navigation stack is reset and go to MainPage without any error.
Actual Behavior
Error occurs when stack is reset.
Basic Information
Version with issue:
v5.0.0.2401
v2.0.2
v2.1.0
v8.1.97
v8.0.76
Last known good version:
IDE:
Platform Target Frameworks:
Nuget Packages:
v1.7.3
v1.7.3
I had already create a bug report in XamarinCommunityToolkit repository and Rg.Plugins.Popup repository as well.
The text was updated successfully, but these errors were encountered: