Exception in thread "OkHttp Dispatcher" java.lang.NoSuchMethodError: okio.BufferedSource.getBuffer()Lokio/Buffer;
See original GitHub issueI use okhttpVersion = 3.14.1 and got the following error when I integrate with line bot library.
Exception in thread "OkHttp Dispatcher" java.lang.NoSuchMethodError: okio.BufferedSource.getBuffer()Lokio/Buffer;
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:252)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at com.linecorp.bot.client.HeaderInterceptor.intercept(HeaderInterceptor.java:39)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:172)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The error because of can’t resolve method getBuffer()
from BufferedSource
object. I think it should be source.buffer()
not source.getBuffer()
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Exception in thread Okhttp Dispatcher - java
I solved this issue, it was a problem with version. Here is the version, I am using and worked. <dependency org="com.squareup.retrofit2" ...
Read more >Directions API
Exception in thread "main" java.lang.NoSuchMethodError: okio.BufferedSource.rangeEquals(JLokio/ByteString;)Z at okhttp3.internal.Util.
Read more >Okhttp关于java.lang.NoSuchMethodError: okio. ...
java.lang.NoSuchMethodError: okio.BufferedSource.readUtf8LineStrict(J)Ljava/lang/String; at okhttp3.internal.http1.Http1ExchangeCodec.
Read more >问答- 腾讯云开发者社区-腾讯云
NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: okio.BufferedSource.rangeEquals(JLokio/ByteString;)Z
Read more >Okhttp 行家, Okhttp3 行家, okhttp okio, 线程okhttp 调度程序 ...
java.lang.NoSuchMethodError: okio.BufferedSource.rangeEquals, java.lang.ClassCastException: java.lang.String 无法转换为java.util.Map #280。Open Xgamefactory 已 ...
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
The versions of okhttp, okio, and HttpLoggingInterceptor need to be same.
Try the same ok version as in the line library