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

Unknown Source - com.revenuecat.purchases.Purchases$Companion.getSharedInstance #1224

Open
arshavin2000 opened this issue Dec 13, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@arshavin2000
Copy link

I am using this version
purchases_flutter: ^8.1.0 purchases_ui_flutter: ^8.1.0

My app is live and I am generating a lot of subscription using the revenue cat SDK but I have a serious problem, there is a bug from the SDK happened more than 150 times in the last 28 days. You will find attached a screenshot.

Screenshot 2024-12-13 at 11 44 26 PM Screenshot 2024-12-13 at 11 45 04 PM

This crash only is more than 85% of all the crashes happening in my app which increased the overall bad behaviour threshold for my app to 4%. The recommend by Google is 1.09%. As an impact my app will be less discoverable on Google Play. You will find attached a screenshot also.

Screenshot 2024-12-13 at 11 46 55 PM

You will find attached the stack trace

com.iptvtvsmartguide.app_issue_c521fb2c41cf2358f0453c7dd2a8f50b_crash_session_675C632A023400011DF3FD51641A6383_DNE_0_v2_stacktrace.txt

I am not sure but I think this crash happens when the user open the paywall and put the app in background and I believe that my configuration is good as I have more than 100 subscriptions.

Please it is critical bug and I saw many developers are complaining about it . Thanks

@arshavin2000 arshavin2000 added the bug Something isn't working label Dec 13, 2024
@RCGitBot
Copy link
Contributor

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

@kmurphy-rc
Copy link
Contributor

Hey @arshavin2000!
Thank you for including the stack trace. I'm seeing this message in the logs: "There is no singleton instance. Make sure you configure Purchases before trying to get the default instance."
It looks like this may be occurring when you're trying to display the paywall prior to configuring the SDK - can you make sure that you're calling configure just once, and early in your lifecycle, before using any other Purchases methods?

@arshavin2000
Copy link
Author

Hi @kmurphy-rc,
This is my function to configure the SDK.

`Future initRevenueCatSDK() async {
try {
await Purchases.setLogLevel(LogLevel.debug);

PurchasesConfiguration configuration;
if (Platform.isIOS) {
  configuration =
      PurchasesConfiguration('XXXX');
} else {
  configuration =
      PurchasesConfiguration('XXXX');
}
await Purchases.configure(configuration);
}catch(e){
debugPrint("PurchasesConfiguration error $e");
}
}`

and I am calling it just one time in Main.dart in the main function.

I guess it is the right implementation right ? I saw in some issues here that some guys succeeded to reproduce the issue by making the app in background while the paywall is open. I tried to reproduce it the same way on my device, I didn't get the crash but I got a loop when I close the paywall it opens again automatically.

Thanks to investigate more on this issue.

@Kraimoz
Copy link

Kraimoz commented Dec 21, 2024

Here I have exactly the same problem in version 8.3.1.

@arshavin2000
Copy link
Author

Hi guys, any update for this issue. It is really killing my app , it is less discoverable now in play store due to this crash.

@arshavin2000
Copy link
Author

Hi everyone, it has been over a month without any updates from your side. I'm seriously considering migrating to a new solution, like Aphid or a similar alternative, due to the high number of bugs related to this issue

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

4 participants