java.lang.SecurityException: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.

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 barbeau
, 1 year ago
Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.
via GitHub by barbeau
, 1 year ago
Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.
via Stack Overflow by liv_fc
, 11 months ago
Permission Denial: starting Intent { act=android.intent.action.SEND_MULTIPLE typ=image/* flg=0x3 cmp=com.google.android.gm/.ComposeActivityGmail clip={image/* U:file:///storage/emulated/0/Mydir/myfile20161213105548.jpg} (has extras) } from ProcessRecord{cc9833c 18570:com.myappdr/u0a341} (pid=18570, uid=10341) not exported from uid 10050
via GitHub by kordianbruck
, 1 year ago
Permission Denial: opening provider com.android.providers.calendar.CalendarProvider2 from ProcessRecord{712a0d6 25897:de.tum.in.tumcampus/u0a216} (pid=25897, uid=10216) requires android.permission.READ_CALENDAR or android.permission.WRITE_CALENDAR
via GitHub by Jonahss
, 2 years ago
Permission Denial: starting Intent { flg=0x10000000 cmp=com.android.contacts/.ContactsListActivity } from null (pid=13312, uid=2000) not exported from uid 10013
via Stack Overflow by RekaB
, 2 years ago
Permission Denial: starting instrumentation ComponentInfo{io.selendroid.io.selendroid.testapp/io.selendroid.server.ServerInstrumentation} from pid=26099, uid=26099 not allowed because package io.selendroid.io.selendroid.testapp does not have a signature matching the target io.selendroid.testapp
java.lang.SecurityException: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.
at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at com.google.android.gms.internal.lx$a$a.bW(Unknown Source)
at com.google.android.gms.internal.ly.getLastLocation(Unknown Source)
at com.google.android.gms.internal.lz.getLastLocation(Unknown Source)
at com.google.android.gms.location.LocationClient.getLastLocation(Unknown Source)
at com.joulespersecond.seattlebusbot.util.LocationHelp.getLocation2(LocationHelp.java:103)
at com.joulespersecond.seattlebusbot.map.StopMapController.onLoadFinished(StopMapController.java:274)
at com.joulespersecond.seattlebusbot.map.StopMapController.onLoadComplete(StopMapController.java:309)
at com.joulespersecond.seattlebusbot.map.StopMapController.onLoadComplete(StopMapController.java:135)
at com.joulespersecond.seattlebusbot.map.StopMapController$StopsLoader.deliverResult(StopMapController.java:378)
at com.joulespersecond.seattlebusbot.map.StopMapController$StopsLoader.deliverResult(StopMapController.java:340)
at android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:223)
at android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:61)
at android.support.v4.content.ModernAsyncTask.finish(ModernAsyncTask.java:461)
at android.support.v4.content.ModernAsyncTask.access$500(ModernAsyncTask.java:47)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Users with the same issue

9 times, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
12 times, 1 year ago

Write tip

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