Hello!
I discovered strange behavior in iap.list
function. More than 20 entries of product ids trigger an error:
E/defold ( 9303): ERROR:IAP: Failed to parse product response (0)
D/defold ( 9303): DEBUG:SCRIPT:
D/defold ( 9303): { --[[0x7f4b977a20]]
D/defold ( 9303): error = { --[[0x7f4b977900]]
D/defold ( 9303): error = "failed to parse product response",
D/defold ( 9303): reason = 0
D/defold ( 9303): }
D/defold ( 9303): }
While 20 entries or less works as expected:
D/defold ( 8878): DEBUG:SCRIPT:
D/defold ( 8878): { --[[0x7f4b21da90]]
D/defold ( 8878): products = { --[[0x7f4b21d630]]
D/defold ( 8878): shop_money_01 = { --[[0x7f4b21d6c0]]
D/defold ( 8878): price = 2.22,
D/defold ( 8878): currency_code = "USD",
D/defold ( 8878): title = "#1 Few rubies (30)",
D/defold ( 8878): ident = "shop_money_01",
D/defold ( 8878): description = "Use to buy energy or accelerate craft",
D/defold ( 8878): price_string = "$2.22",
D/defold ( 8878): skuDetailsToken = "...some sku token..."
D/defold ( 8878): }
D/defold ( 8878): }
D/defold ( 8878): }
Code to reproduce:
iap.list(
{
--doesn't matter is there unique ids or not
--bug found on unique ids
--just comment one random entry to get iap.list working
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
"shop_money_01",
},
function(_, products, error)
pprint({ products = products, error = error })
end
)
Tested on Android. And I am assuming that same bug will be on IOS, because native APIs doesn’t have any limits in this functionality