question

cesar avatar image
cesar asked

org.json.JSONException: No value for priceJson

Getting an exception when trying to load product data passing the subscription "parent" sku to getProductData. If I pass the term sku I don't get the exception. For example I have a subscription with sku "premium.subscription.notrial" which has a weekly "premium.subscription.notrial.weekly" product. If I pass "premium.subscription.notrial" to getProductData, I get the exception, if I pass "premium.subscription.notrial.weekly" I get the correct Product.

I've noticed this only happens when using the App Tester app. It doesn't occur in Live App testing. My App Tester's JSON is directly downloaded from the Amazon Developer portal and it matches my Live App testing configuration.

screen-shot-2022-02-03-at-33835-pm.png



E/c: Error parsing item data output

org.json.JSONException: No value for priceJson

at org.json.JSONObject.get(JSONObject.java:392)

at org.json.JSONObject.getJSONObject(JSONObject.java:612)

at com.amazon.device.iap.internal.a.c.a(SandboxRequestHandler.java:365)

at com.amazon.device.iap.internal.a.c.d(SandboxRequestHandler.java:347)

at com.amazon.device.iap.internal.a.c.c(SandboxRequestHandler.java:315)

at com.amazon.device.iap.internal.a.c.a(SandboxRequestHandler.java:201)

at com.amazon.device.iap.internal.d.a(PurchasingManager.java:130)

at com.amazon.device.iap.ResponseReceiver.onReceive(ResponseReceiver.java:47)

at android.app.ActivityThread.handleReceiver(ActivityThread.java:3406)

at android.app.ActivityThread.access$1200(ActivityThread.java:207)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1670)

at android.os.Handler.dispatchMessage(Handler.java:106)

at android.os.Looper.loop(Looper.java:193)

at android.app.ActivityThread.main(ActivityThread.java:6740)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

iaplive app testing
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

cesar avatar image
cesar answered

I've realized this is not an issue anymore in 3.0.2.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.