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

SecurityException in Utils.getDeviceNetworkType() #147

Closed
rizalferdian opened this issue Jan 18, 2021 · 10 comments
Closed

SecurityException in Utils.getDeviceNetworkType() #147

rizalferdian opened this issue Jan 18, 2021 · 10 comments
Labels
issue Acknowledge as issue

Comments

@rizalferdian
Copy link

There were many crashes reported related to Utils.java class in our apps. we use clevertap v4.0.0

Stack Trace

Fatal Exception: java.lang.SecurityException: Neither user 10156 nor current process has android.permission.MODIFY_PHONE_STATE.
       at android.os.Parcel.createException(Parcel.java:1966)
       at android.os.Parcel.readException(Parcel.java:1934)
       at android.os.Parcel.readException(Parcel.java:1884)
       at com.android.internal.telephony.ITelephony$Stub$Proxy.getNetworkType(ITelephony.java:4233)
       at android.telephony.TelephonyManager.getNetworkType(TelephonyManager.java:2747)
       at com.clevertap.android.sdk.Utils.getDeviceNetworkType(Utils.java:282)
       at com.clevertap.android.sdk.DeviceInfo$DeviceCachedInfo.getNetworkType(DeviceInfo.java:172)
       at com.clevertap.android.sdk.DeviceInfo$DeviceCachedInfo.<init>(DeviceInfo.java:67)
       at com.clevertap.android.sdk.DeviceInfo.getDeviceCachedInfo(DeviceInfo.java:518)
       at com.clevertap.android.sdk.DeviceInfo.access$100(DeviceInfo.java:21)
       at com.clevertap.android.sdk.DeviceInfo$1.run(DeviceInfo.java:264)
       at java.lang.Thread.run(Thread.java:764)

Currently this issue only happen when the app is on the background with specific samsung devices (SM-T380, SM-T385)

@darshanclevertap
Copy link
Collaborator

@rizalferdian what is your targetSdkVersion and compileSdkVersion?

@rizalferdian
Copy link
Author

rizalferdian commented Jan 18, 2021

@darshanclevertap the targetSdkVersion 29 and the compileSdkVersion 29

@darshanclevertap
Copy link
Collaborator

@rizalferdian Are you also using the CleverTap Xiaomi Push SDK?

@rizalferdian
Copy link
Author

@darshanclevertap no i'm not

@darshanclevertap
Copy link
Collaborator

@rizalferdian Can you check with targetSdkVersion as 30 and update the CleverTap SDK version to 4.0.2?

@darshanclevertap
Copy link
Collaborator

@rizalferdian Are you still facing this issue?

@rizalferdian
Copy link
Author

@darshanclevertap Currently I cannot reproduce the bug myself, if we have to change the targetSdkVersion to 30 I think it will take a while before it goes to production.

@piyush-kukadiya
Copy link
Contributor

@rizalferdian If crashes are high then please downgrade SDK to 3.9.1. We will be fixing this in next release.

@piyush-kukadiya piyush-kukadiya added the issue Acknowledge as issue label Feb 15, 2021
@rizalferdian
Copy link
Author

Okay thank you

@kratuldev
Copy link
Contributor

@rizalferdian We have fixed this in our latest release v4.0.3.
Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue Acknowledge as issue
Projects
None yet
Development

No branches or pull requests

4 participants