Google Play Licensing Runtime Error in Android 5.x

@schroederapps

I have no issues with side-loaded apps or apps downloaded from the Google Play Store on my Nexus 7 with 5.0.2.

I *do* call init() and verify(), so maybe that’s the difference? I don’t know.

The app that’s live on Google Play was compiled with Corona build 2014.2393 and the side-loaded app was compiled with 2015.2552, so it doesn’t look like the issue has anything to do with newer/older versions of Corona either.

Well, I’m happy (and a little embarrassed) to report that this all seems to have been my fault. I threw in a very simple license verification (calling licensing.init() and then licensing.verify() ), uploaded that modified build to Google Play and voila! Everything works as expected on Lollipop.

I guess this is a good reminder not to include permissions or libraries that we don’t actually use. How stupid of me not to bother to include a licensing verification after taking the time to require the license permission in build.settings and register the license hash in my config.lua! But, all’s well that ends well. Thanks guys for helping me work this through.

Jason.

Sounds great!

…now just remains why George has the issue.

Actually, I hadn’t called init() and verify() either, so I think the case is closed. I was under the wrong impression that it would do the check automatically if the hash was specified. It’s a strange error, nonetheless. Why would it be happening if I’m not calling the licensing?

We’re having the exact same issues in an app that uses Expansion Files.

We’ve tried implementing the .init/.verify fix suggested above, but it keeps throwing the error (possibly because main.lua doesn’t get a chance to run until all the expansion files have been downloaded?)

Here’s the log:

java.lang.RuntimeException: /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/android/ndk/shell.lua:122: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.android.vending.licensing.ILicensingService } Java Stack Trace: android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1674) android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1773) android.app.ContextImpl.bindService(ContextImpl.java:1751) android.content.ContextWrapper.bindService(ContextWrapper.java:538) com.google.android.vending.licensing.LicenseChecker.checkAccess(LicenseChecker.java:149) CoronaProvider.licensing.google.LuaLoader.verify(LuaLoader.java:202) CoronaProvider.licensing.google.LuaLoader$VerifyWrapper.invoke(LuaLoader.java:435) com.ansca.corona.JavaToNativeShim.nativeResize(Native Method) com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:372) com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:374) com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1611) com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377) stack traceback: [C]: ? [C]: in function 'verify' /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/android/ndk/shell.lua:122: in function 'sdCardChecker' /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/android/ndk/shell.lua:432: in main chunk

Any idea?