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

`BillingClientParamBuildersKt.buildQueryProductDetailsParams` crash

Open matteinn opened this issue 1 year ago • 6 comments

Describe the bug A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. 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.

We noticed a crash in production happening to few users on this specific device only (so far), running Android 11: AMD Stoney Ridge Chromebook.

  1. Environment
    1. Platform: Android
    2. SDK version: 8.10.3, 8.11.0
    3. OS version: 11
    4. Android Studio version:
    5. How widespread is the issue. Percentage of devices affected. Tiny
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
          Fatal Exception: java.lang.ExceptionInInitializerError:
       at com.google.android.gms.internal.play_billing.zzai.zzi(com.android.billingclient:billing@@7.0.0:2)
       at com.google.android.gms.internal.play_billing.zzai.zzj(com.android.billingclient:billing@@7.0.0:7)
       at com.android.billingclient.api.QueryProductDetailsParams$Builder.setProductList(com.android.billingclient:billing@@7.0.0:9)
       at com.revenuecat.purchases.google.BillingClientParamBuildersKt.buildQueryProductDetailsParams(billingClientParamBuilders.kt:36)
       at com.revenuecat.purchases.google.usecase.QueryProductDetailsUseCase$executeAsync$1.invoke(QueryProductDetailsUseCase.kt:54)
       at com.revenuecat.purchases.google.usecase.QueryProductDetailsUseCase$executeAsync$1.invoke(QueryProductDetailsUseCase.kt:52)
       at com.revenuecat.purchases.google.BillingWrapper.withConnectedClient(BillingWrapper.kt:769)
       at com.revenuecat.purchases.google.BillingWrapper.access$queryPurchaseType(BillingWrapper.kt:79)
       at com.revenuecat.purchases.google.BillingWrapper.access$withConnectedClient(BillingWrapper.kt:79)
       at com.revenuecat.purchases.google.BillingWrapper$queryProductDetailsAsync$useCase$1.invoke(BillingWrapper.kt:221)
       at com.revenuecat.purchases.google.BillingWrapper$queryProductDetailsAsync$useCase$1.invoke(BillingWrapper.kt:221)
       at com.revenuecat.purchases.google.usecase.QueryProductDetailsUseCase.executeAsync(QueryProductDetailsUseCase.kt:52)
       at com.revenuecat.purchases.google.usecase.BillingClientUseCase$run$1.invoke(BillingClientUseCase.kt:51)
       at com.revenuecat.purchases.google.usecase.BillingClientUseCase$run$1.invoke(BillingClientUseCase.kt:49)
       at com.revenuecat.purchases.google.BillingWrapper.executePendingRequests$lambda$3$lambda$2$lambda$0(BillingWrapper.kt:132)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7741)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:966)

Additional context Add any other context about the problem here.

matteinn avatar Dec 10 '24 11:12 matteinn

👀 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 Dec 10 '24 11:12 RCGitBot

It looks like the source of this crash is in BillingClient, interestingly. We're looking into a way to avoid this crash affecting our SDK.

rglanz-rc avatar Dec 12 '24 16:12 rglanz-rc

any updates?

sudo-ulmas avatar Jan 24 '25 02:01 sudo-ulmas

@rglanz-rc any updates here? This is affecting more and more users over time. I'm currently using 8.11.0 and the issue is still present.

matteinn avatar Feb 12 '25 09:02 matteinn

Hello! Are there any updates? Issue is still present on SDK 8.14.2 @rglanz-rc

matteinn avatar Mar 25 '25 14:03 matteinn

Issue still available on 8.17.1

matteinn avatar Jun 05 '25 13:06 matteinn

Issue still available on 8.20.0. Any plans to fix this, please?

matteinn avatar Jul 10 '25 07:07 matteinn

Hey @matteinn,

Apologies for the delay here! It somewhat fell through the cracks, but I have nudged it internally. We’ll be investigating this further, but since it seems to be device-specific, it’s a bit tricky to reproduce without direct access to one of the affected Chromebooks.

To help us move forward, could you confirm the exact Chromebook models where you’ve seen this crash? Also, are you able to reproduce the issue yourself (and consistently), or if it’s only happening intermittently and in production? Also, could you add any additional details about the affected users (e.g., are they anonymous, any patterns in usage)? Any extra info you can share would be really helpful for our debugging.

In the meantime, we’d also recommend updating to the latest major version of the SDK if you haven’t already, as there may be improvements that help here - one caveat here is that if you are using anonymous users make sure your one-time purchase products have been correctly configured in the RevenueCat dashboard as either consumable or non-consumable! Otherwise this will cause issues (more on the release notes here 9.0.0).

Thanks for your patience here!

GuilhermeMota93 avatar Aug 25 '25 09:08 GuilhermeMota93

Hello @GuilhermeMota93! Here is the full list grabbed from Crashlytics, sadly we don't have any of those devices in order to test and can't confirm whether or not the issue can be reproduced consistently...except for the fact that it's marked as "repetitive" on Crashlytics so we assume so.

OS: 100% Android 11 Device state: 2% background

Affected Models: AMD Stoney Ridge Chromebook Intel Gemini Lake Chromebook Intel Jasper Lake Chromebook Intel Alder Lake-N Chromebook Intel Kaby Lake U Chromebook Intel Comet Lake U Chromebook Pixelbook Intel Tiger Lake Chromebook Intel Amber Lake Y Chromebook

We are planning to migrate to v9 and keep you posted.

matteinn avatar Sep 01 '25 12:09 matteinn

Hey @matteinn!

Thanks for sharing those device details, these are helpful - unfortunately no updates still, the team is still looking into this, but I'll keep you updated with progress too on our side.

EDIT: I just realised this being tagged in an internal ticket too 🙏 thanks for flagging through there. Will move comms there!

GuilhermeMota93 avatar Sep 03 '25 08:09 GuilhermeMota93

Saw this lingering still! Since comms were happening via the internal ticketing, marking this as close.

But feel free to reach out if something still outstanding.

GuilhermeMota93 avatar Sep 29 '25 10:09 GuilhermeMota93

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.

github-actions[bot] avatar Oct 07 '25 00:10 github-actions[bot]