Unverified Commit e2e3976a authored by Ben Konyi's avatar Ben Konyi Committed by GitHub

Roll package:dds to 1.7.3 and add error handling for VM service disappearing (#74272)

parent 914c9aa3
...@@ -31,7 +31,7 @@ dependencies: ...@@ -31,7 +31,7 @@ dependencies:
coverage: 0.14.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 0.14.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
csslib: 0.16.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" csslib: 0.16.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dds: 1.7.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dds: 1.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
devtools: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" devtools: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
devtools_server: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" devtools_server: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
devtools_shared: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" devtools_shared: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...@@ -96,4 +96,4 @@ dev_dependencies: ...@@ -96,4 +96,4 @@ dev_dependencies:
node_preamble: 1.4.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 1.4.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: e6e5 # PUBSPEC CHECKSUM: f0e6
...@@ -66,6 +66,7 @@ const Map<String, String> _kManuallyPinnedDependencies = <String, String>{ ...@@ -66,6 +66,7 @@ const Map<String, String> _kManuallyPinnedDependencies = <String, String>{
'url_launcher': '6.0.0-nullsafety.1', 'url_launcher': '6.0.0-nullsafety.1',
'connectivity': '3.0.0-nullsafety.1', 'connectivity': '3.0.0-nullsafety.1',
'device_info': '2.0.0-nullsafety.1', 'device_info': '2.0.0-nullsafety.1',
'camera': '0.6.4+5',
}; };
class UpdatePackagesCommand extends FlutterCommand { class UpdatePackagesCommand extends FlutterCommand {
......
...@@ -34,7 +34,8 @@ typedef PrintStructuredErrorLogMethod = void Function(vm_service.Event); ...@@ -34,7 +34,8 @@ typedef PrintStructuredErrorLogMethod = void Function(vm_service.Event);
WebSocketConnector _openChannel = _defaultOpenChannel; WebSocketConnector _openChannel = _defaultOpenChannel;
/// The error codes for the JSON-RPC standard. /// The error codes for the JSON-RPC standard, including VM service specific
/// error codes.
/// ///
/// See also: https://www.jsonrpc.org/specification#error_object /// See also: https://www.jsonrpc.org/specification#error_object
abstract class RPCErrorCodes { abstract class RPCErrorCodes {
...@@ -49,6 +50,11 @@ abstract class RPCErrorCodes { ...@@ -49,6 +50,11 @@ abstract class RPCErrorCodes {
/// Application specific error codes. /// Application specific error codes.
static const int kServerError = -32000; static const int kServerError = -32000;
/// Non-standard JSON-RPC error codes:
/// The VM service or extension service has disappeared.
static const int kServiceDisappeared = 112;
} }
/// A function that reacts to the invocation of the 'reloadSources' service. /// A function that reacts to the invocation of the 'reloadSources' service.
...@@ -718,8 +724,10 @@ extension FlutterVmService on vm_service.VmService { ...@@ -718,8 +724,10 @@ extension FlutterVmService on vm_service.VmService {
); );
return response.json; return response.json;
} on vm_service.RPCError catch (err) { } on vm_service.RPCError catch (err) {
// If an application is not using the framework // If an application is not using the framework or the VM service
if (err.code == RPCErrorCodes.kMethodNotFound) { // disappears while handling a request, return null.
if ((err.code == RPCErrorCodes.kMethodNotFound)
|| (err.code == RPCErrorCodes.kServiceDisappeared)) {
return null; return null;
} }
rethrow; rethrow;
......
...@@ -10,7 +10,7 @@ dependencies: ...@@ -10,7 +10,7 @@ dependencies:
# To update these, use "flutter update-packages --force-upgrade". # To update these, use "flutter update-packages --force-upgrade".
archive: 2.0.13 archive: 2.0.13
args: 1.6.0 args: 1.6.0
dds: 1.7.2 dds: 1.7.3
dwds: 7.1.1 dwds: 7.1.1
completion: 0.2.3 completion: 0.2.3
coverage: 0.14.2 coverage: 0.14.2
...@@ -110,4 +110,4 @@ dartdoc: ...@@ -110,4 +110,4 @@ dartdoc:
# Exclude this package from the hosted API docs. # Exclude this package from the hosted API docs.
nodoc: true nodoc: true
# PUBSPEC CHECKSUM: c7c3 # PUBSPEC CHECKSUM: 4cc4
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