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

Amplitude SDK is not tagging its socket thread. #388

Open
vladaman opened this issue Nov 14, 2023 · 0 comments
Open

Amplitude SDK is not tagging its socket thread. #388

vladaman opened this issue Nov 14, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@vladaman
Copy link

Amplitude SDK is not tagging its socket thread. Logcat reports following exception.

StrictMode policy violation: android.os.strictmode.UntaggedSocketViolation: Untagged socket detected; use TrafficStats.setTrafficStatsTag() to track all network usage
   	at android.os.StrictMode.onUntaggedSocket(StrictMode.java:2287)
   	at android.os.StrictMode.noteUntaggedSocket(StrictMode.java:2741)
   	at android.net.TrafficStats$SocketTagger.tag(TrafficStats.java:255)
   	at libcore.io.BlockGuardOs.tagSocket(BlockGuardOs.java:55)
   	at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:404)
   	at libcore.io.ForwardingOs.socket(ForwardingOs.java:821)
   	at libcore.io.IoBridge.socket(IoBridge.java:840)
   	at java.net.PlainSocketImpl.socketCreate(PlainSocketImpl.java:128)
   	at java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:128)
   	at java.net.Socket.createImpl(Socket.java:514)
   	at java.net.Socket.getImpl(Socket.java:577)
   	at java.net.Socket.setSoTimeout(Socket.java:1203)
   	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:293)
   	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
   	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
   	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
   	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
   	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
   	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
   	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
   	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
   	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
   	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
   	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
   	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
   	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
   	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
   	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
   	at com.google.firebase.perf.network.FirebasePerfOkHttpClient.execute(FirebasePerfOkHttpClient.java:44)
   	at com.amplitude.api.AmplitudeClient.makeEventUploadPostRequest(AmplitudeClient.java:1966)
   	at com.amplitude.api.AmplitudeClient$13.run(AmplitudeClient.java:1831)
   	at android.os.Handler.handleCallback(Handler.java:958)
   	at android.os.Handler.dispatchMessage(Handler.java:99)
   	at android.os.Looper.loopOnce(Looper.java:205)
   	at android.os.Looper.loop(Looper.java:294)
   	at android.os.HandlerThread.run(HandlerThread.java:67)

SDK: com.amplitude:android-sdk:2.23.2

@vladaman vladaman added the bug Something isn't working label Nov 14, 2023
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

1 participant