NoSuchMethodError: Duration.Companion.fromRawValue-UwyO8pc with Kotlin 2.3
Maintainers usually reply within 1 day
@faraz152 is already working on this.
Since Mar 30, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start by reproducing the reported NoSuchMethodError with OkHttp 5.3.2 on Kotlin 2.3.x, then inspect the stack-trace path through DurationKt.toDuration and CacheControl. The issue provides no failing test or reproduction project, so first establish a focused reproducer; done means resolving the crash while retaining compatibility with the reported Kotlin versions.
Written by the indexing model from the issue text.
Description
Good bug reports include a failing test! Writing a test helps you to isolate and describe the problem, and it helps us to fix it fast. Bug reports without a failing test or reproduction steps are likely to be closed.
| Component | Kotlin Version | Result |
|---|---|---|
| IntelliJ 2025.3.1 | 2.3.10/2.3.20 | Bundled stdlib |
| OkHttp 5.3.2. | 2.2.21 | Compiled against old Duration internals |
| Outcome | Crash | NoSuchMethodError: fromRawValue-UwyO8pc |
my dependency tree showing Kotlin 2.3.10 forcing over 2.2.x
...
+--- org.jetbrains.kotlin:kotlin-stdlib:2.3.10
| +--- org.jetbrains.kotlin:kotlin-stdlib:2.2.0 -> 2.3.10 ()
| --- org.jetbrains.kotlin:kotlin-stdlib:2.2.0 -> 2.3.10 ()
| | --- org.jetbrains.kotlin:kotlin-stdlib:2.2.20 -> 2.3.10 ()
| --- org.jetbrains.kotlin:kotlin-stdlib:2.2.21 -> 2.3.10 ()
| | --- org.jetbrains.kotlin:kotlin-stdlib:2.2.21 -> 2.3.10 ()
| --- org.jetbrains.kotlin:kotlin-stdlib:2.2.21 -> 2.3.10 ()
...
{code:java}
2026-03-02 16:07:12,159 [ 66530] SEVERE - #c.i.i.p.PluginManager - 'long kotlin.time.Duration$Companion.fromRawValue-UwyO8pc$kotlin_stdlib(long)'
java.lang.NoSuchMethodError: 'long kotlin.time.Duration$Companion.fromRawValue-UwyO8pc$kotlin_stdlib(long)'
at kotlin.time.DurationKt.durationOfNanos(Duration.kt:1593)
at kotlin.time.DurationKt.toDuration(Duration.kt:969)
at okhttp3.internal._CacheControlCommonKt.commonForceCache(-CacheControlCommon.kt:65)
at okhttp3.CacheControl.(CacheControl.kt:276)
at okhttp3.Request.cacheControl(Request.kt:126)
at okhttp3.internal.cache.CacheStrategy$Factory.compute(CacheStrategy.kt:131)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:54)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:85)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:74)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
at com.xxx.company.network.interceptors.BasicAuthInterceptor.intercept(BasicAuthInterceptor.java:51)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:226)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:178)
{code}
- Dominant language
- Kotlin
- Stars
- 47.1k
- Forks
- 9.3k
- Avg merge
- 18h 18m
- Merged PRs (30d)
- 15
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lysine-dev/okhttp
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
lysine-dev/okhttp#9788 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
lysine-dev/okhttp#9761 · 3 comments ·
Maintainers usually reply within 1 day
-
Remove crossinline `addInterceptor` and `addNetworkInterceptor` overloadsPossibly taken @Amir-Golmoradi claimed this 6 days ago. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 58/100
lysine-dev/okhttp#9779 · 1 comment ·
Maintainers usually reply within 1 day
-
HTTP/2 Data padding is not counted toward the connection flow-control window. This deadlocks connections with peers that pad.Possibly taken @Amir-Golmoradi claimed this 6 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 67/100
lysine-dev/okhttp#9772 · 6 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
lysine-dev/okhttp#9760 · 3 comments ·
Maintainers usually reply within 1 day
All issues in lysine-dev/okhttp
Similar issues
-
afk-ok area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
enorm-labs/event-junkie#3301 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rustyrazorblade/easy-db-lab#1017 ·
Maintainers usually reply within 1 day
-
enhancement impact:U1 later P3 reach:R2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100