chargebee / chargebee-android

MIT License
9 stars 6 forks source link

App crashes when receiving the PURCHASES_UPDATED intent #90

Open ciriousjoker opened 1 year ago

ciriousjoker commented 1 year ago

Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=com.android.vending.billing.PURCHASES_UPDATED flg=0x10 pkg=com.dieringe.workout (has extras) } in u2.f1@c9ed868 at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$android-app-LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1929) at android.app.LoadedApk$ReceiverDispatcher$Args$$ExternalSyntheticLambda0.run(:2) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8762) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Caused by uj.s: lateinit property product has not been initialized at com.chargebee.android.billingservice.BillingClientManager.acknowledgePurchase(:6) at com.chargebee.android.billingservice.BillingClientManager.onPurchasesUpdated(:139) at u2.f1.onReceive(SourceFile:1) at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$android-app-LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1919) at android.app.LoadedApk$ReceiverDispatcher$Args$$ExternalSyntheticLambda0.run(:2) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8762) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Both of these together caused an app crash in production. Maybe another ProGuard issue due to missing rules?

ciriousjoker commented 1 year ago

This keeps occurring in production even after updating the ProGuard rules. No idea how to reproduce it in development.

This appeared during app start up, right after we see this in the logs:

Retrieved products: [Product(id: ..., price: .., priceString: ... title: ..., currencyCode: ..., subscriptionPeriod: ..., ..., ...]
cb-haripriyan commented 1 year ago

Hi @ciriousjoker - Thanks for bringing reporting. We are looking into this and will update here about the progress.

ciriousjoker commented 11 months ago

@cb-haripriyan Any news?

ciriousjoker commented 11 months ago

@cb-haripriyan Is v1.2.1 also supposed to fix this? Either way we'll roll out the new chargebee sdk version and report back what happens

ciriousjoker commented 6 months ago

@cb-haripriyan Any updates?