Android 12 crash java.lang.SecurityException

16 Comments

  • Eric Nelson
    Zendesk Developer Advocacy
    Hey there,

    Is this crash happening for all files or only one in particular? 
    0
  • Jav san

    Hi Eric,

    Unfortunately, that's all the information i got from firebase.

    0
  • Eric Nelson
    Zendesk Developer Advocacy
    Hey Jav,

    Hmm based on the error it seems that either a file (most likely a local cache of one) was attempted to be accessed after it was deleted, or sanitized due to it being potentially malicious. This is something handled at the android level and then brought downstream to the sdk. It's possible this is just a one off. Are you consistently getting this error from firebase or was this only received in a certain period of time?
    0
  • Jav san

    Hi Eric,

    We are getting 1-2 every day.

    0
  • Eric Nelson
    Zendesk Developer Advocacy
    Hey Jav,
     
    Does it always have the same UID? If so have you been able to identify the associated user? 
    0
  • Jav san

    Hi Eric

    It's different users, with different phone models, but all of them with android 12

    0
  • Jav san

    Hi Eric, 

    Any luck with this crash?

    0
  • Eric Nelson
    Zendesk Developer Advocacy
    Hey Jav,

    I've passed this along to the corresponding dev team. Have you checked with the users affected to see if this causing an actual crash of the application? At the moment we think this is just a caching issue that they're looking to address in a future release. If it's causing a full crash of the app for the user and isn't just background noise, this will obviously take a higher priority.

    Thanks!
    0
  • Kapindran Kulandaivelu

    Hey Eric Nelson,

    Any updates regarding this crash? Have been noticing this issue for a while now, most of the crashes are being recorded on Samsung devices running Android 12. There seems to be no user-specific information available at the moment and was unable to reproduce this crash at will.
    Thanks in advance.

    1
  • Nikolai Podonin

    Have the same crash on Samsung with Android 12

    0
  • Onur Okutan
    Zendesk Product Manager

    Hi Nikolai,

    Which version of our SDK are you using? If you can upgrade to the latest version, the problem should be resolved. If not, let me know please.

    Thanks!

    0
  • Aleksandr Vakhtin

    Still reproducing

    com.zendesk:support -> version 5.0.7


    Steps:

    • Open chat (creating request)
    • Select one or more files
    • Send it
    • Tap on image in chat right after sending
    E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.appclose.androidapp, PID: 6908
        java.lang.SecurityException: UID 10149 does not have permission to content://media/external/file/36 [user 0]
            at android.os.Parcel.createExceptionOrNull(Parcel.java:2425)
            at android.os.Parcel.createException(Parcel.java:2409)
            at android.os.Parcel.readException(Parcel.java:2392)
            at android.os.Parcel.readException(Parcel.java:2334)
            at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2326)
            at android.app.Instrumentation.execStartActivity(Instrumentation.java:1758)
            at android.app.Activity.startActivityForResult(Activity.java:5407)
            at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:705)
            at android.app.Activity.startActivityForResult(Activity.java:5365)
            at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:686)
            at android.app.Activity.startActivity(Activity.java:5751)
            at android.app.Activity.startActivity(Activity.java:5704)
            at zendesk.support.request.CellBindHelper.openAttachment(CellBindHelper.java:100)
            at zendesk.support.request.CellBindHelper.access$000(CellBindHelper.java:32)
            at zendesk.support.request.CellBindHelper$3.onClick(CellBindHelper.java:87)
            at android.view.View.performClick(View.java:7455)
            at android.view.View.performClickInternal(View.java:7432)
            at android.view.View.access$3700(View.java:835)
            at android.view.View$PerformClick.run(View.java:28810)
            at android.os.Handler.handleCallback(Handler.java:938)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loopOnce(Looper.java:201)
            at android.os.Looper.loop(Looper.java:288)
            at android.app.ActivityThread.main(ActivityThread.java:7842)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
         Caused by: android.os.RemoteException: Remote stack trace:
            at com.android.server.uri.UriGrantsManagerService.checkGrantUriPermissionUnlocked(UriGrantsManagerService.java:1254)
            at com.android.server.uri.UriGrantsManagerService.checkGrantUriPermissionFromIntentUnlocked(UriGrantsManagerService.java:621)
            at com.android.server.uri.UriGrantsManagerService.access$1000(UriGrantsManagerService.java:107)
            at com.android.server.uri.UriGrantsManagerService$LocalService.checkGrantUriPermissionFromIntent(UriGrantsManagerService.java:1410)
            at com.android.server.wm.ActivityStarter$Request.resolveActivity(ActivityStarter.java:539)
    0
  • Greg Katechis
    Zendesk Developer Advocacy

    Hi Aleksandr! That trace is indicating that you need to receive permission to access files on that device. I would recommend reading the appropriate docs for Android's permissions and update your app accordingly.

    -1
  • Aleksandr Vakhtin

    Hello Greg, hope you are well and safe,


    Of course I'm asking system for files(media) permissions. I've checked asking it right before open zendesk manually and automatically by zendesk sdk itself. The same result with crash.
    I would like at least to have suppressed exception at this place.

    0
  • Aleksandr Vakhtin

    As I understand, it was related granular media permissions which was introduced in android 12
    It was fixed in zendesk 5.1.0. I updated to it recently and all working fine

    Thanks for helping, Greg

    0
  • Chidozie Peter Ugboma

    @Aleksandr Vakhtin what lib did you update ?

    0

Please sign in to leave a comment.

Powered by Zendesk