[flutter_tools, engine] Add --disable-service-origin-check option to disable VM service origin checks#188745
Conversation
…M service origin checks Introduce a new `--disable-service-origin-check` flag to both `flutter run` and `flutter test` commands to allow connections to the VM service from any origin. * Propagate the option through `DebuggingOptions` to iOS launch arguments, Android (`adb shell am start`), desktop environments, and `flutter_tester`. * Update the Flutter engine C++ and Java codebases to parse the `--disable-service-origin-check` switch and forward it to `DartServiceIsolate::Startup`. * Add corresponding unit tests in `device_test.dart` and `run_test.dart` to verify flag propagation and serialization. * Add integration test verification in `disable_service_origin_check_test.dart` to verify that origin checks correctly block connections by default and permit connections when the flag is passed.
|
fyi, this is still a draft. since you asked for a reviewer i suspect you want mark it "Ready for review"? |
Definitely thought it would wait to actually send a notification only when the PR was marked ready to review 🤦 sorry for the noise, it'll be ready to review later today / tomorrow. |
|
no problem, I wish we had a thing that was "send to review after CI passes" |
There was a problem hiding this comment.
Code Review
This pull request introduces a new flag, --disable-service-origin-check, to disable WebSocket origin checks for the VM service across the Flutter engine, Android embedding, and flutter_tools. Feedback on the newly added integration tests highlights that the spawned Process is not wrapped in a try-finally block, which could leak processes on failure or timeout, and recommends guarding completer.complete with !completer.isCompleted to prevent potential StateError crashes.
|
@gaaclarke this should be ready for review now! |
gaaclarke
left a comment
There was a problem hiding this comment.
LGTM assuming that those dart tests are full integration tests. Do we want to print out some warning about this being enabled?
|
autosubmit label was removed for flutter/flutter/188745, because - The status or check suite Mac mac_ios_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
autosubmit label was removed for flutter/flutter/188745, because - The status or check suite Mac mac_ios_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
autosubmit label was removed for flutter/flutter/188745, because - The status or check suite Mac mac_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
autosubmit label was removed for flutter/flutter/188745, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…disable VM service origin checks (flutter#188745) Introduce a new `--disable-service-origin-check` flag to both `flutter run` and `flutter test` commands to allow connections to the VM service from any origin. * Propagate the option through `DebuggingOptions` to iOS launch arguments, Android (`adb shell am start`), desktop environments, and `flutter_tester`. * Update the Flutter engine C++ and Java codebases to parse the `--disable-service-origin-check` switch and forward it to `DartServiceIsolate::Startup`. * Add corresponding unit tests in `device_test.dart` and `run_test.dart` to verify flag propagation and serialization. * Add integration test verification in `disable_service_origin_check_test.dart` to verify that origin checks correctly block connections by default and permit connections when the flag is passed.
…12137) Manual roll Flutter from 6995038d96ef to 91939cc4db78 (48 revisions) Manual roll requested by [email protected] flutter/flutter@6995038...91939cc 2026-07-07 [email protected] Roll Skia from 80ae1deed9ed to 075fbe4778d9 (6 revisions) (flutter/flutter#189067) 2026-07-07 [email protected] Bump customer testing version for new registrants (flutter/flutter#189070) 2026-07-07 [email protected] Roll Packages from fc00ceb to 92525f5 (2 revisions) (flutter/flutter#189069) 2026-07-07 [email protected] fix android semantics integration test hangs due to postframe callback (flutter/flutter#189043) 2026-07-07 [email protected] Bump goldctl (flutter/flutter#189030) 2026-07-07 [email protected] Roll Skia from 71db7c06c5fe to 80ae1deed9ed (2 revisions) (flutter/flutter#189060) 2026-07-07 [email protected] Collect analytics on AI agent usage (flutter/flutter#187630) 2026-07-07 [email protected] Roll Skia from 125a76cc4cf3 to 71db7c06c5fe (4 revisions) (flutter/flutter#189054) 2026-07-07 [email protected] Roll Dart SDK from 70577d6f2bba to c648e3429d76 (1 revision) (flutter/flutter#189052) 2026-07-07 [email protected] Fix RenderSliverPadding setter assertion (flutter/flutter#187353) 2026-07-07 [email protected] Roll Skia from 2dde156aec3e to 125a76cc4cf3 (3 revisions) (flutter/flutter#189037) 2026-07-07 [email protected] Explain asynchronous causes in the setState() called after dispose() error (flutter/flutter#187294) 2026-07-07 [email protected] Roll Skia from 7dccd1e79a5b to 2dde156aec3e (2 revisions) (flutter/flutter#189035) 2026-07-07 [email protected] Add `STRING_CATALOG_GENERATE_SYMBOLS = YES;` (flutter/flutter#188163) 2026-07-07 [email protected] Print warnings on Intel Macs / targeting Intel Macs (flutter/flutter#188835) 2026-07-07 [email protected] Roll Dart SDK from 4c03f64b19f6 to 70577d6f2bba (1 revision) (flutter/flutter#189031) 2026-07-07 [email protected] Roll Fuchsia Linux SDK from n1Lm2Z4DZkfC3bwj5... to 7RjQJBW3m-3Jl-7jr... (flutter/flutter#189032) 2026-07-06 [email protected] Recommend `OverlayPortal.overlayChildLayoutBuilder` over Target-Follower (flutter/flutter#188894) 2026-07-06 [email protected] Sync CHANGELOG.md from stable (flutter/flutter#189025) 2026-07-06 [email protected] Rename preferredSize to size and preferredConstraints to constraints in the windowing API (flutter/flutter#189017) 2026-07-06 [email protected] Skip locked issues in no-response check (flutter/flutter#188950) 2026-07-06 [email protected] Fix potential race condtion in android_semantics_integration_test (flutter/flutter#188830) 2026-07-06 [email protected] ci: udpate wait-for-engine-build composite action to cocoon (flutter/flutter#189020) 2026-07-06 [email protected] Roll Skia from 2b55eed5500d to 7dccd1e79a5b (3 revisions) (flutter/flutter#189021) 2026-07-06 [email protected] [AGP 9] Update Flutter Template Versions (flutter/flutter#188762) 2026-07-06 [email protected] fix(engine/windows): keep tooltip position rect alive - fix use after free (flutter/flutter#188476) 2026-07-06 [email protected] [Tool] Fix null check operator crash in currentPackageConfig (flutter/flutter#188454) 2026-07-06 [email protected] [Tool] Gracefully handle WDAC/AppLocker blocks for impellerc (flutter/flutter#188452) 2026-07-06 [email protected] [flutter_tools] Throw DaemonException if app fails to start early (flutter/flutter#188921) 2026-07-06 [email protected] Roll Dart SDK from ce7a2567eb59 to 4c03f64b19f6 (2 revisions) (flutter/flutter#189015) 2026-07-06 [email protected] [flutter_tools, engine] Add --disable-service-origin-check option to disable VM service origin checks (flutter/flutter#188745) 2026-07-06 [email protected] [flutter_tools] Fix test flakiness in widget_preview_detection_test.dart (flutter/flutter#188922) 2026-07-06 [email protected] Roll pub packages (flutter/flutter#189009) 2026-07-06 [email protected] Roll Skia from c0e2b9667d91 to 2b55eed5500d (1 revision) (flutter/flutter#189006) 2026-07-06 [email protected] Roll Packages from 2fbe873 to fc00ceb (1 revision) (flutter/flutter#189007) 2026-07-06 [email protected] Roll Skia from b68567542f81 to c0e2b9667d91 (1 revision) (flutter/flutter#189004) 2026-07-06 [email protected] Fixing multiline GetBoxesForRange (flutter/flutter#188803) 2026-07-06 [email protected] Roll Skia from e15ea7a4b927 to b68567542f81 (4 revisions) (flutter/flutter#189000) 2026-07-06 [email protected] Roll Skia from 79806692425f to e15ea7a4b927 (2 revisions) (flutter/flutter#188992) 2026-07-06 [email protected] Roll Skia from 2826ae6dc649 to 79806692425f (1 revision) (flutter/flutter#188991) 2026-07-06 [email protected] Roll Skia from 7f99eee20fd6 to 2826ae6dc649 (1 revision) (flutter/flutter#188990) 2026-07-06 [email protected] Add debugPaintFocusBoxes (flutter/flutter#188288) 2026-07-05 [email protected] Roll Fuchsia Linux SDK from bkK6BLiZDRnE7AQQj... to n1Lm2Z4DZkfC3bwj5... (flutter/flutter#188989) 2026-07-05 [email protected] Roll Skia from 75a4bf6706bd to 7f99eee20fd6 (2 revisions) (flutter/flutter#188988) ...
…lutter#12137) Manual roll Flutter from 6995038d96ef to 91939cc4db78 (48 revisions) Manual roll requested by [email protected] flutter/flutter@6995038...91939cc 2026-07-07 [email protected] Roll Skia from 80ae1deed9ed to 075fbe4778d9 (6 revisions) (flutter/flutter#189067) 2026-07-07 [email protected] Bump customer testing version for new registrants (flutter/flutter#189070) 2026-07-07 [email protected] Roll Packages from fc00ceb to 92525f5 (2 revisions) (flutter/flutter#189069) 2026-07-07 [email protected] fix android semantics integration test hangs due to postframe callback (flutter/flutter#189043) 2026-07-07 [email protected] Bump goldctl (flutter/flutter#189030) 2026-07-07 [email protected] Roll Skia from 71db7c06c5fe to 80ae1deed9ed (2 revisions) (flutter/flutter#189060) 2026-07-07 [email protected] Collect analytics on AI agent usage (flutter/flutter#187630) 2026-07-07 [email protected] Roll Skia from 125a76cc4cf3 to 71db7c06c5fe (4 revisions) (flutter/flutter#189054) 2026-07-07 [email protected] Roll Dart SDK from 70577d6f2bba to c648e3429d76 (1 revision) (flutter/flutter#189052) 2026-07-07 [email protected] Fix RenderSliverPadding setter assertion (flutter/flutter#187353) 2026-07-07 [email protected] Roll Skia from 2dde156aec3e to 125a76cc4cf3 (3 revisions) (flutter/flutter#189037) 2026-07-07 [email protected] Explain asynchronous causes in the setState() called after dispose() error (flutter/flutter#187294) 2026-07-07 [email protected] Roll Skia from 7dccd1e79a5b to 2dde156aec3e (2 revisions) (flutter/flutter#189035) 2026-07-07 [email protected] Add `STRING_CATALOG_GENERATE_SYMBOLS = YES;` (flutter/flutter#188163) 2026-07-07 [email protected] Print warnings on Intel Macs / targeting Intel Macs (flutter/flutter#188835) 2026-07-07 [email protected] Roll Dart SDK from 4c03f64b19f6 to 70577d6f2bba (1 revision) (flutter/flutter#189031) 2026-07-07 [email protected] Roll Fuchsia Linux SDK from n1Lm2Z4DZkfC3bwj5... to 7RjQJBW3m-3Jl-7jr... (flutter/flutter#189032) 2026-07-06 [email protected] Recommend `OverlayPortal.overlayChildLayoutBuilder` over Target-Follower (flutter/flutter#188894) 2026-07-06 [email protected] Sync CHANGELOG.md from stable (flutter/flutter#189025) 2026-07-06 [email protected] Rename preferredSize to size and preferredConstraints to constraints in the windowing API (flutter/flutter#189017) 2026-07-06 [email protected] Skip locked issues in no-response check (flutter/flutter#188950) 2026-07-06 [email protected] Fix potential race condtion in android_semantics_integration_test (flutter/flutter#188830) 2026-07-06 [email protected] ci: udpate wait-for-engine-build composite action to cocoon (flutter/flutter#189020) 2026-07-06 [email protected] Roll Skia from 2b55eed5500d to 7dccd1e79a5b (3 revisions) (flutter/flutter#189021) 2026-07-06 [email protected] [AGP 9] Update Flutter Template Versions (flutter/flutter#188762) 2026-07-06 [email protected] fix(engine/windows): keep tooltip position rect alive - fix use after free (flutter/flutter#188476) 2026-07-06 [email protected] [Tool] Fix null check operator crash in currentPackageConfig (flutter/flutter#188454) 2026-07-06 [email protected] [Tool] Gracefully handle WDAC/AppLocker blocks for impellerc (flutter/flutter#188452) 2026-07-06 [email protected] [flutter_tools] Throw DaemonException if app fails to start early (flutter/flutter#188921) 2026-07-06 [email protected] Roll Dart SDK from ce7a2567eb59 to 4c03f64b19f6 (2 revisions) (flutter/flutter#189015) 2026-07-06 [email protected] [flutter_tools, engine] Add --disable-service-origin-check option to disable VM service origin checks (flutter/flutter#188745) 2026-07-06 [email protected] [flutter_tools] Fix test flakiness in widget_preview_detection_test.dart (flutter/flutter#188922) 2026-07-06 [email protected] Roll pub packages (flutter/flutter#189009) 2026-07-06 [email protected] Roll Skia from c0e2b9667d91 to 2b55eed5500d (1 revision) (flutter/flutter#189006) 2026-07-06 [email protected] Roll Packages from 2fbe873 to fc00ceb (1 revision) (flutter/flutter#189007) 2026-07-06 [email protected] Roll Skia from b68567542f81 to c0e2b9667d91 (1 revision) (flutter/flutter#189004) 2026-07-06 [email protected] Fixing multiline GetBoxesForRange (flutter/flutter#188803) 2026-07-06 [email protected] Roll Skia from e15ea7a4b927 to b68567542f81 (4 revisions) (flutter/flutter#189000) 2026-07-06 [email protected] Roll Skia from 79806692425f to e15ea7a4b927 (2 revisions) (flutter/flutter#188992) 2026-07-06 [email protected] Roll Skia from 2826ae6dc649 to 79806692425f (1 revision) (flutter/flutter#188991) 2026-07-06 [email protected] Roll Skia from 7f99eee20fd6 to 2826ae6dc649 (1 revision) (flutter/flutter#188990) 2026-07-06 [email protected] Add debugPaintFocusBoxes (flutter/flutter#188288) 2026-07-05 [email protected] Roll Fuchsia Linux SDK from bkK6BLiZDRnE7AQQj... to n1Lm2Z4DZkfC3bwj5... (flutter/flutter#188989) 2026-07-05 [email protected] Roll Skia from 75a4bf6706bd to 7f99eee20fd6 (2 revisions) (flutter/flutter#188988) ...
Introduce a new
--disable-service-origin-checkflag to bothflutter runandflutter testcommands to allow connections to the VM service from any origin.DebuggingOptionsto iOS launch arguments, Android (adb shell am start), desktop environments, andflutter_tester.--disable-service-origin-checkswitch and forward it toDartServiceIsolate::Startup.device_test.dartandrun_test.dartto verify flag propagation and serialization.disable_service_origin_check_test.dartto verify that origin checks correctly block connections by default and permit connections when the flag is passed.