MauiBlazorPermissionsExample icon indicating copy to clipboard operation
MauiBlazorPermissionsExample copied to clipboard

Permissions registering issue when using AppShell

Open davewheatcroft3 opened this issue 3 years ago • 1 comments

It appears when using an AppShell for navigation the flow breaks - I think specifically in Android.

This message appears: Java.Lang.IllegalStateException: 'LifecycleOwner crc64c98e7f6d892de5e5.MainActivity@d65cbb6 is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED.'

Which with a little reading, is because the regare doing this too late for Android flow. I assume AppShell does something differently that means the Blazor view initialization in the page is fire later?

To reproduce this simply app main page with an AppShell instance. And add shell content for the main page. And then error should appear.

Great and helpful example by the way - really helped me get this far!

davewheatcroft3 avatar Sep 20 '22 12:09 davewheatcroft3

I ran into the same problem, is there any way to resolve this?

kissgyula avatar Jan 06 '23 16:01 kissgyula