Android crashes in android.vending.licensing.LicenseChecker

Hi,

We use the Crashlytics plugin in our game to get some useful information when the player went crash. And now we got a crash report from Crashlytics, the detail is shown at below:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes()' on a null object reference
       at com.google.android.vending.licensing.LicenseValidator.verify(LicenseValidator.java:99)
       at com.google.android.vending.licensing.LicenseChecker$ResultListener$2.run(LicenseChecker.java:233)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:234)
       at android.os.HandlerThread.run(HandlerThread.java:61)

After some research, this exception might occur when the player uses the service of google play, but he had never login his google account before. So is there anyway to prevent this exception in game project without modifying the Java file of LicenseChecker ?

Hello wingedrobin,

I apologize for the delay but I’m currently looking into if this is possible to do. If you’ve already found a solution to the issue, please feel free to share it here but otherwise I’ll get back to you with more information.

Hi Matthew,

Thanks for your reply. We are now works on the crashes that we can resolve immediately, so we just gave this issue a lower priority. If you know how to reproduce this issue, maybe we can provide you more useful information.