question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StrictMode UNTAGGED_SOCKET in FirebaseInstallationServiceClient

See original GitHub issue

[READ] Step 1: Are you in the right place?

yes. Issue in FirebaseInstallationServiceClient

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: N/A
  • Firebase Component: firebase-installations
  • Component version: f30152eae2932bb2a540a95ffe81ec4d566b35da (HEAD cl/336921685)

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

  1. Enable Strictmode
  2. Start app that depends on firebase-installations

Relevant Code:

N/A

Logcat

java.lang.Throwable: Untagged socket detected; use TrafficStats.setThreadSocketTag() to track all network usage
at android.os.StrictMode.onUntaggedSocket(StrictMode.java:2010)
at com.android.server.NetworkManagementSocketTagger.tag(NetworkManagementSocketTagger.java:78)
at libcore.io.BlockGuardOs.tagSocket(BlockGuardOs.java:47)
at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:310)
at libcore.io.IoBridge.socket(IoBridge.java:667)
at java.net.PlainSocketImpl.socketCreate(PlainSocketImpl.java:116)
at java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:98)
at java.net.Socket.createImpl(Socket.java:484)
at java.net.Socket.getImpl(Socket.java:547)
at java.net.Socket.setSoTimeout(Socket.java:1175)
at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:139)
at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:127)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:258)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(Unknown Source:0)
at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeRequestBodyToOutputStream(FirebaseInstallationServiceClient.java:226)
at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeFIDCreateRequestBodyToOutputStream(FirebaseInstallationServiceClient.java:208)
at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:167)
at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:490)
at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:361)
at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2$FirebaseInstallations(FirebaseInstallations.java:351)
at com.google.firebase.installations.FirebaseInstallations$$Lambda$3.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
regisdcommented, Dec 15, 2020

Issue https://github.com/square/okhttp/issues/3537 has been closed.

OKHttp doesn’t spontaneously issue HTTP requests and cannot know what is the content it transports. The tagging should be done by GMS. Please reopen.

0reactions
regisdcommented, Jan 11, 2021

Related to / Possible duplicate of #1133

Read more comments on GitHub >

github_iconTop Results From Across the Web

StrictMode java.lang.Throwable: Untagged socket detected
With StrictMode enabled I just started getting this exception: java.lang.Throwable: Untagged socket detected; use TrafficStats.
Read more >
StrictMode - Android Developers
StrictMode is a developer tool which detects things you might be doing by accident and brings them to your attention so you can...
Read more >
StrictMode java.lang.Throwable: Untagged socket detected
With StrictMode enabled I just started getting this exception: java.lang. ... UntaggedSocketViolation: Untagged socket detected; use TrafficStats.
Read more >
Untagged socket in WebView when app enables strict mode ...
Issue 946531: Untagged socket in WebView when app enables strict mode enforcement ... 03-22 11:14:12.565 11803 11803 D StrictMode: at com.android.server.
Read more >
Android O StrictMode: Untagged socket detected - Bountysource
Android O StrictMode: Untagged socket detected. square. 23 August 2017 Posted by hameno. If we use StrictMode with VmPolicy detectAll() in Android O ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found