chargebee / chargebee-flutter

MIT License
5 stars 8 forks source link

Failure of Purchase error in Release Mode after a Successful Purchase. #55

Closed sarankumar-ns closed 1 year ago

sarankumar-ns commented 1 year ago

I was getting this PlatformException even after a Successful purchase via Play Billing in Release Mode.

Even an invoice was also created on the Chargebee site and the webhook triggers a subscription-created event call.

This stack trace was from the previous version of the Chargebee plugin.

PlatformException(null, Failure of purchase, h1.a: Failure of purchase
    at g1.a$d.a(Unknown Source:87)
    at g1.a$d.invoke(Unknown Source:2)
    at j1.j$a$b.invokeSuspend(Unknown Source:263)
    at kotlin.coroutines.jvm.internal.a.resumeWith(Unknown Source:11)
    at lc.t0.run(Unknown Source:129)
    at kotlinx.coroutines.scheduling.a.r(Unknown Source:0)
    at kotlinx.coroutines.scheduling.a$c.c(Unknown Source:14)
    at kotlinx.coroutines.scheduling.a$c.m(Unknown Source:28)
    at kotlinx.coroutines.scheduling.a$c.run(Unknown Source:0)
, null)

In the newer version, it's just returning this.

PlatformException(null, Failure of purchase, Failure of purchase, null)

If I manually set minifyEnabled and shrinkResuource to false in the build.gradle it doesn't throw any exception and works fine.

craigspicer commented 1 year ago

Same issue for me on Android release build. @sarankumar-ns solution works. This is in the latest version 0.0.11.

cb-amutha commented 1 year ago

@sarankumar-ns could you add the rule below in progaurd file? And please test it out and confirm -keep class com.chargebee.android.* { ;}

cb-amutha commented 1 year ago

@sarankumar-ns Hope this issue got resolved. Please open a new issue in case of any issues related to it. Thanks.