NoSuchElementException in RouteSelector
See original GitHub issueokhttp 3.7.0 retrofit 2.2.0
All device brands and Android versions are reporting this issue.
It happened for example after I tapped a notification, the app then makes a GET which ended in this exception. It didn’t happen when I recreated the scenario. Device was Pixel, Android 7.1.2, on WLAN.
java.util.NoSuchElementException
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:77)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:171)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
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:93)
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:120)
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:211)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.readystatesoftware.chuck.ChuckInterceptor.intercept(ChuckInterceptor.java:167)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.myownpackage.manager.OkHttpManager$AuthenticationInterceptor.intercept(OkHttpManager.java:135)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.myownpackage.manager.OkHttpManager$NetworkLoggingInterceptor.intercept(OkHttpManager.java:190)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
at okhttp3.RealCall.execute(RealCall.java:69)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:174)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ExecutorCallAdapterFactory.java:89)
at com.myownpackage.ui.ProfileFragment$11.doInBackground(ProfileFragment.java:516)
at com.myownpackage.ui.ProfileFragment$11.doInBackground(ProfileFragment.java:511)
at com.nanotasks.AbstractTask.doInBackground(AbstractTask.java:18)
at com.nanotasks.AbstractTask.doInBackground(AbstractTask.java:7)
at android.os.AsyncTask$2.call(AsyncTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:14
- Comments:65 (14 by maintainers)
Top Results From Across the Web
NoSuchElementException coming from RouteSelector after ...
After upgrading our android app from okhttp 3.12.2 to 3.14.0, we started seeing this error (stacktrace below) coming through Crashlytics in ...
Read more >Wrapping non-IOExceptions with IOException - Stack Overflow
I'm trying to solve okhttp internal exception (and any other possible runtime exception): java.util.NoSuchElementException: at okhttp3.internal.
Read more >Crash NoSuchElementException in RouteSelector of okhttp v3 ...
After upgrading okhttp to v3.7.0, our applications have NoSuchElementException in RouteSelector, the crash log was also reported in ...
Read more >java.util.NoSuchElementException - Google Groups
Huawei P30 Pro. Fatal Exception: java.util.NoSuchElementException. at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:75).
Read more >okhttp3.internal.connection.RouteSelector$Selection java ...
public Selection next() throws IOException { if (!hasNext()) { throw new NoSuchElementException(); } // Compute the next set of routes to attempt.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix released as OkHttp 3.8.1.
version 3.14.2