fix: network capture, WebSocket/gRPC, log interception and UI bug fixes - #108
Merged
Merged
Conversation
- Network capture: record https URL on non-443 ports correctly, stop rewriting Content-Length in pass-through request-body rule, persist status code when response body is never consumed, share one response proxy between done/close, and handle mixed add()/addStream(). - WebSocket/gRPC: synthesize status code on close/call completion so records persist and are not lost from exported session archives; handshake GET shows as a normal request when WS capture is disabled. - Log interception: capture uncaught async Future/Stream errors via a global isolate listener (the old runZonedGuarded was dead code). - NetworkRequest.toJson uses jsonEncode for Map/List bodies so exports parse back. - Memory: no auto leak flag without VM Service to avoid false positives. - UI: remove stale dock-animation listener, Timer fallback in ThrottledNotifier when backgrounded, keep Dio fallback record, and preserve first error-carrying database provider result. - Bump version to 1.12.1 (pubspec, podspec, inspector_version) and update README/CHANGELOG.
- The 1.12.1 change gates the leaked transition on _vmServiceAvailable to avoid false positives without VM Service (release / real-device). The test now asserts leaked when VM Service is present and stays �erifying when it is not, matching the new behavior on CI runners.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Fix multiple network-capture correctness bugs (https URL on non-443 ports,
Content-Lengthmismatch in pass-through request-body rule, responses never consumed staying pending, WebSocket/gRPC records never persisted,donereturning a different response proxy), plus async errors missed under theinit()+wrapApp()two-liner and a memory-leak false-positive without VM Service. / 修复多处网络抓取正确性 bug(非 443 端口的 https URL、直传请求体规则Content-Length错配、响应体未消费时永远停在 pending、WebSocket/gRPC 记录从不落盘、done返回不同响应代理),以及两行式集成漏捕的异步异常、无 VM Service 时的内存泄漏误报。Changes / 变更
Content-Lengthrewrite in pass-through, persist status when body unconsumed, shared response proxy, mixedadd()/addStream()) / 网络抓取多项正确性修复Future/Streamerrors via a global isolate listener / 日志拦截通过全局 Isolate 监听捕获未捕获的异步异常NetworkRequest.toJsonusesjsonEncodefor Map/List bodies /toJson对 Map/List 体改用jsonEncodeThrottledNotifierTimer fallback, Dio fallback record, first error-carrying database result kept / 悬浮按钮、节流通知、Dio 回退、数据库首错结果等 UI 修复Context / 背景
These were the highest-frequency correctness and crash reports from real usage: captured requests stuck in pending, wrong cURL export for non-443 https, async exceptions silently lost, and memory-leak false positives on release/real-device builds. / 这些是真实使用中最频繁的正确性/崩溃反馈:抓取请求卡在 pending、非 443 https 导出 cURL 错误、异步异常静默丢失、release/真机下内存泄漏误报。
Checklist / 检查项
Test plan
flutter analyzeandflutter testgreen on CI / CI 上 analyze 与 test 通过https://cURL / 验证非 443 https 请求导出正确的 https cURL🤖 Generated with Zero Buddy