flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.59k stars 327 forks source link

`ServiceExtensionManager` wrongly assumes service extensions are always registered on the main isolate #7323

Open bkonyi opened 8 months ago

bkonyi commented 8 months ago

Reproduction Steps:

  1. Comment out --disable-vm-service flag from packages/flutter_tools/lib/src/test/runner.dart
  2. Run flutter test --experimental-faster-testing test/material in flutter/packages/flutter/
  3. Copy the VM service URI into DevTools

DevTools will fail to connect to the test runner. This is due to the fact that the service extension registration event handler assumes the events are from the main isolate (in this example, the service extensions are registered by the Flutter framework). However, the main isolate for the test runner consists of bootstrapping code for the test and doesn't register the same service extensions, so the invocations of the service extensions fail, preventing DevTools from connecting to the application.

bkonyi commented 8 months ago

Marking this as P1 as it's making debugging issues with flutter_tester more difficult.