My app crashes extremaly often on this error.
**java.net.SocketException connection reset **
I have no any specified line in Stacktrace to write that block here.
I mean there are some informations and error line numbers but none of them are written by me, it's library issue I guess?
It's weird, because if it's my fault in code, why does app crash for Android 11+ only?
I use Retrofit2 library for network calls.
This is a Stacktrace.
Fatal Exception: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:215) at java.net.SocketInputStream.read(SocketInputStream.java:144) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:945) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:909) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:824) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:797) at okio.Okio$2.read(Okio.java:140) at okio.AsyncTimeout$2.read(AsyncTimeout.java:237) at okio.RealBufferedSource.read(RealBufferedSource.java:47) at okhttp3.internal.http1.Http1Codec$AbstractSource.read(Http1Codec.java:363) at okhttp3.internal.http1.Http1Codec$ChunkedSource.read(Http1Codec.java:453) at okio.RealBufferedSource.read(RealBufferedSource.java:47) at okio.ForwardingSource.read(ForwardingSource.java:35) at retrofit2.OkHttpCall$ExceptionCatchingResponseBody$1.read(OkHttpCall.java:288) at okio.RealBufferedSource$1.read(RealBufferedSource.java:439) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:291) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:355) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:181) at java.io.InputStreamReader.read(InputStreamReader.java:184) at okhttp3.ResponseBody$BomAwareReader.read(ResponseBody.java:259) at com.google.gson.stream.JsonReader.fillBuffer(JsonReader.java:1289) at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1029) at com.google.gson.stream.JsonReader.nextString(JsonReader.java:814) at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:380) at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:368) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:39) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:27) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:225) at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:121) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:920)
I was seeking very long time to find, where was my error but I couldn't.
I tried to increase Timeouts, because sometimes I get **Socket Closed ** exception as well
Related
One of our android app is using MSAL library (com.microsoft.identity.client:msal:0.2.+) to validate the user with Microsoft AD. When we run the app in Android 12 - Google pixel device, I am getting an exception.
E/AdalMigrationAdapter:loadCloudDiscoveryMetadata: [2021-11-28 12:03:12 - thread_name : pool-45-thread-1, correlation_id : UNSET] Failed to load instance discovery metadata Android 31
javax.net.ssl.SSLHandshakeException: Chain validation failed
at com.android.org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:363)
at com.android.org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1134)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1089)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:876)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:858)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:731)
at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:241)
at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:220)
at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:196)
at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153)
at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
at com.google.firebase.perf.network.InstrURLConnectionBase.getInputStream(InstrURLConnectionBase.java:137)
at com.google.firebase.perf.network.InstrHttpsURLConnection.getInputStream(InstrHttpsURLConnection.java:79)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient.executeHttpSend(UrlConnectionHttpClient.java:263)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient.access$100(UrlConnectionHttpClient.java:73)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient$2.call(UrlConnectionHttpClient.java:176)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient$2.call(UrlConnectionHttpClient.java:174)
at com.microsoft.identity.common.internal.net.NoRetryPolicy.attempt(NoRetryPolicy.java:42)
at com.microsoft.identity.common.internal.net.NoRetryPolicy.attempt(NoRetryPolicy.java:36)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient.method(UrlConnectionHttpClient.java:174)
at com.microsoft.identity.common.internal.net.AbstractHttpClient.get(AbstractHttpClient.java:47)
at com.microsoft.identity.common.internal.providers.microsoft.azureactivedirectory.AzureActiveDirectory.performCloudDiscovery(AzureActiveDirectory.java:188)
at com.microsoft.identity.common.internal.migration.AdalMigrationAdapter.loadCloudDiscoveryMetadata(AdalMigrationAdapter.java:238)
at com.microsoft.identity.common.internal.migration.AdalMigrationAdapter.adapt(AdalMigrationAdapter.java:119)
at com.microsoft.identity.common.internal.migration.TokenMigrationUtility$1.run(TokenMigrationUtility.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
Caused by: java.security.cert.CertificateException: Chain validation failed
at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:719)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:549)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:570)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:615)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:505)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:425)
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:353)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:90)
at com.android.org.conscrypt.ConscryptEngineSocket$2.checkServerTrusted(ConscryptEngineSocket.java:163)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:255)
at com.android.org.conscrypt.ConscryptEngine.verifyCertificateChain(ConscryptEngine.java:1638)
at com.android.org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method)
at com.android.org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:569)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1095)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1079)
... 37 more
Caused by: java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:222)
at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:140)
at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79)
at java.security.cert.CertPathValidator.validate(CertPathValidator.java:301)
at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:715)
... 52 more
Caused by: java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
at sun.security.provider.certpath.OCSPResponse.verify(OCSPResponse.java:619)
at sun.security.provider.certpath.RevocationChecker.checkOCSP(RevocationChecker.java:709)
at sun.security.provider.certpath.RevocationChecker.check(RevocationChecker.java:363)
at sun.security.provider.certpath.RevocationChecker.check(RevocationChecker.java:337)
at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
... 57 more
Suppressed: java.security.cert.CertPathValidatorException: Could not determine revocation status
at sun.security.provider.certpath.RevocationChecker.buildToNewKey(RevocationChecker.java:1092)
Another error is showing is "Unable to perform cloud discovery"
I am facing this issue only in Android 12.
I've been trying to integrate Facebook ads in my app for Android with the audience-network-sdk:5.0.0 and Facebook sdk crashed with this error:
10-16 13:12:07.128 25301-25725/? D/ProxyCache: Open connection to http://127.0.0.1:43557/ping
10-16 13:12:08.318 25301-25586/? E/ProxyCache: Error pinging server [attempt: 2, timeout: 1200].
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:176)
at com.facebook.ads.internal.r.b.f.b(Unknown Source)
at com.facebook.ads.internal.r.b.f.<init>(Unknown Source)
at com.facebook.ads.internal.r.b.f.<init>(Unknown Source)
at com.facebook.ads.internal.f.d$1.a(Unknown Source)
at com.facebook.ads.internal.f.d$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Shutdown server... Error pinging server [attempts: 3, max timeout: 1200].
10-16 13:12:08.318 25301-25586/? I/ProxyCache: Shutdown proxy server
10-16 13:12:08.328 25301-25602/? W/System.err: java.lang.InterruptedException
10-16 13:12:08.348 25301-25602/? W/System.err: at java.lang.Thread.sleep(Native Method)
at java.lang.Thread.sleep(Thread.java:1031)
at java.lang.Thread.sleep(Thread.java:985)
at com.splunk.mint.ExceptionHandler.uncaughtException(ExceptionHandler.java:64)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
10-16 13:12:08.348 25301-25602/? E/AndroidRuntime: FATAL EXCEPTION: Thread-12294
PID: 25301
java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.FileDescriptor.setInt$(int)' on a null object reference
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:93)
at java.net.ServerSocket.implAccept(ServerSocket.java:216)
at java.net.ServerSocket.accept(ServerSocket.java:140)
at com.facebook.ads.internal.r.b.f.e(Unknown Source)
at com.facebook.ads.internal.r.b.f.a(Unknown Source)
at com.facebook.ads.internal.r.b.f$e.run(Unknown Source)
at java.lang.Thread.run(Thread.java:818)
As you can see the trace just tell you that the ping (and the connection to local host) failed but it doesn't tell you more. I am not solving it because it only happens in physical device and only with my app (the example app from Facebook runs great in the same device and same network).
I don't know why is happening and how to fix it.
So I finally found the error and the solution.
Let me explain the error:
Facebook ads SDK uses localhost Proxy cache to download the assets of the ads
I also use Splunk Mint to track errors of my app in production.
Splunk Mint library has issues with the http monitoring:
Disable network monitoring
The solution was to add this line before init Mint SDK:
Mint.disableNetworkMonitoring();
I have an Android 9 Emulator in Android Studio, and I'm trying to run my app on it.
However app crashes on launch, and it keeps logging this lengthy error:
2018-10-08 11:48:28.693 18207-18309/? E/aise: Phenotype API error. Event a <
a: ""
b: 0
d: 1
e: "com.google.android.apps.gcs"
f: 0
g: 0
h: 0
i: ""
j: ""
>
d: 219
g: # bpkh#f5738319
, EventCode: 12
[CONTEXT service_id=51 ]
aira: 29503
at aisl.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):36)
at aisk.b(:com.google.android.gms#13280040#13.2.80 (100700-211705629):5)
at aise.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):85)
at aise.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):77)
at wsj.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):29)
at bdmu.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):2)
at pyx.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):21)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at qet.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:764)
2018-10-08 11:48:28.693 18207-18309/? E/AsyncOperation: serviceID=51, operation=GetCommittedConfigurationOperationCall
OperationException[Status{statusCode=unknown status code: 29503, resolution=null}]
at aise.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):95)
at aise.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):77)
at wsj.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):29)
at bdmu.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):2)
at pyx.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):21)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at qet.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:764)
2018-10-08 11:48:28.694 18207-18250/? E/NetRec: [530] afrj.a: Could not retrieve server token for package com.google.android.apps.gcs
java.util.concurrent.ExecutionException: otp: 29503:
at aptv.b(:com.google.android.gms#13280040#13.2.80 (100700-211705629):2)
at aptv.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):28)
at afrj.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):1)
at afrj.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):4)
at afrg.getHeaders(:com.google.android.gms#13280040#13.2.80 (100700-211705629):2)
at com.android.volley.toolbox.HttpClientStack.performRequest(:com.google.android.gms#13280040#13.2.80 (100700-211705629):6)
at psm.performRequest(:com.google.android.gms#13280040#13.2.80 (100700-211705629):1)
at bmj.executeRequest(:com.google.android.gms#13280040#13.2.80 (100700-211705629):1)
at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms#13280040#13.2.80 (100700-211705629):5)
at psn.performRequest(:com.google.android.gms#13280040#13.2.80 (100700-211705629):14)
at com.android.volley.NetworkDispatcher.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):6)
at com.android.volley.NetworkDispatcher.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):2)
Caused by: otp: 29503:
at ozf.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):4)
at aipu.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):5)
at aisk.a(Unknown Source:3)
at wsg.a(:com.google.android.gms#13280040#13.2.80 (100700-211705629):5)
at wsj.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):37)
at bdmu.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):2)
at pyx.run(:com.google.android.gms#13280040#13.2.80 (100700-211705629):21)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at qet.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:764)
I've seen this and this, but disabling microphone permissions and Google search app haven't solved my problem.
What should I do to fix this error?
I have this problem when I am developing a map application with a locate part in it.
It seems work fine that I could see the GPS icon on the top of the screen, however, it can't move the 'camera' to my real location.
From the log category, I found this error message 'Could not retrieve server token for package com.google.android.apps.gcs' which I thought could be the most likely reason that I couldn't get it through.
I've tried some small changes on project configuration until I tried to downgrade the compileSdkVersion to lower level. For this project, I changed it from 28 to 27. (My mobile phone is equipped with Android 9.)
Then it works.
Hope this could help you.
The logs, in this case, are very weird. I am not able to figure out the issues that are causing the connectivity errors with the servers. Please help me out with this mpw 29503 error:
09-06 17:08:37.756 2285-4073/com.google.android.gms.persistent E/NetRec: [239] abno.a: Could not retrieve server token for package com.google.android.apps.gcs
java.util.concurrent.ExecutionException: mpw: 29503:
at alfn.b(:com.google.android.gms#12521024#12.5.21 (040700-189987672):4)
at alfn.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):28)
at abno.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):1)
at abno.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):7)
at abnl.getHeaders(:com.google.android.gms#12521024#12.5.21 (040700-189987672):2)
at com.android.volley.toolbox.HttpClientStack.performRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):15)
at nmb.performRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):1)
at bdb.executeRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):1)
at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):11)
at nmc.performRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):8)
at com.android.volley.NetworkDispatcher.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):7)
at com.android.volley.NetworkDispatcher.run(:com.google.android.gms#12521024#12.5.21 (040700-189987672):2)
Caused by: mpw: 29503:
at mvf.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):3)
at aejp.b(:com.google.android.gms#12521024#12.5.21 (040700-189987672):4)
at aema.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):4)
at nof.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):6)
at noj.run(:com.google.android.gms#12521024#12.5.21 (040700-189987672):44)
at axja.run(:com.google.android.gms#12521024#12.5.21 (040700-189987672):2)
at nsg.run(:com.google.android.gms#12521024#12.5.21 (040700-189987672):27)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at nya.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:764)
It's so wired, because of task invocation on ThreadExecutor. To get correct log of your issues, you should wrap action, which you submit in background with your tools (executor Service, Rx, or even AsyncTask) with try-cath block.
The issue is what the title said. It only occur sometimes and some phone. Hear is the log that I caught.
java.lang.IllegalStateException
closed
okio.RealBufferedSink.write(RealBufferedSink.java:44)
okio.ForwardingSink.write(ForwardingSink.java:35)
com.******.******.network.UploadRequestBody$1.write(UploadRequestBody.java:75)
okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
okio.RealBufferedSink.writeAll(RealBufferedSink.java:104)
com.squareup.okhttp.RequestBody$3.writeTo(RequestBody.java:118)
com.squareup.okhttp.MultipartBuilder$MultipartRequestBody.writeOrCountBytes(MultipartBuilder.java:277)
com.squareup.okhttp.MultipartBuilder$MultipartRequestBody.writeTo(MultipartBuilder.java:297)
com.******.******.network.UploadRequestBody.writeTo(UploadRequestBody.java:59)
com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:718)
com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:576)
com.squareup.okhttp.Call.getResponse(Call.java:287)
com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)
com.squareup.okhttp.Call.access$100(Call.java:35)
com.squareup.okhttp.Call$AsyncCall.execute(Call.java:171)
com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
java.lang.Thread.run(Thread.java:848)
Would you mind helping me and telling how to avoid it?
I find this at github issue
You can only call response.body().string() once.