poiuytrez / AndroidInAppBilling

Android App Billing plugin for Cordova
173 stars 144 forks source link

Index 1 out of range [0..1] #113

Closed RegencySoftware closed 7 years ago

RegencySoftware commented 7 years ago

Before posting I reviewed your question list and verified everything. I have my app published in Alpha, all items are active, my email / device account is opted in, my version# of the app is what is published.

When I run Init I get the following error: "Index 1 out of range [0..1]"

plugin name="com.smartmobilesoftware.inappbilling" param name="BILLING_KEY" value="MIIB..." plugin

I am using the code sample for this plug-in and run the init after device ready.

function initializeStore_sm() { // Initialize the billing plugin inappbilling.init(successHandler, errorHandler, { showLog: true }); }

function successHandler(result) { var strResult = ""; if (typeof result === 'object') { strResult = JSON.stringify(result); } else { strResult = result; } alert("SUCCESS: \r\n" + strResult); }

Any help would be appreciated.

RegencySoftware commented 7 years ago

There is another open issue that mentions this can be solved by passing a product id. That solved the issue, but then showed another problem that the app will crash after the first purchase.