0

I am getting the error "SERVICE_DISCONNECTED" on Android Studio when I try to make a purchase with RevenueCat. I've searched everywhere but nothing has worked so far.
I followed their quickstart guide and double checked everything but I can't get purchases to work.

The following is the full log of the error when I try to purchase:

W/BillingClient: Exception while launching billing flow: ; for sku: mysku; try to reconnect
W/[Purchases] - INFO: Error updating purchases. DebugMessage: Service connection is disconnected.. ErrorCode: SERVICE_DISCONNECTED.
E/[Purchases] - ERROR: There was a problem with the Play Store. | Error updating purchases. DebugMessage: Service connection is disconnected.. ErrorCode: SERVICE_DISCONNECTED.
W/[Purchases] - INFO: Failed to launch billing intent. DebugMessage: Service connection is disconnected.. ErrorCode: SERVICE_DISCONNECTED.

Thanks in advance!

Noah-1
  • 396
  • 1
  • 5
  • 20
  • 1
    Hi @Noah-1, are you using Flutter? We got a similar report this week https://github.com/RevenueCat/purchases-flutter/issues/87. I wonder if there's something wrong with our support for the older Android API – Cesar Jul 22 '20 at 19:21
  • Hey @Cesar. I am using Android Studio 4.0.1 and Kotlin. Here is someone else with the same issue: https://docs.revenuecat.com/discuss/5f121019af2ab9032a4b633a – Noah-1 Jul 22 '20 at 21:21
  • 1
    That's the same person that opened the issue in Flutter. The solution for Flutter was related to the context that was passed when initializing the SDK. How are you calling `purchasePackage`/`purchaseProduct`? Make sure the first parameter you are passing to those functions is an activity context. https://sdk.revenuecat.com/android/purchases/com.revenuecat.purchases/-purchases/purchase-package.html – Cesar Jul 22 '20 at 21:30
  • Wow. That seems to be exactly the issue here. I was calling the purchase function from an adapter exactly as it is written on the Quickstart guide but if I call it from the same activity, it works. Thanks for the help. – Noah-1 Jul 22 '20 at 22:18
  • Will you able the resolve this problem? I am facing the same issue – Burak Cabadan Aug 05 '21 at 09:19

0 Answers0