java.io.InterruptedIOException: thread interrupted". Code before adding onErrorResumeNext - works good LocationService.getUpdatedOrLastKnownLocation(getContext())) .flatMap(location -> RestService.getPostsAround(location,0,10)) //offset = 0, limit = 10; .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(subscriber); Code with onErrorResumeNext - throws Exception LocationService.getUpdatedOrLastKnownLocation(getContext())) .flatMap(location -> RestService.getPostsAround(location,0,10)) //offset = 0, limit = 10; .onErrorResumeNext(RestService.getPostsByMapProjection(googleMap.getProjection().getVisibleRegion())) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(subscriber); Stacktrace: 07-27 22:33:58.384 18632-18632/com.blacksea.plamobi W/System.err: java.io.InterruptedIOException: thread interrupted 07-27 22:33:58.384 18632-18632/com.blacksea.plamobi W/System.err: at okio.Timeout.throwIfReached(Timeout.java:145) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.Okio$1.write(Okio.java:77) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.AsyncTimeout$1.write(AsyncTimeout.java:155) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.RealBufferedSink.flush(RealBufferedSink.java:221) 07-27 22:33:58.386 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.Http1xStream.finishRequest(Http1xStream.java:159) 07-27 22:33:58.386 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:721) 07-27 22:33:58.387 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:81) 07-27 22:33:58.387 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:708) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall.getResponse(RealCall.java:241) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198) 07-27 22:33:58.391 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)

tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    RxJava onErrorResumeNext calls java.io.InterrupedIOException

    Stack Overflow | 10 months ago | Viktor Sinelnikov
    java.io.InterruptedIOException: thread interrupted". Code before adding onErrorResumeNext - works good LocationService.getUpdatedOrLastKnownLocation(getContext())) .flatMap(location -> RestService.getPostsAround(location,0,10)) //offset = 0, limit = 10; .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(subscriber); Code with onErrorResumeNext - throws Exception LocationService.getUpdatedOrLastKnownLocation(getContext())) .flatMap(location -> RestService.getPostsAround(location,0,10)) //offset = 0, limit = 10; .onErrorResumeNext(RestService.getPostsByMapProjection(googleMap.getProjection().getVisibleRegion())) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(subscriber); Stacktrace: 07-27 22:33:58.384 18632-18632/com.blacksea.plamobi W/System.err: java.io.InterruptedIOException: thread interrupted 07-27 22:33:58.384 18632-18632/com.blacksea.plamobi W/System.err: at okio.Timeout.throwIfReached(Timeout.java:145) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.Okio$1.write(Okio.java:77) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.AsyncTimeout$1.write(AsyncTimeout.java:155) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.RealBufferedSink.flush(RealBufferedSink.java:221) 07-27 22:33:58.386 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.Http1xStream.finishRequest(Http1xStream.java:159) 07-27 22:33:58.386 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:721) 07-27 22:33:58.387 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:81) 07-27 22:33:58.387 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:708) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall.getResponse(RealCall.java:241) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198) 07-27 22:33:58.391 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)

    Root Cause Analysis

    1. java.io.InterruptedIOException

      thread interrupted". Code before adding onErrorResumeNext - works good LocationService.getUpdatedOrLastKnownLocation(getContext())) .flatMap(location -> RestService.getPostsAround(location,0,10)) //offset = 0, limit = 10; .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(subscriber); Code with onErrorResumeNext - throws Exception LocationService.getUpdatedOrLastKnownLocation(getContext())) .flatMap(location -> RestService.getPostsAround(location,0,10)) //offset = 0, limit = 10; .onErrorResumeNext(RestService.getPostsByMapProjection(googleMap.getProjection().getVisibleRegion())) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(subscriber); Stacktrace: 07-27 22:33:58.384 18632-18632/com.blacksea.plamobi W/System.err: java.io.InterruptedIOException: thread interrupted 07-27 22:33:58.384 18632-18632/com.blacksea.plamobi W/System.err: at okio.Timeout.throwIfReached(Timeout.java:145) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.Okio$1.write(Okio.java:77) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.AsyncTimeout$1.write(AsyncTimeout.java:155) 07-27 22:33:58.385 18632-18632/com.blacksea.plamobi W/System.err: at okio.RealBufferedSink.flush(RealBufferedSink.java:221) 07-27 22:33:58.386 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.Http1xStream.finishRequest(Http1xStream.java:159) 07-27 22:33:58.386 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:721) 07-27 22:33:58.387 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:81) 07-27 22:33:58.387 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:708) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall.getResponse(RealCall.java:241) 07-27 22:33:58.389 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198) 07-27 22:33:58.391 18632-18632/com.blacksea.plamobi W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)

      at okhttp3.RealCall.execute()
    2. okhttp3
      RealCall.execute
      1. okhttp3.RealCall.execute(RealCall.java:57)
      1 frame
    3. retrofit2
      OkHttpCall.execute
      1. retrofit2.OkHttpCall.execute(OkHttpCall.java:174)
      1 frame
    4. retrofit2.adapter.rxjava
      RxJavaCallAdapterFactory$RequestArbiter.request
      1. retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:171)
      1 frame
    5. rxjava
      Subscriber.setProducer
      1. rx.Subscriber.setProducer(Subscriber.java:211)
      1 frame