Repository navigation
Fix an Android crash on Connect GET and several minor bridge issues - #8
Merged
Merged
Conversation
…gine leaks, HTTP/3 host case - Dart: a failure event that overtakes the open reply no longer also reports an unhandled error. - Android: the bridge thread catches Throwable, so an OutOfMemoryError fails its call instead of the app. - Android: detaching from the Flutter engine shuts the Cronet engines and the bridge thread down. - iOS: http3Origins match the request host case-insensitively. - Docs: Cronet's BidirectionalStream carries neither HTTP/1.1 nor http:// URLs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BqmpXVmhnobv11U2vaqWwX
…om value - Android: no write to a GET's or HEAD's request side. Cronet ends it with the headers, and the empty write that ends a request then hit a CHECK in Chromium's SpdyStream::SendData, which aborts the process. Connect GET (useHttpGet) took this path on every call. - Dart: call ids start at a random value, so after a hot restart a new call doesn't get the id of a call the plugin still carries, and with it that call's events. - Tests: a GET in the Android bridge tests and the Dart integration tests; the test server reports the request method in X-Method. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BqmpXVmhnobv11U2vaqWwX
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.
Fixes from a correctness review of the package.
Changes
CHECKin Chromium'sSpdyStream::SendDataand aborts the process. Connect GET (useHttpGet) took this path on every call. The bridge now writes nothing to the request side of those methods.failedevent that arrives before theopenreply failed the call correctly but was also reported as an unhandled async error.Error. It caughtExceptiononly, so anOutOfMemoryErrorfrom a buffer allocation ended the thread and the app. It now fails the one call.onDetachedFromEnginecancelled calls but left the Cronet engines and the bridge thread running.close()(wascancelAll()) shuts the engines down as their calls end, then stops the thread.http3Originsmatch case-insensitively. Dart'sUrilowercases hosts andURLdoes not, so a base URL with an uppercase host lost its HTTP/3 hint.BidirectionalStreamcarries neither HTTP/1.1 norhttp://URLs, so Android never reportshttp/1.1. The README andNativeHttpConfigsaid it could.Tests
openreply; it fails without the fix.X-Methodso the integration test can check that a GET was sent.Verification
dart format,flutter analyze(package and example),flutter test(54 pass),go vet,go test.Generated by Claude Code