Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[BUG] NullPointerException in DebugOverlayDataRepository.networkRequests crashes the app (debugoverlay-extension-okhttp 2.7.0)

Cerrado Apto para principiantes
#274 1 comentario 1 reacción 1 asignado Ver en GitHub

@Manabu-GT ya está trabajando en esto.

Desde el 8/10/2026.

  • #275 de @Manabu-GT — fusionado

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
75/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
kotlin
Área
mobile-dev

Línea de trabajo

El fallo se produce en el flujo networkRequests de DebugOverlayDataRepository al utilizar DebugOverlayNetworkInterceptor. Empieza por localizar estas clases en la base de código, identifica la propiedad anulable que causa el NPE y añade una comprobación de nulidad o un valor por defecto. Verifica la corrección ejecutando las pruebas de instrumentación de Android, especialmente las que cubren la extensión de OkHttp.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
Summary

After adding DebugOverlayNetworkInterceptor to our OkHttp client, the app sometimes intermittently crashes at startup with an NPE originating in DebugOverlayDataRepository's
networkRequests flow. Reproduced on CI (Android instrumentation tests relaunching the app), more reliably on slower/loaded devices. Seen on debugoverlay-extension-okhttp:2.7.0.

2026-10-06T10:03:42.8071975Z INSTRUMENTATION_STATUS: stack=java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object kotlinx.coroutines.flow.Flow.collect(kotlinx.coroutines.flow.FlowCollector, kotlin.coroutines.Continuation)' on a null object reference
2026-10-06T10:03:42.8072687Z 	at kotlinx.coroutines.flow.FlowKt__CollectKt.emitAll(Collect.kt:105)
2026-10-06T10:03:42.8073132Z 	at kotlinx.coroutines.flow.FlowKt.emitAll(Unknown Source:1)
2026-10-06T10:03:42.8073688Z 	at com.ms.square.debugoverlay.internal.data.DebugOverlayDataRepository$special$$inlined$flatMapLatest$2.invokeSuspend(Merge.kt:189)
2026-10-06T10:03:42.8074909Z 	at com.ms.square.debugoverlay.internal.data.DebugOverlayDataRepository$special$$inlined$flatMapLatest$2.invoke(Unknown Source:11)
2026-10-06T10:03:42.8075534Z 	at com.ms.square.debugoverlay.internal.data.DebugOverlayDataRepository$special$$inlined$flatMapLatest$2.invoke(Unknown Source:4)
2026-10-06T10:03:42.8076305Z 	at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invokeSuspend(Merge.kt:30)
2026-10-06T10:03:42.8076881Z 	at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invoke(Unknown Source:8)
2026-10-06T10:03:42.8077883Z 	at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invoke(Unknown Source:4)
2026-10-06T10:03:42.8078899Z 	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:20)
2026-10-06T10:03:42.8079407Z 	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:360)
2026-10-06T10:03:42.8080479Z 	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:134)
2026-10-06T10:03:42.8081095Z 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:53)
2026-10-06T10:03:42.8082235Z 	at kotlinx.coroutines.BuildersKt.launch(Unknown Source:1)
2026-10-06T10:03:42.8083143Z 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:44)
2026-10-06T10:03:42.8083769Z 	at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source:1)
2026-10-06T10:03:42.8084364Z 	at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1.emit(Merge.kt:29)
2026-10-06T10:03:42.8085446Z 	at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:401)
2026-10-06T10:03:42.8085988Z 	at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(Unknown Source:15)
2026-10-06T10:03:42.8087209Z 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
2026-10-06T10:03:42.8087710Z 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
2026-10-06T10:03:42.8088829Z 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
2026-10-06T10:03:42.8089862Z 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:829)
2026-10-06T10:03:42.8090880Z 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
2026-10-06T10:03:42.8091402Z 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
2026-10-06T10:03:42.8091980Z 	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@c10cc5f, Dispatchers.Default]
Lenguaje dominante
Kotlin
Estrellas
247
Forks
31
Merge medio
3 h 55 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Manabu-GT/DebugOverlay-Android

Todos los issues de Manabu-GT/DebugOverlay-Android

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.