Jason.
Sounds great!
…now just remains why George has the issue.
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?
What build of Corona are you using?
I have a Nexus 7 with Android 5, and I don’t recall seeing this problem on it (I’m also using license checking). However it’s been a while since I deployed for Android, so I’ll have to have a second look just to make sure.
Nexus 7, Android 5.0.2
Corona build 2015.2550
I just tested one of my apps. I recompiled with 2015.2550 and the app successfully managed to validate the Google licensing without crashing.
One difference might be that this is an Enterprise project (compiled locally on my desktop).
I did a quick Google search and it looks like the crash could be caused by an Android app called Lucky Patcher.
Lucky Patcher is a cracking app that impersonates Google Play for license verification (and IAP) and it apparently can mess things up when run on Android 5.0
Thanks for the help, ingemar - the build of Corona used to generate the APK currently on Google Play was 2015.2533. There have been a handful of new daily builds since then, but none of the build notes mention anything about Google Play licensing. I’m doubtful that Lucky Patcher is the culprit in this case, only because I don’t imagine a Google QA tester would have cracking apps installed on their test devices (but hey - stranger things have happened).
Maybe it’s just time for me to get myself one of those Nexus 7s.
Thanks,
Jason
Yeah ;). It might be worth a shot asking them if you have a direct contact. Apparently this “tool” is not compatible with Lollipop and generates this exact crash unless removed… (and the fact that I don’t get a crash with Android 5.0 does make it a bit suspicious)
It looks like Corona might be using an implicit intent instead of an explicit one when checking the license, as noted in this reddit thread:
https://www.reddit.com/r/androiddev/comments/2jspqi/got_many_recent_reports_of_license_verification/
Can a Corona rep confirm this? I have received multiple reports from customers that can’t open my app because of this. I know for a fact that 2 of them don’t use any cracking applications.
Thanks,
George
Just following up: I did get a response from my contact at Google Play, and they confirm that Lucky Patcher is not the culprit here. According to them, “It’s specifically an Android 5.0 error that is happening across multiple devices. We do not use lucky patcher since test accounts are whitelisted for license checks/we buy the apps.”
So it looks like it’s an SDK regression-type bug related to changes in how licensing checks are handled in Lollipop, or possibly something to do with my own code, since I require the permissions for licensing but don’t actually do anything with that requirement. I have ordered a Nexus 7 so I can do some first-hand testing on a Lollipop device. Will report back once I get my hands on it and do some investigating.
I just upgraded my Nexus 7 to Lollipop and could reproduce the issue. What I ended up doing was removing the licensing in the Corona config for my project. This is not ideal, of course, but it will have to do. I tested it without licensing and it worked.
Hi @ingemar, @schroederapps, @george.faraj,
If you can accurately reproduce this as a bug, please file a bug report and emphasize that it’s a Lollipop 5.x issue in the notes for your report.
Thanks,
Brent
I have a Nexus 7 with Lollipop (5.0.2) and the Google license check works just fine.
I’m starting to wonder if this could be a build issue. My test projects are Enterprise which mean I compile locally without the need of Corona’s build servers. I always update to the latest Android build tools and I target API level 19.
Currently my Android SDK Tools are on version 24.0.2 and the Build Tools are on version 21.1.2. If this makes a difference or not, I’m not sure…
@george.faraj
Since I have an Enterprise subscription I have access to the java code for the Google license check.
I went though the code and Corona’s license check uses an explicit intent, so that’s not the problem.
Would it have been modified recently? I’m using build 2015.2534. I guess I could try upgrading.
I doubt that the code has changed recently, however it might be worth if you try with a newer version to rule it out.
@george.faraj
Just curious. Which version of Lollipop are you using? The first versions of Android 5 were quite buggy.
It’s version 5.0.1.
On my Nexus with 5.0.2 the Google Licensing check works as expected without any issues.
It would be interesting to find out why…
Finally got my Nexus 7 today, and updated it to 5.0.2. Installing my app from the Google Play store resulted in the expected bug and crash. However - side loading the app does not. I’m wondering if this is something that only impacts apps actually downloaded from Google Play (which would make sense, since that’s what the licensing check is for).
However, oddly enough, another app I have on Google Play downloaded and ran just fine. But in that app I actually call licensing.init() and licensing.verify(), unlike the app that is experiencing the crash. Perhaps that’s the issue? I’m going to upload a new version that calls licensing.init() & licensing.verify() to Google Play and see if that fixes things. I’ll report back.
@Ingemar - were you side loading apps to test this, or were you downloading from Google Play? Given my uneven results, I’m not sure it will matter, but it looks like the issue will not present itself on side loaded apps.