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.

  • RoadManager error
    via GitHub by Ewrei
    ,
  • App stopped while calling registerToken
    via Stack Overflow by user7303261
    ,
  • Search in Android won't work; app crashes
    via Stack Overflow by Alex B.
    ,
  • okhttp3 : writing to MySQL from Android
    via Stack Overflow by Marc
    ,
  • Watson Visual Recognition in Android
    via Stack Overflow by Mauricio Ramos
    ,
    • android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1303) at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:86) at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74) at java.net.InetAddress.getAllByName(InetAddress.java:752) at okhttp3.Dns$1.lookup(Dns.java:39) at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:172) at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:138) at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:80) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:178) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:129) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:98) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124) 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) at com.greenlight.zubie.network.ZubieRetrofit$ZubieCallInterceptor.intercept(ZubieRetrofit.java:1063) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170) at okhttp3.RealCall.execute(RealCall.java:60) at retrofit2.OkHttpCall.execute(OkHttpCall.java:174) at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:171) at rx.Subscriber.setProducer(Subscriber.java:211) at rx.internal.operators.OperatorMap$MapSubscriber.setProducer(OperatorMap.java:99) at rx.internal.operators.OperatorMap$MapSubscriber.setProducer(OperatorMap.java:99) at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152) at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138) at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50) at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50) at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) at rx.Observable.unsafeSubscribe(Observable.java:8666) at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:250) at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:147) at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:74) at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:227) at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:107) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

    Users with the same issue

    filpgamefilpgame
    1 times, last one,
    adawolfsadawolfs
    4 times, last one,
    Hiren AmaliyarHiren Amaliyar
    5 times, last one,
    justCodeitjustCodeit
    34 times, last one,
    0x600x60
    1 times, last one,
    38 more bugmates