[flutter_tools] remove handling of error that is fixed (#58557)

The linked error has been fixed, removed work around. Updates the test cases to only test for exit instead of error message

#33050
This commit is contained in:
Jonah Williams
2020-06-03 13:27:47 -07:00
committed by GitHub
parent 7e942b6229
commit 0734db62ca
5 changed files with 23 additions and 143 deletions

View File

@@ -648,23 +648,6 @@ class FlutterDevice {
}
}
// Issue: https://github.com/flutter/flutter/issues/33050
// Matches the following patterns:
// HttpException: Connection closed before full header was received, uri = *
// HttpException: , uri = *
final RegExp kAndroidQHttpConnectionClosedExp = RegExp(r'^HttpException\:.+\, uri \=.+$');
/// Returns `true` if any of the devices is running Android Q.
Future<bool> hasDeviceRunningAndroidQ(List<FlutterDevice> flutterDevices) async {
for (final FlutterDevice flutterDevice in flutterDevices) {
final String sdkNameAndVersion = await flutterDevice.device.sdkNameAndVersion;
if (sdkNameAndVersion != null && sdkNameAndVersion.startsWith('Android 10')) {
return true;
}
}
return false;
}
// Shared code between different resident application runners.
abstract class ResidentRunner {
ResidentRunner(

View File

@@ -134,13 +134,6 @@ class ColdRunner extends ResidentRunner {
);
} on Exception catch (error) {
globals.printError('Error connecting to the service protocol: $error');
// https://github.com/flutter/flutter/issues/33050
// TODO(blasten): Remove this check once https://issuetracker.google.com/issues/132325318 has been fixed.
if (await hasDeviceRunningAndroidQ(flutterDevices) &&
error.toString().contains(kAndroidQHttpConnectionClosedExp)) {
globals.printStatus('🔨 If you are using an emulator running Android Q Beta, consider using an emulator running API level 29 or lower.');
globals.printStatus('Learn more about the status of this issue on https://issuetracker.google.com/issues/132325318');
}
return 2;
}
for (final FlutterDevice device in flutterDevices) {

View File

@@ -233,20 +233,6 @@ class HotRunner extends ResidentRunner {
rethrow;
}
globals.printError('Error connecting to the service protocol: $error');
// https://github.com/flutter/flutter/issues/33050
// TODO(blasten): Remove this check once
// https://issuetracker.google.com/issues/132325318 has been fixed.
if (await hasDeviceRunningAndroidQ(flutterDevices) &&
error.toString().contains(kAndroidQHttpConnectionClosedExp)) {
globals.printStatus(
'🔨 If you are using an emulator running Android Q Beta, '
'consider using an emulator running API level 29 or lower.',
);
globals.printStatus(
'Learn more about the status of this issue on '
'https://issuetracker.google.com/issues/132325318.',
);
}
return 2;
}