IndexOutOfBoundsException in RealConnection
See original GitHub issueStacktrace
java.lang.IndexOutOfBoundsException: Index: 0
at java.base/java.util.Collections$EmptyList.get(Collections.java:4481)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:326)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:283)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:168)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
at okhttp3.RealCall.execute(RealCall.java:92)
Environment
- OkHttp 3.12.0
- Java 11.0.1 LTS
- Windows 10 64-bit
This bug seems cannot be stably reproduce, so I’m not sure how to write a failing test for this. After I downgraded okhttp to 3.11.0 it works fine.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Okhttp java 11 exceptions - Stack Overflow
IndexOutOfBoundsException : Index: 0 at java.base/java.util. ... RealConnection.connect(RealConnection.java:168) at ...
Read more >[Solved] java.lang.IndexOutOfBoundsException
This exception is thrown by String methods to indicate that an index is either negative or greater than the size of the String....
Read more >Java.lang.indexoutofboundsexception android - 免费编程教程
IndexOutOfBoundsException: Invalid index 2, size is 1 at java.util.ArrayList. ... RealConnection 中的IndexOutOfBoundsException #4427。
Read more >SSL Error B4J | B4X Programming Forum
IndexOutOfBoundsException : Index: 0 at java.base/java.util.Collections$EmptyList.get(Collections.java:4481) at okhttp3.internal.connection.RealConnection.
Read more >Server unable to reach - SonarQube - Sonar Community
RealConnection.connect(RealConnection.java:183) ... IndexOutOfBoundsException: Index 2 out of bounds for length 2
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
This seems to be rather potent with version 3.12.0, however that version also contains a fix for an issue of 3.11.0 with proxySelector being null on some JVMs. I’m twisted whether I should be using 3.12.0 with this issue or 3.11.0 with the other. I’d much appreciate a fix for this to void that problem.
I’m also having this issue pls fix