[BUG] NullPointerException in DebugOverlayDataRepository.networkRequests crashes the app (debugoverlay-extension-okhttp 2.7.0)
Đá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ả
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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Manabu-GT/DebugOverlay-Android
-
[FEATURE] Reorder Debug Overlay tabs / set a default tabCó thể làm lại được @Manabu-GT đã nhận 80 ngày trước và không có pull request nào đang mở. Đang mởenhancement
Manabu-GT/DebugOverlay-Android#269 · 1 bình luận · 1 reaction · 1 người được giao ·
-
[BUG] Create new report buttonCó thể làm lại được @Manabu-GT đã nhận 150 ngày trước và không có pull request nào đang mở. Đang mởbug triaged
Manabu-GT/DebugOverlay-Android#255 · 5 bình luận · 1 reaction · 1 người được giao ·
-
[FEATURE] WebSocket LoggingCó thể làm lại được @Manabu-GT đã nhận 159 ngày trước và không có pull request nào đang mở. Đang mởenhancement triaged
Manabu-GT/DebugOverlay-Android#237 · 2 bình luận · 1 người được giao ·
-
Dependency DashboardCó thể làm lại được @Manabu-GT đã nhận 274 ngày trước và không có pull request nào đang mở. Đang mởdependencies
Manabu-GT/DebugOverlay-Android#150 · 1 bình luận · 1 reaction · 1 người được giao ·
Tất cả issue của Manabu-GT/DebugOverlay-Android
Issue tương tự
-
bug goto-symex
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
android-tv
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Stremio/stremio-bugs#2892 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
commons-app/apps-android-commons#7115 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
NihilDigit/piko#35 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getdictus/dictus-android#222 ·
Maintainer thường phản hồi trong vòng 1 ngày