aws-sdk-android icon indicating copy to clipboard operation
aws-sdk-android copied to clipboard

Crash: java.lang.SecurityException Package android does not belong to 10347

Open n0vah opened this issue 1 year ago • 2 comments

Describe the bug Some users on Android 11 and usually on background have crash SecurityException in EventRecorder.isNetworkAvailable

Stack trace

Fatal Exception: java.lang.SecurityException: Package android does not belong to 10347
       at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
       at android.os.Parcel.createException(Parcel.java:2357)
       at android.os.Parcel.readException(Parcel.java:2340)
       at android.os.Parcel.readException(Parcel.java:2282)
       at android.net.IConnectivityManager$Stub$Proxy.getNetworkCapabilities(IConnectivityManager.java:2543)
       at android.net.ConnectivityManager.getNetworkCapabilities(ConnectivityManager.java:1415)
       at com.amazonaws.mobileconnectors.pinpoint.internal.event.EventRecorder.isNetworkAvailable(EventRecorder.java:698)
       at com.amazonaws.mobileconnectors.pinpoint.internal.event.EventRecorder.access$100(EventRecorder.java:77)
       at com.amazonaws.mobileconnectors.pinpoint.internal.event.EventRecorder$1.run(EventRecorder.java:255)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

Which AWS service(s) are affected?

Screenshots image

Environment Information (please complete the following information):

  • AWS Android SDK Version: 2.75.0
  • Device: any
  • Android Version: 11
  • Specific to simulators: No

n0vah avatar May 21 '24 09:05 n0vah

Thank you for the report @n0vah. We will have a look at this issue.

mattcreaser avatar May 21 '24 13:05 mattcreaser

This appears to be an Android 11 bug. We will look to try/catch around the Android ConnectivityManager to avoid this crash. https://issuetracker.google.com/issues/175055271?pli=1

tylerjroach avatar Jun 12 '24 14:06 tylerjroach

Fix released in v2.75.2

phantumcode avatar Jul 26 '24 14:07 phantumcode