Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not perform this action after onSaveInstanceState #150

Closed
jnam90 opened this issue Aug 16, 2017 · 4 comments
Closed

Can not perform this action after onSaveInstanceState #150

jnam90 opened this issue Aug 16, 2017 · 4 comments

Comments

@jnam90
Copy link

jnam90 commented Aug 16, 2017

Using version 0.4.3. I am sometimes seeing this crash in production:

Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1433)
at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1451)
at android.app.BackStackRecord.commitInternal(BackStackRecord.java:687)
at android.app.BackStackRecord.commit(BackStackRecord.java:663)
at android.app.DialogFragment.show(DialogFragment.java:230)
at pub.devrel.easypermissions.helper.BaseFrameworkPermissionsHelper.showRequestPermissionRationale(BaseFrameworkPermissionsHelper.java:30)
at pub.devrel.easypermissions.helper.PermissionHelper.requestPermissions(PermissionHelper.java:73)
at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:183)
at pub.devrel.easypermissions.EasyPermissions.requestPermissions(EasyPermissions.java:141)
at com.xxx.xxx.xxx.xxx.BaseActivity.requestPermission(BaseActivity.java:333)

Device: Galaxy J5(2016)
OS: 6.0.1

@SUPERCILEX
Copy link
Contributor

@jnam90 that means you are trying to request the permission after the activity is no longer visible. My guess is that you have the permission request is an async callback?

@SUPERCILEX
Copy link
Contributor

@jnam90 Just another thought, are you calling super.onActivityResult() in your activity?

@jnam90 jnam90 closed this as completed Aug 25, 2017
@jnam90
Copy link
Author

jnam90 commented Aug 25, 2017

@SUPERCILEX Sorry I saw last comment too late.

@samtstern
Copy link
Contributor

This is pretty old and was closed once before by @jnam90 so I am going to close it again. If anyone else experiences this issue on a recent version please file a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants