Description
On Android, querying products sometimes fails with OpenIapError$QueryProduct: Failed to query product.
The error appears from ProductManager$getOrQuery$3$1.onProductDetailsResponse, but the stack trace does not expose the original Google Billing response code/message, so it is difficult to debug whether this is caused by product configuration, Play Store state, billing availability, or library behavior.
Stack traces
dev.hyo.openiap.OpenIapError$QueryProduct: Failed to query product
at dev.hyo.openiap.helpers.ProductManager$getOrQuery$3$1.onProductDetailsResponse(ProductManager.kt:103)
at com.android.billingclient.api.BillingClientImpl.zzt(com.android.billingclient:billing@@8.3.0:13)
at com.android.billingclient.api.zzbf.call(Unknown Source:6)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
dev.hyo.openiap.OpenIapError$QueryProduct: Failed to query product
at dev.hyo.openiap.helpers.ProductManager$getOrQuery$3$1.onProductDetailsResponse(ProductManager.kt:95)
at com.android.billingclient.api.BillingClientImpl.zzt(com.android.billingclient:billing@@8.3.0:13)
at com.android.billingclient.api.zzbf.call(Unknown Source:6)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Expected behavior
queryProduct / getProducts should either:
- Return the available products/subscriptions successfully, or
- Return a more detailed error including:
- Billing response code
- Billing debug message
- Product IDs being queried
- Product type: inapp or subs
- Whether Google Billing returned an empty product list
Actual behavior
The app only receives:
OpenIapError$QueryProduct: Failed to query product
without enough details to identify the root cause.
Environment
- Platform: Android
- Library: openiap / react-native-iap
- Google Billing Client: billing@@8.3.0
- Product types used:
- Subscriptions
- Non-consumable lifetime product
Questions
- Is this error usually caused by Google Play product configuration, or can it also happen due to Billing Client response handling?
- Can the library expose the original BillingResult.responseCode and BillingResult.debugMessage in this error?
- Is there any known issue around ProductManager.kt line 95 / 103 when Google Billing returns an empty product list?
- What is the recommended way to debug which specific SKU/product ID failed?
Additional context
This issue happens while querying products before purchase. It may affect users who cannot see subscription or lifetime product details.
Description
On Android, querying products sometimes fails with OpenIapError$QueryProduct: Failed to query product.
The error appears from ProductManager$getOrQuery$3$1.onProductDetailsResponse, but the stack trace does not expose the original Google Billing response code/message, so it is difficult to debug whether this is caused by product configuration, Play Store state, billing availability, or library behavior.
Stack traces
dev.hyo.openiap.OpenIapError$QueryProduct: Failed to query product
at dev.hyo.openiap.helpers.ProductManager$getOrQuery$3$1.onProductDetailsResponse(ProductManager.kt:103)
at com.android.billingclient.api.BillingClientImpl.zzt(com.android.billingclient:billing@@8.3.0:13)
at com.android.billingclient.api.zzbf.call(Unknown Source:6)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
dev.hyo.openiap.OpenIapError$QueryProduct: Failed to query product
at dev.hyo.openiap.helpers.ProductManager$getOrQuery$3$1.onProductDetailsResponse(ProductManager.kt:95)
at com.android.billingclient.api.BillingClientImpl.zzt(com.android.billingclient:billing@@8.3.0:13)
at com.android.billingclient.api.zzbf.call(Unknown Source:6)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Expected behavior
queryProduct / getProducts should either:
Actual behavior
The app only receives:
OpenIapError$QueryProduct: Failed to query product
without enough details to identify the root cause.
Environment
Questions
Additional context
This issue happens while querying products before purchase. It may affect users who cannot see subscription or lifetime product details.