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

Error when opening month year picker then backgrounding app #113

Open
FraserCampbell1 opened this issue Mar 14, 2022 · 3 comments
Open

Error when opening month year picker then backgrounding app #113

FraserCampbell1 opened this issue Mar 14, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@FraserCampbell1
Copy link

When I background the app while the month year picker is open I get the following error on Android

E/AndroidRuntime: FATAL EXCEPTION: main
Process: myapp, PID: 5600
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1844)
at androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1884)
at androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:329)
at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:294)
at androidx.fragment.app.DialogFragment.show(DialogFragment.java:260)
at com.gusparis.monthpicker.RNMPickerModule$1.run(RNMPickerModule.java:46)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

This is on the latest (v1.8.1) version of the code.

Any help is appreciated!

@FraserCampbell1
Copy link
Author

Upon further investigation this error looks to only get logged in Android 8. However when testing on Android 9 and greater the same issue occurs.

The scenario is to open the month year picker then background the app. The picker looks to be rendering multiple times and isn't handling the app state changing very well

@gusparis
Copy link
Owner

@FraserCampbell1 I'll take a look at this one 👀

@gusparis gusparis added the bug Something isn't working label Nov 28, 2022
@gusparis gusparis self-assigned this Nov 28, 2022
@debdeep-ganguly
Copy link

@gusparis Any update on the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants