zoho / SalesIQ-Mobilisten-ReactNative

Your mobile app's ideal live chat partner. Power up your mobile App with the SalesIQ Mobilisten SDK for React-Native.
https://mobilisten.io/
9 stars 11 forks source link

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation Warning on Google pre-launch report #35

Closed dieptang closed 8 months ago

dieptang commented 2 years ago

Hello,

I am publishing my application to Google Console, before of that we're passing our application to Google pre-launch report, and we faced new warning: StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ljava/net/Socket;->impl:Ljava/net/SocketImpl;

Details:

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ljava/net/Socket;->impl:Ljava/net/SocketImpl;
    at android.os.StrictMode.lambda$static$1(StrictMode.java:407)
    at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
    at java.lang.Class.getDeclaredField(Native Method)
    at com.google.android.gms.org.conscrypt.Platform.getFileDescriptor(:com.google.android.gms@213614028@21.36.14 (100400-395708125):1)
    at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(:com.google.android.gms@213614028@21.36.14 (100400-395708125):6)
    at com.android.okhttp.okio.Okio$2.read(Okio.java:145)
    at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:213)
    at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:317)
    at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:311)
    at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:207)
    at com.android.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:395)
    at com.android.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:146)
    at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:900)
    at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:772)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:493)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:429)
    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:560)
    at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
    at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
    at com.zoho.livechat.android.api.GetAndroidChannel.run(GetAndroidChannel.java:50)

I're currently using Android SDK 30.0.2. Do you know how to resolve it, Is new version available? I currently use react-native-zohosalesiq-mobilisten": "^4.0.1".

Regards, Diep

Angu-G commented 2 years ago

Hello @dieptang, Can you let us know what is the target SDK version you have been using and whether the StrictMode class is configured in your application.

dieptang commented 2 years ago

Hello @dieptang, Can you let us know what is the target SDK version you have been using and whether the StrictMode class is configured in your application.

I am using target SDK 30. (30.0.2) and don't use StrictMode class yet.

Angu-G commented 2 years ago

Hello @dieptang, Thanks for reporting us. You can ignore this warning as of now. We will update to the latest gms libraries to avoid this warning in the future. We will let you know in the same thread. Thank you!

bhahirathan-mb-11956 commented 8 months ago

Hi @dieptang ,

We have turned on the StrictMode to detect NonSdkApiUsedViolation. Also we looked into that Platform.getFileDescriptor of google's conscrypt repo and it looks like they are doing some reflection access which is causing the StrictMode to print such logs.

We'll close this for now as it's not an issue with SalesIQ-Mobilisten-ReactNative.

Regards, Bhahirathan M, Zoho SalesIQ.