You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have encountered an error when testing a Google Play static response product
android.test.canceled
Basically in the V3GoogleInAppBillingService.GdxPayAsyncOperationResultListener the result code is = -1 which is considered as a valid response, but later in PurchaseResponseActivityResultConverter.convertToTransaction the operation String purchaseDataString = responseData.getStringExtra("INAPP_PURCHASE_DATA"); results in a null string.
This is the full stack trace: Caused by: java.lang.NullPointerException at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:116) at org.json.JSONTokener.nextValue(JSONTokener.java:94) at org.json.JSONObject.<init>(JSONObject.java:155) at org.json.JSONObject.<init>(JSONObject.java:172) at com.badlogic.gdx.pay.android.googleplay.billing.converter.InAppPurchaseDataToTransactionConverter.convertJSONPurchaseToTransaction(InAppPurchaseDataToTransactionConverter.java:27) at com.badlogic.gdx.pay.android.googleplay.billing.converter.PurchaseResponseActivityResultConverter.convertToTransaction(PurchaseResponseActivityResultConverter.java:27) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.convertPurchaseResponseDataToTransaction(V3GoogleInAppBillingService.java:255) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.access$300(V3GoogleInAppBillingService.java:39) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$2.handleResultOk(V3GoogleInAppBillingService.java:240) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$2.onEvent(V3GoogleInAppBillingService.java:225) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.onGdxPayActivityEvent(V3GoogleInAppBillingService.java:393) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.access$800(V3GoogleInAppBillingService.java:39) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$V3GoogleInAppBillingServiceAndroidEventListener.onActivityResult(V3GoogleInAppBillingService.java:403) at com.badlogic.gdx.backends.android.AndroidApplication.onActivityResult(AndroidApplication.java:472)
Regards
The text was updated successfully, but these errors were encountered:
Ive been investigating this and refunded issue. Best i can come up with is that that these things dont quite work as real purchases in these cases. This in addition to #163 could probably be solved by throwing JSONException when in app data is null. What do you think?
Hi,
I have encountered an error when testing a Google Play static response product
Basically in the
V3GoogleInAppBillingService.GdxPayAsyncOperationResultListener
the result code is = -1 which is considered as a valid response, but later inPurchaseResponseActivityResultConverter.convertToTransaction
the operationString purchaseDataString = responseData.getStringExtra("INAPP_PURCHASE_DATA");
results in anull
string.This is the full stack trace:
Caused by: java.lang.NullPointerException at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:116) at org.json.JSONTokener.nextValue(JSONTokener.java:94) at org.json.JSONObject.<init>(JSONObject.java:155) at org.json.JSONObject.<init>(JSONObject.java:172) at com.badlogic.gdx.pay.android.googleplay.billing.converter.InAppPurchaseDataToTransactionConverter.convertJSONPurchaseToTransaction(InAppPurchaseDataToTransactionConverter.java:27) at com.badlogic.gdx.pay.android.googleplay.billing.converter.PurchaseResponseActivityResultConverter.convertToTransaction(PurchaseResponseActivityResultConverter.java:27) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.convertPurchaseResponseDataToTransaction(V3GoogleInAppBillingService.java:255) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.access$300(V3GoogleInAppBillingService.java:39) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$2.handleResultOk(V3GoogleInAppBillingService.java:240) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$2.onEvent(V3GoogleInAppBillingService.java:225) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.onGdxPayActivityEvent(V3GoogleInAppBillingService.java:393) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService.access$800(V3GoogleInAppBillingService.java:39) at com.badlogic.gdx.pay.android.googleplay.billing.V3GoogleInAppBillingService$V3GoogleInAppBillingServiceAndroidEventListener.onActivityResult(V3GoogleInAppBillingService.java:403) at com.badlogic.gdx.backends.android.AndroidApplication.onActivityResult(AndroidApplication.java:472)
Regards
The text was updated successfully, but these errors were encountered: