aws-sdk-android
aws-sdk-android copied to clipboard
Crash: java.lang.SecurityException Package android does not belong to 10347
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
Environment Information (please complete the following information):
- AWS Android SDK Version: 2.75.0
- Device: any
- Android Version: 11
- Specific to simulators: No
Thank you for the report @n0vah. We will have a look at this issue.
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
Fix released in v2.75.2