-
Notifications
You must be signed in to change notification settings - Fork 265
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
GooglePayLauncherFragment does not restore local variables when system looses fragment state and restores it #1425
Comments
@charliecruzan-stripe - is there an ETA for when this issue will be investigated? |
Same issue here |
@charliecruzan-stripe Any news on this? We also face this issue. The issue is connected to state restoration and it can be reproduced for debugging by enabling the 'Don't keep activities' developer option. With that enabled, it happens constantly. Stacktrace:
|
Any update of this? thanks! |
Steps to reproduce this -
|
Is there any update on this? |
@charliecruzan-stripe Is there an ETA for when this will be fixed/investigated? It's quite a severe bug and accounts for the majority of our crashes on Android |
@charliecruzan-stripe we agree that this issue deserves priority. The users of our Flutter plugin are facing the same: |
Describe the bug
flutter-stripe/flutter_stripe#1282
One developer is reporting the app breaking on Android with this error
It looks like if the app looses state at any point the FragmentManager takes care of restoring the Fragments automatically, but expects the developer to restore the local content of the Fragment, inside the views and variables:
https://developer.android.com/guide/fragments/saving-state
In our case GooglePayLauncherFragment stored several variables with lateinit that are setted up when calling presentGooglePaySheet. After that the Fragment is never removed from the activity and it.
So when the app looses the state the FragmentManager automatically restores the Fragment, calls onViewCreated, and tries to use the variables that have been lost along the way
Smartphone / tablet
Device: Lots of Android phones (Samsung, Google, Oppo, Motorola, etc)
OS: All the way from Android 13 to Android 10
Additional context
Stacktrace:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: