xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
541 stars 351 forks source link

System.ObjectDisposedException after using the Xamarin.Auth.Presenters.OAuthLoginPresenter #404

Open aimore opened 5 years ago

aimore commented 5 years ago

Xamarin.Auth Issue

After displaying the Xamarin.Auth.Presenters.OAuthLoginPresenter modally and dismissing it once the login is completed I am getting System.ObjectDisposedException every time I use the modal navigation from Xamarin.Forms

Version

Xamarin.Forms 3.6.0.220655 Xamarin Auth 1.7.0

Steps to reproduce

  1. Call Xamarin.Auth.Presenters.OAuthLoginPresenter, presenter.Login(authenticator);
  2. finish or cancel Auth
  3. navigate to any page using modal navigation : await Navigation.PushModalAsync (somePage);

Platform: Mono Framework MDK Runtime: Mono 5.16.0.221 (2018-06/b63e5378e38) (64-bit) Package version: 516000221

Expected behaviour

Should navigate

Actual behaviour

throws exception: {System.ObjectDisposedException: Cannot access a disposed object. Object name: 'PlatformRenderer'. at Foundation.NSObject.get_SuperHandle () [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.15/src/Xamarin.iOS/Foundation/NSObject2.cs:449 at UIKit.UIViewController.get_View () [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.15/src/Xamarin.iOS/UIKit/UIViewController.g.cs:2983 at Xamarin.Forms.Platform.iOS.Platform.EndEditing () [0x00051] in <0648e2dffe9e4201b8c6e274ced6579f>:0 at Xamarin.Forms.Platform.iOS.Platform.Xamarin.Forms.INavigation.PushModalAsync (Xamarin.Forms.Page modal, System.Boolean animated) [0x00000] in <0648e2dffe9e4201b8c6e274ced6579f>:0 at Xamarin.Forms.Internals.NavigationProxy.OnPushModal (Xamarin.Forms.Page modal, System.Boolean animated) [0x00022] in D:\a\1\s\Xamarin.Forms.Core\NavigationProxy.cs:212 at Xamarin.Forms.Application+NavigationImpl.<>n__1 (Xamarin.Forms.Page modal, System.Boolean animated) <0x14631a0c0 + 0x00062> in <b1baaea67aeb409ca7e75b039f7cca37>:0 at Xamarin.Forms.Application+NavigationImpl+<OnPushModal>d__3.MoveNext () [0x00065] in D:\a\1\s\Xamarin.Forms.Core\Application.cs:401 --- End of stack trace from previous location where exception was thrown --- at Prism.Plugin.Popups.PopupPageNavigationService+<DoPush>d__6.MoveNext () [0x000d8] in D:\a\1\s\src\Prism.Plugin.Popups\PopupPageNavigationService.cs:103 --- End of stack trace from previous location where exception was thrown --- at Prism.Navigation.PageNavigationService+<>c__DisplayClass38_1+<<ProcessNavigationForContentPage>b__0>d.MoveNext () [0x00050] in D:\a\1\s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:454 --- End of stack trace from previous location where exception was thrown --- at Prism.Navigation.PageNavigationService+<DoNavigateAction>d__45.MoveNext () [0x000da] in D:\a\1\s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:656 --- End of stack trace from previous location where exception was thrown --- at Prism.Navigation.PageNavigationService+<ProcessNavigationForContentPage>d__38.MoveNext () [0x001a3] in D:\a\1\s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:452 --- End of stack trace from previous location where exception was thrown --- at Prism.Navigation.PageNavigationService+<ProcessNavigation>d__30.MoveNext () [0x001ca] in D:\a\1\ s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:329 --- End of stack trace from previous location where exception was thrown --- at Prism.Navigation.PageNavigationService+<NavigateInternal>d__28.MoveNext () [0x000f9] in D:\a\1\s\Source\Xamarin\Prism.Forms\Navigation\PageNavigationService.cs:281 }