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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

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()

,
via android.com by Unknown author

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

Solutions on the web

via GitHub by Perceval2507
, 1 year ago
getDeviceId: Neither user 10058 nor current process has android.permission.READ_PHONE_STATE.
via GitHub by biskazz
, 1 year ago
getDeviceId: Neither user 10225 nor current process has android.permission.READ_PHONE_STATE.
via GitHub by biskazz
, 1 year ago
getDeviceId: Neither user 10239 nor current process has android.permission.READ_PHONE_STATE.
via Stack Overflow by Bhargav
, 9 months ago
getDeviceId: Neither user 10240 nor current process has android.permission.READ_PHONE_STATE.
via Stack Overflow by santi
, 1 year ago
getDeviceId: Neither user 10111 nor current process has android.permission.READ_PHONE_STATE.
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 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)

Users with the same issue

Once, 3 days ago
Once, 4 weeks ago
Once, 1 month ago
Once, 1 month ago
7 times, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.