android.os.NetworkOnMainThreadException

Exception #2620765

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1167

  • via GitHub by ajdevy
    ,
  • via Stack Overflow by G-J
    ,
  • Stack trace

    • android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1273) at com.android.org.conscrypt.OpenSSLSocketImpl.shutdownAndFreeSslNative(OpenSSLSocketImpl.java:1237) at com.android.org.conscrypt.OpenSSLSocketImpl.close(OpenSSLSocketImpl.java:1232) at okhttp3.internal.Util.closeQuietly(Util.java:103) at okhttp3.internal.connection.StreamAllocation.deallocate(StreamAllocation.java:265) at okhttp3.internal.connection.StreamAllocation.streamFailed(StreamAllocation.java:312) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:139) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:212) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    brunosatrianibrunosatriani
    Once,
    justCodeitjustCodeit
    34 times, last one
    AdrienAdrien
    4 times, last one
    deallocdealloc
    2 times, last one
    Alexandru PopaAlexandru Popa
    3 times, last one
    38 more bugmates