[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:
@@ -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(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user