Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

NoSuchMethodError: Duration.Companion.fromRawValue-UwyO8pc with Kotlin 2.3

Aperta
#9,347 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@faraz152 ci sta già lavorando.

Dal 30/3/2026.

  • #9362 di @SergioChan — chiusa senza merge
  • #9397 di @faraz152 — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
android, kotlin
Ambito
backend, mobile

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

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}

Lingua principale
Kotlin
Stelle
47.1k
Fork
9.3k
Merge medio
18h 18m
PR unite (30g)
15

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lysine-dev/okhttp

Tutte le issue di lysine-dev/okhttp

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.