android.os.NetworkOnMainThreadException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • (Un)subscribing crashes slide
    via GitHub by MrGreenTea
    ,
  • Unsubscribe crash
    via GitHub by emacsomancer
    ,
  • Crash on subscribe
    via GitHub by kelvinalfaro
    ,
    • android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1273) at com.android.org.conscrypt.OpenSSLSocketImpl$SSLOutputStream.write(OpenSSLSocketImpl.java:755) at com.android.okhttp.okio.Okio$1.write(Okio.java:76) at com.android.okhttp.okio.AsyncTimeout$1.write(AsyncTimeout.java:155) at com.android.okhttp.okio.RealBufferedSink.flush(RealBufferedSink.java:221) at com.android.okhttp.internal.http.HttpConnection.flush(HttpConnection.java:141) at com.android.okhttp.internal.http.HttpTransport.finishRequest(HttpTransport.java:52) at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:902) at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:788) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:443) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:388) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:231) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java) at com.android.backgroundchooser.Main2Activity.getBitmapFromURL(Main2Activity.java:60) at com.android.backgroundchooser.Main2Activity$1.onClick(Main2Activity.java:42) at android.view.View.performClick(View.java:5204) at android.view.View$PerformClick.run(View.java:21156) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5466) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

    Users with the same issue

    Unknown visitor1 times, last one,
    justCodeit
    34 times, last one,
    Adrien
    4 times, last one,
    dealloc
    2 times, last one,
    Alexandru Popa
    3 times, last one,
    38 more bugmates