FragmentManager is already executing transactions
See original GitHub issueCaused by: java.lang.IllegalStateException: FragmentManager is already executing transactions
at android.app.FragmentManagerImpl.ensureExecReady(FragmentManager.java:1981)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2037)
at android.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:799)
at com.tbruyelle.rxpermissions2.RxPermissions.getRxPermissionsFragment(RxPermissions.java:54)
at com.tbruyelle.rxpermissions2.RxPermissions.<init>(RxPermissions.java:41)
at com......MessagesActivity.initViews(MessagesActivity.java:113)
in this code :
rxPermissions = new RxPermissions(this);
I don’t know exactly the reason behind this as it was working before without any issue.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:14
Top Results From Across the Web
FragmentManager is already executing transactions. When is ...
I had this exception when quickly replacing 2 fragments AND using executePendingTransactions() . Without calling this there was no exception.
Read more >Crash): FragmentManager is already executing transactions ...
When the Fragment that has react native tries to recover the state after a navigation, it tries to use the Activity FragmentManager which...
Read more >LiveData and IllegalStateException: FragmentManager is ...
`IllegalStateException: FragmentManager is already executing transaction`. It seemed to be strange because all of unit tests in the pipeline ...
Read more >Android : FragmentManager is already executing transactions ...
Android : FragmentManager is already executing transactions. When is it safe to initialise pager after commit?
Read more >Error: FragmentManager is already executing transactions ...
Error : FragmentManager is already executing transactions when rotating screen or interchanging Dark/Normal mode - Android Studio - ViewPager2 + ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@leodeleon22 @chetbox now when you instantiate
new RxPermissions(this)from a fragment you have to pass the fragment instance instead of the fragment’s activity. This is fixed withv0.10.2To be honest, I am not sure there is actually a fix. It is the same as calling Activity.startActivityForResult inside Fragment and wait for result in Fragment.onActivityResult.
I mean, the only solution I see is creating annotations to say IDE to count it as a warning with the message.
Just use the right methods in the right places. For me, the fix is made and I use the right constructor in the right place.