Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng Phù hợp với người mới
#274 1 bình luận 1 reaction 1 người được giao Xem trên GitHub

@Manabu-GT đang làm issue này rồi.

Từ ngày 8/10/2026.

  • #275 của @Manabu-GT — đã merge

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
kotlin
Lĩnh vực
mobile-dev

Hướng nghiên cứu

Lỗi crash xảy ra ở luồng networkRequests của DebugOverlayDataRepository khi sử dụng DebugOverlayNetworkInterceptor. Bắt đầu bằng cách xác định vị trí các lớp này trong cơ sở mã, xác định thuộc tính nullable gây ra NPE và thêm kiểm tra null hoặc giá trị mặc định. Xác minh sửa lỗi bằng cách chạy các thử nghiệm instrumentation của Android, đặc biệt là các thử nghiệm liên quan đến tiện ích mở rộng OkHttp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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]
Ngôn ngữ chính
Kotlin
Star
247
Fork
31
Merge trung bình
3 giờ 55 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Manabu-GT/DebugOverlay-Android

Tất cả issue của Manabu-GT/DebugOverlay-Android

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.