react-native-purchases icon indicating copy to clipboard operation
react-native-purchases copied to clipboard

App Error After User Subscribes Through Present Paywall (Can not perform this action after onSaveInstanceState)

Open lucaswiix opened this issue 1 year ago • 3 comments

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.

  1. Environment
    1. Platform: Android
    2. SDK version: 7.21.1
    3. OS version:
    4. Xcode/Android Studio version:
    5. React Native version: : "0.73.4",
    6. SDK installation (CocoaPods + version or manual):
    7. How widespread is the issue. Percentage of devices affected.
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. 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)

lucaswiix avatar Apr 19 '24 15:04 lucaswiix

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar Apr 19 '24 15:04 RCGitBot

Thanks for opening this issue. Can you consistently reproduce it?

vegaro avatar Apr 22 '24 09:04 vegaro