java.lang.SecurityException

getDeviceId: Neither user 10058 nor current process has android.permission.READ_PHONE_STATE.

Samebug tips5

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

You need to request READ_PHONE_STATE permissions before using of this method.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1270

  • getDeviceId: Neither user 10058 nor current process has android.permission.READ_PHONE_STATE.
  • via Unknown by rafael, 4 months ago
    The owner protected this stack trace.
  • via GitHub by Perceval2507
    , 10 months ago
    getDeviceId: Neither user 10058 nor current process has android.permission.READ_PHONE_STATE.
  • Stack trace

    • java.lang.SecurityException: getDeviceId: Neither user 10058 nor current process has android.permission.READ_PHONE_STATE. at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at com.android.internal.telephony.ITelephony$Stub$Proxy.getDeviceId(ITelephony.java:4426) at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:731) at com.umeng.message.proguard.r.a(Unknown Source) at org.android.agoo.c.c.e.a(Unknown Source) at org.android.agoo.c.c.h.b(Unknown Source) at org.android.agoo.impl.ControlService.c(Unknown Source) at org.android.agoo.impl.ControlService.onHandleIntent(Unknown Source) at org.android.agoo.client.BaseIntentService.onHandleIntent(Unknown Source) at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:207) at android.os.HandlerThread.run(HandlerThread.java:61)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    669 times, 1 week ago
    6 times, 3 months ago
    31 times, 4 months ago
    Once, 6 months ago
    Unknown user
    Once, 9 months ago
    232 more bugmates