QuickPermissions-Kotlin icon indicating copy to clipboard operation
QuickPermissions-Kotlin copied to clipboard

java.lang.IllegalStateException: FragmentManager is already executing transactions

Open dkshin opened this issue 5 years ago • 6 comments

java.lang.IllegalStateException: FragmentManager is already executing transactions

Use the Navigation component in Android Jetpack

dkshin avatar Feb 19 '20 01:02 dkshin

java.lang.IllegalStateException: FragmentManager is already executing transactions

Am getting this error in Jetpack Navigation Component when I use a BottomView inside a Fragment.

zakayothuku avatar Jun 09 '20 14:06 zakayothuku

library version 0.4.1

Also using navigation component

java.lang.IllegalStateException: FragmentManager is already executing transactions
        at androidx.fragment.app.FragmentManager.ensureExecReady(FragmentManager.java:1778)
        at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1843)
        at androidx.fragment.app.FragmentManager.executePendingTransactions(FragmentManager.java:489)
        at com.livinglifetechway.quickpermissions_kotlin.PermissionsManagerKt.runWithPermissionsHandler(PermissionsManager.kt:88)
        at com.livinglifetechway.quickpermissions_kotlin.PermissionsManagerKt.runWithPermissions(PermissionsManager.kt:35)
        at com.livinglifetechway.quickpermissions_kotlin.PermissionsManagerKt.runWithPermissions$default(PermissionsManager.kt:32)
        at uz.sapphire.stepcounter.mvvm.GoogleSignInFragment.googleSignInQ(GoogleSignInFragment.kt:49)
        at uz.sapphire.stepcounter.mvvm.GoogleSignInFragment.onViewCreated(GoogleSignInFragment.kt:42)

Autocrab avatar Jun 20 '20 07:06 Autocrab

I am getting this error as well

KonnorTimmons1297 avatar Jul 29 '20 16:07 KonnorTimmons1297

Actually just figured it out, runWithPermissions is being run at the same time as Navigation Components is replacing the current fragment. To fix the issue, I just created a new Handler and posted runWithPermissions:

Handler().post { runWithPermissions(...) }

KonnorTimmons1297 avatar Jul 29 '20 18:07 KonnorTimmons1297

i have nav graph inside a bottomsheetfragment then transact FragmenA to FragmentB on doing same transaction again. getting error java.lang.IllegalStateException: FragmentManager is already executing transactions. can't fid solution

fazal88 avatar Aug 02 '21 07:08 fazal88

i am getting this error as well

NativeDevlopment avatar Aug 10 '23 11:08 NativeDevlopment