Neither user nor current process has android.permission.READ_PHONE_STATE

Hi all

I am seeing a lot of these errors in “crashes and ANR” section on Google play and customers complain the app doesn’t start.  I initial the Google IAP library min main.lua.  All crashes are being reported on Android 5.1.

This only affects a tiny percentage of customers and some days no crashes are logged so I don’t understand.  Any ideas?

java.lang.SecurityException: Requires READ_PHONE_STATE: Neither user 10075 nor current process has android.permission.READ_PHONE_STATE.

at android.os.Parcel.readException(Parcel.java:1546)

at android.os.Parcel.readException(Parcel.java:1499)

at com.android.vending.billing.IInAppBillingService$Stub$Proxy.getSkuDetails(IInAppBillingService.java:251)

at plugin.google.iap.v3.util.IabHelper.querySkuDetails(IabHelper.java:945)

at plugin.google.iap.v3.util.IabHelper.queryInventory(IabHelper.java:573)

at plugin.google.iap.v3.util.IabHelper$2.run(IabHelper.java:640)

at java.lang.Thread.run(Thread.java:818)

The permissions I ask for are

  android =

    {

      usesPermissions = { “android.permission.INTERNET”,

                          “android.permission.ACCESS_NETWORK_STATE”,

                          “android.permission.WRITE_EXTERNAL_STORAGE”,

                          “com.android.vending.BILLING”,

                          “com.android.vending.CHECK_LICENSE”, },

    },

Thanks

Adrian

http://stackoverflow.com/questions/26312733/neither-user-nor-current-process-has-android-permission-access-coarse-location

Hi Scott, that doesn’t help.  I am referring to Google IAP v3 (not location services) and why it needs READ_PHONE_STATE?

If we required READ_PHONE_STATE every user would crash due to the lack of it. Perhaps they are running rooted devices and some other process is trying to intercept the IAPs to make them free. Perhaps they have a weird Android fork that’s misbehaving. I would suggest asking around for someone with a device/OS combo that is generating the ANRs and try getting them to test your app and see if it crashes for them. In particular, if it’s a developer they can look at “adb logcat” and maybe find out what’s going on.

Rob

It only seems to be android 4.x and 5.1 that experience the issue.  It is a definitely Google play app issue that lots of devs are experiencing https://productforums.google.com/forum/#!topic/play/4LigT3eyQgk.  

For anyone else having this issue it has now been patched and hopefully all affected devices will be updated soon https://github.com/googlesamples/android-play-billing/issues/26

http://stackoverflow.com/questions/26312733/neither-user-nor-current-process-has-android-permission-access-coarse-location

Hi Scott, that doesn’t help.  I am referring to Google IAP v3 (not location services) and why it needs READ_PHONE_STATE?

If we required READ_PHONE_STATE every user would crash due to the lack of it. Perhaps they are running rooted devices and some other process is trying to intercept the IAPs to make them free. Perhaps they have a weird Android fork that’s misbehaving. I would suggest asking around for someone with a device/OS combo that is generating the ANRs and try getting them to test your app and see if it crashes for them. In particular, if it’s a developer they can look at “adb logcat” and maybe find out what’s going on.

Rob

It only seems to be android 4.x and 5.1 that experience the issue.  It is a definitely Google play app issue that lots of devs are experiencing https://productforums.google.com/forum/#!topic/play/4LigT3eyQgk.  

For anyone else having this issue it has now been patched and hopefully all affected devices will be updated soon https://github.com/googlesamples/android-play-billing/issues/26