Unverified Commit cfa011dd authored by Lau Ching Jun's avatar Lau Ching Jun Committed by GitHub

Fix a crash in remote device daemon. (#144358)

The daemon server is expecting the client to pass `deviceId` in `device.shutdownDartDevelopmentService` method.

https://github.com/flutter/flutter/blob/24a792dae105e281962a7e3e4c35cbfd9652ff0a/packages/flutter_tools/lib/src/commands/daemon.dart#L1239
parent b099bf0b
......@@ -810,7 +810,9 @@ class ProxiedDartDevelopmentService implements DartDevelopmentService {
await _localDds.shutdown();
_ddsStartedLocally = false;
} else {
await connection.sendRequest('device.shutdownDartDevelopmentService');
await connection.sendRequest('device.shutdownDartDevelopmentService', <String, Object?>{
'deviceId': deviceId,
});
}
}
......
......@@ -615,6 +615,9 @@ void main() {
final DaemonMessage shutdownMessage = await broadcastOutput.first;
expect(shutdownMessage.data['id'], isNotNull);
expect(shutdownMessage.data['method'], 'device.shutdownDartDevelopmentService');
expect(shutdownMessage.data['params'], <String, Object?>{
'deviceId': 'test_id',
});
});
testWithoutContext('starts a local dds if the VM service port is not a forwarded port', () async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment