java.lang.SecurityException: Neither user 10031 nor current process has android.permission.DEVICE_POWER.

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

,
Expert tip

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest

Solutions on the web

via Stack Overflow by user2879697
, 1 year ago
Neither user 10031 nor current process has android.permission.DEVICE_POWER.
via Stack Overflow by jay
, 2 years ago
ConnectivityService: Neither user 10076 nor current process has android.permission.ACCESS_NETWORK_STATE.
via Stack Overflow by Barnali Bhattacharjee
, 8 months ago
getImei: Neither user 10122 nor current process has android.permission.READ_PHONE_STATE.
via GitHub by assiziv
, 1 year ago
ConnectivityService: Neither user 10128 nor current process has android.permission.ACCESS_NETWORK_STATE.
via GitHub by Tnnnguyen
, 5 months ago
Need BLUETOOTH permission: Neither user 10259 nor current process has android.permission.BLUETOOTH.
via xda-developers.com by Unknown author, 1 year ago
Neither user 10182 nor current process has android.permission.DEVICE_POWER.
java.lang.SecurityException: Neither user 10031 nor current process has android.permission.DEVICE_POWER.
at android.os.Parcel.readException(Parcel.java:1465)
at android.os.Parcel.readException(Parcel.java:1419)
at android.os.IPowerManager$Stub$Proxy.goToSleep(IPowerManager.java:441)
at android.os.PowerManager.goToSleep(PowerManager.java:481)
at com.mdt.hds.service.RemoteService$MessageHandler.handleMessage(RemoteService.java:53)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 17 hours ago
Samebug visitor profile picture
Unknown user
Once, 19 hours ago
Samebug visitor profile picture
Unknown user
Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 2 days ago
254 more bugmates

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