Google IAP v3 crash

Hi, 

just got this kind of crash log from a customer. To me it looks like it crashes in Google IAP v3 but is there something I can do about it? 

Jyrki


Android version

 
Android 2.3.3 - 2.3.71

Device

 
H866C (hwh866c)

java.lang.IllegalStateException: Lua state is closed

at com.naef.jnlua.LuaState.check(Unknown Source)
at com.naef.jnlua.LuaState.rawGet(Unknown Source)
at plugin.google.iap.v3.LuaLoader$1.onIabSetupFinished(LuaLoader.java:148)
at plugin.google.iap.v3.util.IabHelper$1.onServiceConnected(IabHelper.java:262)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1064)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1081)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3695)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
at dalvik.system.NativeStart.main(Native Method)

 

Recently updated to v3 as well and started to received these errors as soon as I switched as well…

I tested 20 some apps I switched to v3 and didnt have any issues.  Would love to know what is going on.

Scott

Hi guys,

Can we please have a Corona build number for this report?

Thanks,

Brent

I am using build 2393
 
Here are two that I received today:

java.lang.IllegalStateException: Lua state is closed
at com.naef.jnlua.LuaState.check(Unknown Source)
at com.naef.jnlua.LuaState.rawGet(Unknown Source)
at plugin.google.iap.v3.LuaLoader$1.onIabSetupFinished(LuaLoader.java:148)
at plugin.google.iap.v3.util.IabHelper$1.onServiceConnected(IabHelper.java:262)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1097)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1114)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4949)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1043)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
at dalvik.system.NativeStart.main(Native Method)

java.lang.IllegalStateException: Lua state is closed
at com.naef.jnlua.LuaState.check(Unknown Source)
at com.naef.jnlua.LuaState.rawGet(Unknown Source)
at plugin.google.iap.v3.LuaLoader$1.onIabSetupFinished(LuaLoader.java:148)
at plugin.google.iap.v3.util.IabHelper$1.onServiceConnected(IabHelper.java:262)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1120)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1137)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)

Recently updated to v3 as well and started to received these errors as soon as I switched as well…

I tested 20 some apps I switched to v3 and didnt have any issues.  Would love to know what is going on.

Scott

Hi guys,

Can we please have a Corona build number for this report?

Thanks,

Brent

I am using build 2393
 
Here are two that I received today:

java.lang.IllegalStateException: Lua state is closed
at com.naef.jnlua.LuaState.check(Unknown Source)
at com.naef.jnlua.LuaState.rawGet(Unknown Source)
at plugin.google.iap.v3.LuaLoader$1.onIabSetupFinished(LuaLoader.java:148)
at plugin.google.iap.v3.util.IabHelper$1.onServiceConnected(IabHelper.java:262)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1097)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1114)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4949)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1043)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
at dalvik.system.NativeStart.main(Native Method)

java.lang.IllegalStateException: Lua state is closed
at com.naef.jnlua.LuaState.check(Unknown Source)
at com.naef.jnlua.LuaState.rawGet(Unknown Source)
at plugin.google.iap.v3.LuaLoader$1.onIabSetupFinished(LuaLoader.java:148)
at plugin.google.iap.v3.util.IabHelper$1.onServiceConnected(IabHelper.java:262)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1120)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1137)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)

Any update on this?

Hi @scottadelman, @perflubron,

Can you please try using the latest public build, #2511? This could be an issue that was fixed in the off cycle, and I’d like to confirm before moving forward on this.

Thanks,

Brent

I’ve seen the error in post #1  happen from a user as well.  They used:

  1. Android 4.41

 
Galaxy Tab4 8.0 (milletwifiue)

I’ll rebuild with the latest public build and will follow up if I get this issue reported again.

Crash still being reported from APK builds using last Corona public build, 2014.2511

On my new app version with public build 2511, got a message from a user today… might be related:

java.lang.NullPointerException
at plugin.google.iap.v3.util.IabHelper.queryPurchases(IabHelper.java:817)
at plugin.google.iap.v3.util.IabHelper.queryInventory(IabHelper.java:540)
at plugin.google.iap.v3.util.IabHelper$2.run(IabHelper.java:613)
at java.lang.Thread.run(Thread.java:856)

Device: rk2928sdk, Android 4.1

Same problem game freezes then crashes.

No succesfull purchases in financial  from game update this night.

According to user reviews - restore also freezes game.

Getting random reports of this happening to players too. Only with a couple of the IAPs in the game though. 80% of them work perfectly (mix of managed and unmanaged) but a couple of them aren’t working for one of my players.

We will need a reproducible test case do be able to look into this.  It would be really nice to have more of the console log on the device’s that it’s crashing on. 

Rob

I have the same problem.
My app is freezing.
I’m using the latest version corona.

Any news yet? What about the compatibility with the v2 versions ‘old’ customers bought their versions with?

As far as I know the “crash” bug has been fixed.  If  you’re still crashing we need to analyze the reason.  We will need to know your config.lua, build.settings, version, see your store code, etc.  Also can you build the SampleCode/Store/InAppPurchases sample app.

I need you to run:

adb logcat

with no other parameters and look for any messages both from Corona and from Google Play, post those.

Now as far as V2 vs V3 compatibility, I don’t believe there are any server differences that affects the ability for one version of your app to run on V2 and the other on V3.  V3 requires that consumables be “consumed” before they can be bought again.  I’m not sure how that impacts V2.

Rob

Any update on this?

Hi @scottadelman, @perflubron,

Can you please try using the latest public build, #2511? This could be an issue that was fixed in the off cycle, and I’d like to confirm before moving forward on this.

Thanks,

Brent