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

GitHub | barbeau | 10 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael and rp . Or join the community to write better ones.
  1. 0

    GitHub comment 330#228449487

    GitHub | 10 months ago | barbeau
    java.lang.SecurityException: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.
  2. 0

    SecurityException when trying to access location when user has denied permission

    GitHub | 10 months ago | barbeau
    java.lang.SecurityException: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.
  3. 0
    samebug 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 goo.gl
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    You should add the permission android.permission.READ_EXTERNAL_STORAGE to your manifest file.
  6. 0

    SecurityException: not allowed to perform OP_READ_PHONE_STATE

    Stack Overflow | 7 months ago | kencorbin
    java.lang.SecurityException: com.android.phone from uid 10134 not allowed to perform OP_READ_PHONE_STATE
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.SecurityException

    Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.

    at android.os.Parcel.readException()
  2. Android Platform
    Parcel.readException
    1. android.os.Parcel.readException(Parcel.java:1620)
    2. android.os.Parcel.readException(Parcel.java:1573)
    2 frames
  3. com.google.android
    LocationClient.getLastLocation
    1. com.google.android.gms.internal.lx$a$a.bW(Unknown Source)
    2. com.google.android.gms.internal.ly.getLastLocation(Unknown Source)
    3. com.google.android.gms.internal.lz.getLastLocation(Unknown Source)
    4. com.google.android.gms.location.LocationClient.getLastLocation(Unknown Source)
    4 frames
  4. com.joulespersecond.seattlebusbot
    StopMapController.onLoadComplete
    1. com.joulespersecond.seattlebusbot.util.LocationHelp.getLocation2(LocationHelp.java:103)
    2. com.joulespersecond.seattlebusbot.map.StopMapController.onLoadFinished(StopMapController.java:274)
    3. com.joulespersecond.seattlebusbot.map.StopMapController.onLoadComplete(StopMapController.java:309)
    4. com.joulespersecond.seattlebusbot.map.StopMapController.onLoadComplete(StopMapController.java:135)
    4 frames
  5. Android Support v4
    Loader.deliverResult
    1. android.support.v4.content.Loader.deliverResult(Loader.java:104)
    1 frame
  6. com.joulespersecond.seattlebusbot
    StopMapController$StopsLoader.deliverResult
    1. com.joulespersecond.seattlebusbot.map.StopMapController$StopsLoader.deliverResult(StopMapController.java:378)
    2. com.joulespersecond.seattlebusbot.map.StopMapController$StopsLoader.deliverResult(StopMapController.java:340)
    2 frames
  7. Android Support v4
    ModernAsyncTask$InternalHandler.handleMessage
    1. android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:223)
    2. android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:61)
    3. android.support.v4.content.ModernAsyncTask.finish(ModernAsyncTask.java:461)
    4. android.support.v4.content.ModernAsyncTask.access$500(ModernAsyncTask.java:47)
    5. android.support.v4.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:474)
    5 frames
  8. Android Platform
    ActivityThread.main
    1. android.os.Handler.dispatchMessage(Handler.java:102)
    2. android.os.Looper.loop(Looper.java:158)
    3. android.app.ActivityThread.main(ActivityThread.java:7224)
    3 frames
  9. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  10. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
    2 frames