Hello.
We have encountered a bug where the google V3 iap plugin crashes if a purchase is attempted after the app has been suspended for a extended period of time. We have checked that the plugin exists and that the item is correct upon the crash. The call that crashes is “store.purchase”.
Purchases work correctly otherwise, even after shorter suspends.
Does anyone have any more info on this? Is this a known issue?
The crash gives the following stacktrace in logcat:
05-13 11:10:01.235: I/Corona(29586): Runtime error 05-13 11:10:01.235: I/Corona(29586): java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle com.android.vending.billing.IInAppBillingService.getBuyIntent(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)' on a null object reference 05-13 11:10:01.235: I/Corona(29586): Java Stack Trace: 05-13 11:10:01.235: I/Corona(29586): plugin.google.iap.v3.util.IabHelper.launchPurchaseFlow(IabHelper.java:390) 05-13 11:10:01.235: I/Corona(29586): plugin.google.iap.v3.util.IabHelper.launchPurchaseFlow(IabHelper.java:342) 05-13 11:10:01.235: I/Corona(29586): plugin.google.iap.v3.util.IabHelper.launchPurchaseFlow(IabHelper.java:337) 05-13 11:10:01.235: I/Corona(29586): plugin.google.iap.v3.LuaLoader.purchase(LuaLoader.java:314) 05-13 11:10:01.235: I/Corona(29586): plugin.google.iap.v3.LuaLoader.access$1400(LuaLoader.java:34) 05-13 11:10:01.235: I/Corona(29586): plugin.google.iap.v3.LuaLoader$PurchaseWrapper.invoke(LuaLoader.java:424) 05-13 11:10:01.235: I/Corona(29586): com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method) 05-13 11:10:01.235: I/Corona(29586): com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:413) 05-13 11:10:01.235: I/Corona(29586): com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39) 05-13 11:10:01.235: I/Corona(29586): com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatc
More:
05-13 11:21:39.737: E/AndroidRuntime(29586): FATAL EXCEPTION: main 05-13 11:21:39.737: E/AndroidRuntime(29586): Process: com.foo.bar, PID: 29586 05-13 11:21:39.737: E/AndroidRuntime(29586): java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle com.android.vending.billing.IInAppBillingService.getBuyIntent(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)' on a null object reference 05-13 11:21:39.737: E/AndroidRuntime(29586): Java Stack Trace: 05-13 11:21:39.737: E/AndroidRuntime(29586): plugin.google.iap.v3.util.IabHelper.launchPurchaseFlow(IabHelper.java:390) 05-13 11:21:39.737: E/AndroidRuntime(29586): plugin.google.iap.v3.util.IabHelper.launchPurchaseFlow(IabHelper.java:342) 05-13 11:21:39.737: E/AndroidRuntime(29586): plugin.google.iap.v3.util.IabHelper.launchPurchaseFlow(IabHelper.java:337) 05-13 11:21:39.737: E/AndroidRuntime(29586): plugin.google.iap.v3.LuaLoader.purchase(LuaLoader.java:314) 05-13 11:21:39.737: E/AndroidRuntime(29586): plugin.google.iap.v3.LuaLoader.access$1400(LuaLoader.java:34) 05-13 11:21:39.737: E/AndroidRuntime(29586): plugin.google.iap.v3.LuaLoader$PurchaseWrapper.invoke(LuaLoader.java:424) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:413) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:148) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.events.EventManager.sendEvents(EventManager.java:87) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.Controller.updateRuntimeState(Controller.java:281) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:417) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1622) 05-13 11:21:39.737: E/AndroidRuntime(29586): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377) 05-13 11:21:39.737: E/AndroidRuntime(29586): stack traceback: 05-13 11:21:39.737: E/AndroidRuntime(29586): [C]: ? 05-13 11:21:39.737: E/AndroidRuntime(29586): [C]: in function 'purchase' 05-13 11:21:39.737: E/AndroidRuntime(29586): ?: in function 'buyThis' 05-13 11:21:39.737: E/AndroidRuntime(29586): ?: in function '?' 05-13 11:21:39.737: E/AndroidRuntime(29586): ?: in function 'onRelease' 05-13 11:21:39.737: E/AndroidRuntime(29586): ?: in function '\_onEvent' 05-13 11:21:39.737: E/AndroidRuntime(29586): ?: in function '?' 05-13 11:21:39.737: E/AndroidRuntime(29586): ?: in function \<?:677\> 05-13 11:21:39.737: E/AndroidRuntime(29586): ?: in function \<?:218\>