react-native-purchases
react-native-purchases copied to clipboard
App Error After User Subscribes Through Present Paywall (Can not perform this action after onSaveInstanceState)
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
Describe the bug Upon the client's subscription via reveneucat's paywall, upon closing the paywall, the following error occurs in my Android native module.
I've searched online and found several instances of this error, but none of the proposed solutions have worked, which leads me to suspect it may be a bug with reveneucat.
I'm using expo.
- Environment
- Platform: Android
- SDK version: 7.21.1
- OS version:
- Xcode/Android Studio version:
- React Native version: : "0.73.4",
- SDK installation (CocoaPods + version or manual):
- How widespread is the issue. Percentage of devices affected.
- Debug logs that reproduce the issue
- Steps to reproduce, with a description of expected vs. actual behavior
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Additional context
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1632) at androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1672) at androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:341) at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:306) at com.revenuecat.purchases.hybridcommon.ui.PaywallHelpersKt.presentPaywallFromFragment(PaywallHelpers.kt:50) at com.revenuecat.purchases.react.ui.RNPaywallsModule.presentPaywall(RNPaywallsModule.kt:82) at com.revenuecat.purchases.react.ui.RNPaywallsModule.presentPaywall(RNPaywallsModule.kt:41) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:149) at com.facebook.jni.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29) at android.os.Looper.loopOnce(Looper.java:230) at android.os.Looper.loop(Looper.java:319) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234) at java.lang.Thread.run(Thread.java:1012)
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Thanks for opening this issue. Can you consistently reproduce it?