Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crash due to SecurityException at AmplitudeClient.java:357 #321

Open
slice-sunil opened this issue Feb 14, 2022 · 1 comment
Open

App Crash due to SecurityException at AmplitudeClient.java:357 #321

slice-sunil opened this issue Feb 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@slice-sunil
Copy link

slice-sunil commented Feb 14, 2022

Expected Behavior

App Should not Crash

Current Behavior

App Crashes

Possible Solution

Log

Fatal Exception: java.lang.SecurityException: invalid package "****" for uid 10575 at android.os.Parcel.createExceptionOrNull(Parcel.java:2439) at android.os.Parcel.createException(Parcel.java:2423) at android.os.Parcel.readException(Parcel.java:2406) at android.os.Parcel.readException(Parcel.java:2348) at android.location.ILocationManager$Stub$Proxy.getFromLocation(ILocationManager.java:1784) at java.lang.reflect.Method.invoke(Method.java) at com.excelliance.kxqp.platform.c.b.a.a.invoke(a.java) at com.excelliance.kxqp.platform.c.b.a.ah.invoke(ah.java) at java.lang.reflect.Proxy.invoke(Proxy.java:1006) at $Proxy23.getFromLocation($Proxy23.java) at android.location.Geocoder.getFromLocation(Geocoder.java:133) at com.amplitude.api.DeviceInfo$CachedInfo.getCountryFromLocation(DeviceInfo.java:147) at com.amplitude.api.DeviceInfo$CachedInfo.getCountry(DeviceInfo.java:125) at com.amplitude.api.DeviceInfo$CachedInfo.<init>(DeviceInfo.java:66) at com.amplitude.api.DeviceInfo$CachedInfo.<init>(DeviceInfo.java:42) at com.amplitude.api.DeviceInfo.getCachedInfo(DeviceInfo.java:299) at com.amplitude.api.DeviceInfo.prefetch(DeviceInfo.java:305) at com.amplitude.api.AmplitudeClient.lambda$initializeInternal$1(AmplitudeClient.java:357) at com.amplitude.api.AmplitudeClient.lambda$initializeInternal$1$AmplitudeClient(AmplitudeClient.java) at com.amplitude.api.-$$Lambda$AmplitudeClient$bn6H_HFLLAh_pWs423q1XmlnK4Y.run(-.java:8) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:233) at android.os.Looper.loop(Looper.java:334) at android.os.HandlerThread.run(HandlerThread.java:67)

Environment

  • SDK Version: 2.32.1
  • Android API Level: Android 12
  • Device: vivo, realme, xiomi, oppo
@slice-sunil slice-sunil added the bug Something isn't working label Feb 14, 2022
@bohan-amplitude
Copy link
Contributor

bohan-amplitude commented Feb 15, 2022

Hi @slice-sunil,

Thank you for submitting issues here. This issue may be caused by deep customized android system that don't have google service framework installed. I added catching for the SecurityException in our SDK. It can also be prevented by using require feature. The fix for this issue will be release on new version ( >= 2.36.1). Please make sure to use the latest version of our SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants