reactiveui/Sextant

Sextant >= 1.7.4 throws Exception on PushModal

bochos-bln opened this issue · 10 comments

Updating above Sextant 1.7.3 throws an exception if page is pushed modal on android and ios (Tested by debugging on Simulator/Emulator)

The Exception is: "Page must not already have a parent..."

See small testproject updated with myget sextant:
bochos-bln/TabbedPageSextantSample@cf9f5aa

Steps To Reproduce
Start the App, press "First Modal Button"

Expected behavior
Modal Page Pushed (like with Sextant 1.7.3
... but App Crashes

Environment

  • OS:
  • Version
  • Device:

Additional context

Hey @xlbs-rm 👋,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us.

https://opencollective.com/reactiveui

PS.: We offer priority support for all backers. Don't forget to add priority label when you start backing us 😄

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

This sounds like an issue with the 2.0 release, and should be resolved when it ships. I am trying to test out a few examples. The sample that works in this repository is fine. Also, Sextant doesn't currently support Xamarin.Forms 4.1 so I'm sure that's not helping.

Closing this issue, as 1.7.4 is a prerelease package that is older and we are working out issues for the 2.0 release in our pre-release packages. Most recent packages on the feed is 1.7.14

@RLittlesII : the issue still appears also in Sextant 1.7.14. @see: https://github.com/xlbs-rm/TabbedPageSextantSample

The Error also occures with XamarinForms 4.0.* (tested with: 4.0.0.540366)

Exception:
{System.InvalidOperationException: Page must not already have a parent. at Xamarin.Forms.Internals.NavigationProxy.PushModalAsync (Xamarin.Forms.Page modal, System.Boolean animated) [0x00008] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:128 at Xamarin.Forms.Internals.NavigationProxy.PushModalAsync (Xamarin.Forms.Page modal) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:122 at Sextant.XamForms.NavigationView+<>c__DisplayClass12_0.<PushModal>b__1 (Xamarin.Forms.NavigationPage page) [0x0000b] in <f2fe864f19f64c6d84ecab60457c578a>:0 at System.Reactive.Linq.ObservableImpl.SelectMany 2+ObservableSelector+_[TSource,TResult].OnNext (TSource value) [0x00002] in <269857168607470d991a5a72ee3bb154>:0 } base: {System.SystemException}

GitHub
Sample to how to use Tabbed Page with Sextant in a optimised way - xlbs-rm/TabbedPageSextantSample

Hey there, unfortunately this is very much still in development so it comes as is. The latest supported release is 1.5.5 which is the latest listed here https://www.nuget.org/packages/Sextant/

Package Description

Thanks for the bug report anyway, will keep an eye out for it before the 2.0 release.

And downgrading Xamarin.Forms to 3.6 doesn't resolve the issue?

Again. Sextant does not currently support Xamarin.Forms 4.0

The error I see points to it being in Xamarin.Forms.Core

@RLittlesII
The Issue also occurs with the combination of:
Xamarin.Forms 3.6.* (3.6.0.53...)
Sextant.XamForms 1.7.14
ReactiveUI.XamForms 9.18.2

I don't see the error in Xamarin.Forms.Core due regular apps with push modal work quite fine.
As i wrote in the beginning the issue did not happen in Sextant 1.7.3 (using IPageViewModel instead IViewModel and RegisterNavigation instead RegisterNavigationView)

Thanks for re-opening the issue. As long as this is not fixed we stop using navigation parameters.

@xlbs-rm I was able to reproduce this with the sample in this repository. I'm not quite sure how this ever worked. The offensive line of code seems to have been in the repository for a while, but I feel like this used to work.

Regardless, thank you for reporting this issue. Apologies for closing it initially, I didn't realize it wasn't a regression issue at first.

gsgou commented

Thanks a lot for resolving this issue quickly!

We are trying to ship 2.0. Anything that doesn't work that should is better fixed now.