purchases-flutter icon indicating copy to clipboard operation
purchases-flutter copied to clipboard

Crash after resume

Open sonbui00 opened this issue 1 year ago • 11 comments

‼️ Required data ‼️

Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!

Environment

  • [ ] Output of flutter doctor
  • [ ] Version of purchases-flutter
  • [ ] Testing device version e.g.: iOS 15.5, Android API 30, etc.
  • [ ] How often the issue occurs- every one of your customers is impacted? Only in dev?
  • [ ] 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.)

Describe the bug

I've just use Paywall feature and got many crash report message like this There is no singleton instance. Make sure you configure Purchases before trying to get the default instance. More info here: https://errors.rev.cat/configuring-sdk

I think the issue happen when the user open paywall and leave the app. And when they comeback, the activity resume and have this issue.

To reproduce the issue you can enable "Don't keep activities" on Developer options. And then ope paywall in the app, leave paywall open and change to other app. When comeback you can see the issue or you can't close the paywall.

Additional context

Add any other context about the problem here.

sonbui00 avatar Aug 27 '24 15:08 sonbui00

👀 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 Aug 27 '24 15:08 RCGitBot

Hey @sonbui00 ,

Can you please confirm that you have configured the SDK before showing the Paywall in this instance? You might be able to confirm that from debug logs or stack trace of the crash report that you get. Once you get that information, can you please share it here so we can look further into it?

michaelAtRC avatar Aug 29 '24 16:08 michaelAtRC

@michaelAtRC Confirmed. I can open Paywal and make purchase normally. The issue happen when I leave the Paywall open and change to other app in long time and come back, not when I open paywall first time.

sonbui00 avatar Aug 30 '24 04:08 sonbui00

Hi @sonbui00, Is this still happening with the latest version?

nyeu avatar Sep 27 '24 13:09 nyeu

@nyeu my version: purchases_flutter: 8.1.0 Not yet upgrade to the latest version. And this is the log: issue_89f38a626f952d2f99e9acd3f13edffe_crash_session_66F6A394007E000148BCF49565B0731B_DNE_0_v2_stacktrace.txt

sonbui00 avatar Sep 27 '24 13:09 sonbui00

Hi,

I have the same issue in my flutter app, In the last 7 days I received 29 crashes for 29 different users. My version is : purchases_flutter: 8.1.0

You will find attached screenshots from my play store console.

Screenshot 2024-09-30 at 12 25 36 AM Screenshot 2024-09-30 at 12 26 43 AM

To be honest it is urgent issue, I feel like I am losing a lot of users in my app due to this crash in the payment workflow.

Thanks

arshavin2000 avatar Sep 29 '24 20:09 arshavin2000

Hi,

I am getting the exact same issue and it is repeatedly logged on the crashlytics. Environment: purchases_flutter: 8.1.1

I have initialised the RevenueCat SDK when app starts. image

here is the crashlytics stacktrace:

com.virblue.mystudylife_issue_2e3f0f1ac1305ad36bbf1dd83dccee91_crash_session_66FCE914009B00015FEF8F4175377B52_DNE_0_v2_stacktrace.txt

Crashlytics insights:

image

danyialkhan avatar Oct 02 '24 07:10 danyialkhan

Hi all, would you mind sharing a code snippet on where and how do you configure the RevenueCat SDK? Thank you!

nyeu avatar Oct 02 '24 08:10 nyeu

Hi @nyeu

here is the code where i have configured the RC.

first in main.dart file line number 74: image

then in revenue_cat_manager_impl.dart line number 25 init method. image

danyialkhan avatar Oct 02 '24 08:10 danyialkhan

Hi all, we've debugged it and found the issue and the root cause. We are currently working on making a fix for it. Thank you a lot for the debug logs and for your patience! I'll let you know as soon as the fix is out.

nyeu avatar Oct 07 '24 14:10 nyeu

Hi guys, there is any update on this.

I am experimenting same issue, I make anything I could, but still can find any fixing.

ironminddr avatar Oct 20 '24 19:10 ironminddr

Hey @nyeu any update on this?

hamza-imran75 avatar Jan 15 '25 10:01 hamza-imran75

I am experiencing the same issue, I already raised the bug in separate thread and no one is answering... so Any update on this issue ?

arshavin2000 avatar Jan 19 '25 19:01 arshavin2000

Hi all, We've released a new SDK version 8.4.2 with a fix for this issue. Please let me know if that works or if you still find the crash!

Thank you a lot and I appreciate your patience.

nyeu avatar Jan 21 '25 15:01 nyeu

Hey @nyeu thank you, going to do a deployment this week and will get back to you with the results.

hamza-imran75 avatar Jan 21 '25 15:01 hamza-imran75

@hamza-imran75 does the new update solve the crash ?

arshavin2000 avatar Jan 25 '25 18:01 arshavin2000

Update We have deployed to our users(50%) and it seems promising, the deployment was done on 23 Jan, and up till now we haven't received any errors for the above issue. I will still monitor and get back to this until we do a 100% deployment.

cc @nyeu

hamza-imran75 avatar Jan 25 '25 18:01 hamza-imran75

Hi @hamza-imran75, Thank you for letting me know! We've got reports from users saying that they no longer see the crash. I hope it's also fixed for all your users. Let us know if it's safe to close the issue.

nyeu avatar Jan 25 '25 19:01 nyeu

Hey @nyeu i think we can close this issue now, we haven't gotten any bugs anymore.

Thank you very much.

hamza-imran75 avatar Jan 26 '25 12:01 hamza-imran75