[flutter_tools] Remove additional listener on VM service that simply logged incoming messages (#149756)

In service of #146879. In summary, a bunch of `printTrace` calls were added to try to troubleshoot this flake, but the flake has stopped happening.

This PR more-or-less reverts https://github.com/flutter/flutter/pull/148596, since this was the only change that could have _theoretically_ (somehow maybe) stopped the flake. I'll consider reverting the rest of the `printTrace` calls if the flake does not reappear after this PR lands.
This commit is contained in:
Andrew Kolos
2024-06-05 13:54:53 -07:00
committed by GitHub
parent fbc0ff1f3b
commit 1cf617812b

View File

@@ -582,20 +582,6 @@ class FlutterVmService {
// Do nothing, since the tool is already subscribed.
}
// TODO(andrewkolos): this is to assist in troubleshooting https://github.com/flutter/flutter/issues/146879
// and should be reverted once this issue is resolved.
unawaited(service.onReceive.firstWhere((String message) {
_logger.printTrace('runInView VM service onReceive listener received "$message"');
final dynamic messageAsJson = jsonDecode(message);
// ignore: avoid_dynamic_calls -- Temporary code.
final dynamic messageKind = messageAsJson['params']?['event']?['kind'];
if (messageKind == 'IsolateRunnable') {
_logger.printTrace('Received IsolateRunnable event from onReceive.');
return true;
}
return false;
}));
final Future<void> onRunnable = service.onIsolateEvent.firstWhere((vm_service.Event event) {
_logger.printTrace('runInView VM service onIsolateEvent listener received $event');
return event.kind == vm_service.EventKind.kIsolateRunnable;