From fcf41fc737f96a853033552203cb2bfdbdfcea93 Mon Sep 17 00:00:00 2001 From: Dan Rubel Date: Mon, 28 Nov 2016 16:15:19 -0500 Subject: [PATCH] revert handle new Observatory URL (#7056) https://github.com/flutter/flutter/commit/737a55ef3e47036220e72f3b3e17353d461b5fab --- .../lib/src/android/android_device.dart | 43 ++++++----- .../lib/src/commands/daemon.dart | 4 +- .../flutter_tools/lib/src/commands/trace.dart | 10 +-- packages/flutter_tools/lib/src/device.dart | 18 ++--- packages/flutter_tools/lib/src/hot.dart | 12 ++-- .../flutter_tools/lib/src/ios/devices.dart | 71 +++++++++---------- .../flutter_tools/lib/src/ios/simulators.dart | 10 +-- .../lib/src/protocol_discovery.dart | 25 ++++--- .../lib/src/resident_runner.dart | 12 ++-- packages/flutter_tools/lib/src/run.dart | 19 ++--- packages/flutter_tools/lib/src/vmservice.dart | 19 +++-- .../test/protocol_discovery_test.dart | 37 ++++------ 12 files changed, 126 insertions(+), 154 deletions(-) diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index 35dd2ee304..e8f9452984 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -259,15 +259,14 @@ class AndroidDevice extends Device { return true; } - Future _forwardUriToNewPort(String service, Uri deviceUri, int port) async { + Future _forwardPort(String service, int devicePort, int port) async { try { // Set up port forwarding for observatory. - port = await portForwarder.forward(deviceUri.port, hostPort: port); - Uri localUri = deviceUri.replace(port: port); - printTrace('$service listening on $localUri'); - return localUri; + port = await portForwarder.forward(devicePort, hostPort: port); + printTrace('$service listening on http://127.0.0.1:$port'); + return port; } catch (e) { - printError('Unable to forward device port ${deviceUri.port} to $port: $e'); + printError('Unable to forward port $port: $e'); } return null; } @@ -356,35 +355,35 @@ class AndroidDevice extends Device { printTrace('Waiting for observatory port to be available...'); try { - Uri observatoryDeviceUri, diagnosticDeviceUri; + int observatoryDevicePort, diagnosticDevicePort; if (debuggingOptions.buildMode == BuildMode.debug) { - Future> scrapeServiceUris = Future.wait( - >[observatoryDiscovery.nextUri(), diagnosticDiscovery.nextUri()] + Future> scrapeServicePorts = Future.wait( + >[observatoryDiscovery.nextPort(), diagnosticDiscovery.nextPort()] ); - List deviceUris = await scrapeServiceUris.timeout(new Duration(seconds: 20)); - observatoryDeviceUri = deviceUris[0]; - diagnosticDeviceUri = deviceUris[1]; + List devicePorts = await scrapeServicePorts.timeout(new Duration(seconds: 20)); + observatoryDevicePort = devicePorts[0]; + diagnosticDevicePort = devicePorts[1]; } else { - observatoryDeviceUri = await observatoryDiscovery.nextUri().timeout(new Duration(seconds: 20)); + observatoryDevicePort = await observatoryDiscovery.nextPort().timeout(new Duration(seconds: 20)); } - printTrace('Observatory Uri on device: $observatoryDeviceUri'); + printTrace('observatory port on device: $observatoryDevicePort'); int observatoryLocalPort = await debuggingOptions.findBestObservatoryPort(); // TODO(devoncarew): Remember the forwarding information (so we can later remove the // port forwarding). - Uri observatoryLocalUri = await _forwardUriToNewPort(ProtocolDiscovery.kObservatoryService, observatoryDeviceUri, observatoryLocalPort); + observatoryLocalPort = await _forwardPort(ProtocolDiscovery.kObservatoryService, observatoryDevicePort, observatoryLocalPort); - Uri diagnosticLocalUri; - if (diagnosticDeviceUri != null) { - printTrace('Diagnostic Server Uri on device: $diagnosticDeviceUri'); - int diagnosticLocalPort = await debuggingOptions.findBestDiagnosticPort(); - diagnosticLocalUri = await _forwardUriToNewPort(ProtocolDiscovery.kDiagnosticService, diagnosticDeviceUri, diagnosticLocalPort); + int diagnosticLocalPort; + if (diagnosticDevicePort != null) { + printTrace('diagnostic port on device: $diagnosticDevicePort'); + diagnosticLocalPort = await debuggingOptions.findBestDiagnosticPort(); + diagnosticLocalPort = await _forwardPort(ProtocolDiscovery.kDiagnosticService, diagnosticDevicePort, diagnosticLocalPort); } return new LaunchResult.succeeded( - observatoryUri: observatoryLocalUri, - diagnosticUri: diagnosticLocalUri, + observatoryPort: observatoryLocalPort, + diagnosticPort: diagnosticLocalPort ); } catch (error) { if (error is TimeoutException) diff --git a/packages/flutter_tools/lib/src/commands/daemon.dart b/packages/flutter_tools/lib/src/commands/daemon.dart index 7f5798845c..9b1c847c08 100644 --- a/packages/flutter_tools/lib/src/commands/daemon.dart +++ b/packages/flutter_tools/lib/src/commands/daemon.dart @@ -359,8 +359,8 @@ class AppDomain extends Domain { connectionInfoCompleter = new Completer(); connectionInfoCompleter.future.then((DebugConnectionInfo info) { Map params = { - 'port': info.httpUri.port, - 'wsUri': info.wsUri.toString(), + 'port': info.port, + 'wsUri': info.wsUri }; if (info.baseUri != null) params['baseUri'] = info.baseUri; diff --git a/packages/flutter_tools/lib/src/commands/trace.dart b/packages/flutter_tools/lib/src/commands/trace.dart index 1bbaf6fc05..7464020af8 100644 --- a/packages/flutter_tools/lib/src/commands/trace.dart +++ b/packages/flutter_tools/lib/src/commands/trace.dart @@ -55,14 +55,10 @@ class TraceCommand extends FlutterCommand { Future runCommand() async { int observatoryPort = int.parse(argResults['debug-port']); - // TODO(danrubel): this will break if we move to the new observatory URL - // See https://github.com/flutter/flutter/issues/7038 - Uri observatoryUri = Uri.parse('http://127.0.0.1:$observatoryPort'); - Tracing tracing; try { - tracing = await Tracing.connect(observatoryUri); + tracing = await Tracing.connect(observatoryPort); } catch (error) { throwToolExit('Error connecting to observatory: $error'); } @@ -104,8 +100,8 @@ class TraceCommand extends FlutterCommand { class Tracing { Tracing(this.vmService); - static Future connect(Uri uri) { - return VMService.connect(uri).then((VMService observatory) => new Tracing(observatory)); + static Future connect(int port) { + return VMService.connect(port).then((VMService observatory) => new Tracing(observatory)); } final VMService vmService; diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index edfd522ea5..1f9e7a2a43 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -296,22 +296,22 @@ class DebuggingOptions { } class LaunchResult { - LaunchResult.succeeded({ this.observatoryUri, this.diagnosticUri }) : started = true; - LaunchResult.failed() : started = false, observatoryUri = null, diagnosticUri = null; + LaunchResult.succeeded({ this.observatoryPort, this.diagnosticPort }) : started = true; + LaunchResult.failed() : started = false, observatoryPort = null, diagnosticPort = null; - bool get hasObservatory => observatoryUri != null; + bool get hasObservatory => observatoryPort != null; final bool started; - final Uri observatoryUri; - final Uri diagnosticUri; + final int observatoryPort; + final int diagnosticPort; @override String toString() { StringBuffer buf = new StringBuffer('started=$started'); - if (observatoryUri != null) - buf.write(', observatory=$observatoryUri'); - if (diagnosticUri != null) - buf.write(', diagnostic=$diagnosticUri'); + if (observatoryPort != null) + buf.write(', observatory=$observatoryPort'); + if (diagnosticPort != null) + buf.write(', diagnostic=$diagnosticPort'); return buf.toString(); } } diff --git a/packages/flutter_tools/lib/src/hot.dart b/packages/flutter_tools/lib/src/hot.dart index 98e9529276..4b3fa80b5a 100644 --- a/packages/flutter_tools/lib/src/hot.dart +++ b/packages/flutter_tools/lib/src/hot.dart @@ -108,7 +108,7 @@ class HotRunner extends ResidentRunner { final String applicationBinary; bool get prebuiltMode => applicationBinary != null; Set _dartDependencies; - Uri _observatoryUri; + int _observatoryPort; AssetBundle _bundle; AssetBundle get bundle => _bundle; final bool benchmarkMode; @@ -216,9 +216,9 @@ class HotRunner extends ResidentRunner { return 2; } - _observatoryUri = result.observatoryUri; + _observatoryPort = result.observatoryPort; try { - await connectToServiceProtocol(_observatoryUri); + await connectToServiceProtocol(_observatoryPort); } catch (error) { printError('Error connecting to the service protocol: $error'); return 2; @@ -230,8 +230,8 @@ class HotRunner extends ResidentRunner { if (connectionInfoCompleter != null) { connectionInfoCompleter.complete( new DebugConnectionInfo( - httpUri: _observatoryUri, - wsUri: vmService.wsAddress, + port: _observatoryPort, + wsUri: 'ws://localhost:$_observatoryPort/ws', baseUri: baseUri.toString() ) ); @@ -533,7 +533,7 @@ class HotRunner extends ResidentRunner { ansiAlternative: '$red$fire$bold To hot reload your app on the fly, ' 'press "r" or F5. To restart the app entirely, press "R".$reset' ); - printStatus('The Observatory debugger and profiler is available at: $_observatoryUri'); + printStatus('The Observatory debugger and profiler is available at: http://127.0.0.1:$_observatoryPort/'); if (details) { printHelpDetails(); printStatus('To repeat this help message, press "h" or F1. To quit, press "q", F10, or Ctrl-C.'); diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 82b3bd0108..9970159c1d 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -244,8 +244,8 @@ class IOSDevice extends Device { } int installationResult = -1; - Uri localObsUri; - Uri localDiagUri; + int localObsPort; + int localDiagPort; if (!debuggingOptions.debuggingEnabled) { // If debugging is not enabled, just launch the application and continue. @@ -256,34 +256,30 @@ class IOSDevice extends Device { // ports post launch. printTrace("Debugging is enabled, connecting to observatory and the diagnostic server"); - Future forwardObsUri = _acquireAndForwardUriToNewPort( - app, - ProtocolDiscovery.kObservatoryService, - debuggingOptions.observatoryPort, - ); - Future forwardDiagUri; + Future forwardObsPort = _acquireAndForwardPort(app, + ProtocolDiscovery.kObservatoryService, + debuggingOptions.observatoryPort); + Future forwardDiagPort; if (debuggingOptions.buildMode == BuildMode.debug) { - forwardDiagUri = _acquireAndForwardUriToNewPort( - app, - ProtocolDiscovery.kDiagnosticService, - debuggingOptions.diagnosticPort, - ); + forwardDiagPort = _acquireAndForwardPort(app, + ProtocolDiscovery.kDiagnosticService, + debuggingOptions.diagnosticPort); } else { - forwardDiagUri = new Future.value(null); + forwardDiagPort = new Future.value(null); } Future launch = runCommandAndStreamOutput(launchCommand, trace: true); - List uris = await launch.then((int result) async { + List ports = await launch.then((int result) async { installationResult = result; if (result != 0) { printTrace("Failed to launch the application on device."); - return [null, null]; + return [null, null]; } printTrace("Application launched on the device. Attempting to forward ports."); - return await Future.wait(>[forwardObsUri, forwardDiagUri]) + return await Future.wait(>[forwardObsPort, forwardDiagPort]) .timeout( kPortForwardTimeout, onTimeout: () { @@ -292,11 +288,11 @@ class IOSDevice extends Device { ); }); - printTrace("Observatory Uri on device: ${uris[0]}"); - printTrace("Diagnostic Server Uri on device: ${uris[1]}"); + printTrace("Local Observatory Port: ${ports[0]}"); + printTrace("Local Diagnostic Server Port: ${ports[1]}"); - localObsUri = uris[0]; - localDiagUri = uris[1]; + localObsPort = ports[0]; + localDiagPort = ports[1]; } if (installationResult != 0) { @@ -307,25 +303,25 @@ class IOSDevice extends Device { return new LaunchResult.failed(); } - return new LaunchResult.succeeded(observatoryUri: localObsUri, diagnosticUri: localDiagUri); + return new LaunchResult.succeeded(observatoryPort: localObsPort, diagnosticPort: localDiagPort); } - Future _acquireAndForwardUriToNewPort( + Future _acquireAndForwardPort( ApplicationPackage app, String serviceName, int localPort) async { Duration stepTimeout = const Duration(seconds: 60); - Future remote = new ProtocolDiscovery(getLogReader(app: app), serviceName).nextUri(); + Future remote = new ProtocolDiscovery(getLogReader(app: app), serviceName).nextPort(); - Uri remoteUri = await remote.timeout(stepTimeout, + int remotePort = await remote.timeout(stepTimeout, onTimeout: () { - printTrace("Timeout while attempting to retrieve remote Uri for $serviceName"); + printTrace("Timeout while attempting to retrieve remote port for $serviceName"); return null; }); - if (remoteUri == null) { - printTrace("Could not read Uri on device for $serviceName"); + if (remotePort == null) { + printTrace("Could not read port on device for $serviceName"); return null; } @@ -334,22 +330,19 @@ class IOSDevice extends Device { printTrace("Auto selected local port to $localPort"); } - int forwardResult = await portForwarder - .forward(remoteUri.port, hostPort: localPort) - .timeout(stepTimeout, onTimeout: () { - printTrace("Timeout while atempting to foward port for $serviceName"); - return null; - }); + int forwardResult = await portForwarder.forward(remotePort, + hostPort: localPort).timeout(stepTimeout, onTimeout: () { + printTrace("Timeout while atempting to foward port for $serviceName"); + return null; + }); if (forwardResult == null) { - printTrace("Could not foward remote $serviceName port $remoteUri to local port $localPort"); + printTrace("Could not foward remote $serviceName port $remotePort to local port $localPort"); return null; } - Uri forwardUri = remoteUri.replace(port: forwardResult); - - printStatus('$serviceName listening on $forwardUri'); - return forwardUri; + printStatus('$serviceName listening on http://127.0.0.1:$localPort'); + return localPort; } @override diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart index ad56484380..6d405c8995 100644 --- a/packages/flutter_tools/lib/src/ios/simulators.dart +++ b/packages/flutter_tools/lib/src/ios/simulators.dart @@ -474,12 +474,12 @@ class IOSSimulator extends Device { printTrace('Waiting for observatory port to be available...'); try { - Uri deviceUri = await observatoryDiscovery - .nextUri() + int devicePort = await observatoryDiscovery + .nextPort() .timeout(new Duration(seconds: 20)); - printTrace('Observatory Uri on simulator: $deviceUri'); - printStatus('Observatory listening on $deviceUri'); - return new LaunchResult.succeeded(observatoryUri: deviceUri); + printTrace('service protocol port = $devicePort'); + printStatus('Observatory listening on http://127.0.0.1:$devicePort'); + return new LaunchResult.succeeded(observatoryPort: devicePort); } catch (error) { if (error is TimeoutException) printError('Timed out while waiting for a debug connection.'); diff --git a/packages/flutter_tools/lib/src/protocol_discovery.dart b/packages/flutter_tools/lib/src/protocol_discovery.dart index fdfcc3174b..7c27b137e5 100644 --- a/packages/flutter_tools/lib/src/protocol_discovery.dart +++ b/packages/flutter_tools/lib/src/protocol_discovery.dart @@ -21,38 +21,37 @@ class ProtocolDiscovery { final DeviceLogReader _logReader; final String _serviceName; - Completer _completer = new Completer(); + Completer _completer = new Completer(); StreamSubscription _subscription; /// The [Future] returned by this function will complete when the next service - /// Uri is found. - Future nextUri() => _completer.future; + /// protocol port is found. + Future nextPort() => _completer.future; void cancel() { _subscription.cancel(); } void _onLine(String line) { - Uri uri; + int portNumber = 0; if (line.contains('$_serviceName listening on http://')) { - RegExp portExp = new RegExp(r"http://\d+.\d+.\d+.\d+:\d+\S*"); try { - String match = portExp.stringMatch(line); - if (match != null) - uri = Uri.parse(match); + RegExp portExp = new RegExp(r"\d+.\d+.\d+.\d+:(\d+)"); + String port = portExp.firstMatch(line).group(1); + portNumber = int.parse(port); } catch (_) { // Ignore errors. } } - if (uri != null) - _located(uri); + if (portNumber != 0) + _located(portNumber); } - void _located(Uri uri) { + void _located(int port) { assert(_completer != null); assert(!_completer.isCompleted); - _completer.complete(uri); - _completer = new Completer(); + _completer.complete(port); + _completer = new Completer(); } } diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index 3243935485..bf8e625162 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -119,12 +119,12 @@ abstract class ResidentRunner { _loggingSubscription = null; } - Future connectToServiceProtocol(Uri uri) async { + Future connectToServiceProtocol(int port) async { if (!debuggingOptions.debuggingEnabled) { return new Future.error('Error the service protocol is not enabled.'); } - vmService = await VMService.connect(uri); - printTrace('Connected to service protocol: $uri'); + vmService = await VMService.connect(port); + printTrace('Connected to service protocol on port $port'); await vmService.getVM(); // Refresh the view list. @@ -287,9 +287,9 @@ String getMissingPackageHintForPlatform(TargetPlatform platform) { } class DebugConnectionInfo { - DebugConnectionInfo({ this.httpUri, this.wsUri, this.baseUri }); + DebugConnectionInfo({ this.port, this.wsUri, this.baseUri }); - final Uri httpUri; - final Uri wsUri; + final int port; + final String wsUri; final String baseUri; } diff --git a/packages/flutter_tools/lib/src/run.dart b/packages/flutter_tools/lib/src/run.dart index 0d7ba0b07d..55b543ec49 100644 --- a/packages/flutter_tools/lib/src/run.dart +++ b/packages/flutter_tools/lib/src/run.dart @@ -119,16 +119,17 @@ class RunAndStayResident extends ResidentRunner { startTime.stop(); - // Connect to observatory. - if (debuggingOptions.debuggingEnabled) { - await connectToServiceProtocol(_result.observatoryUri); + if (_result.hasObservatory) { + int port = _result.observatoryPort; + connectionInfoCompleter?.complete(new DebugConnectionInfo( + port: port, + wsUri: 'ws://localhost:$port/ws' + )); } - if (_result.hasObservatory) { - connectionInfoCompleter?.complete(new DebugConnectionInfo( - httpUri: _result.observatoryUri, - wsUri: vmService.wsAddress, - )); + // Connect to observatory. + if (debuggingOptions.debuggingEnabled) { + await connectToServiceProtocol(_result.observatoryPort); } printTrace('Application running.'); @@ -175,7 +176,7 @@ class RunAndStayResident extends ResidentRunner { void printHelp({ @required bool details }) { bool haveDetails = false; if (_result.hasObservatory) - printStatus('The Observatory debugger and profiler is available at: ${_result.observatoryUri}'); + printStatus('The Observatory debugger and profiler is available at: http://127.0.0.1:${_result.observatoryPort}/'); if (supportsServiceProtocol) { haveDetails = true; if (details) diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index ef6939cdf1..e767e2a8e5 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart @@ -14,7 +14,7 @@ import 'globals.dart'; /// A connection to the Dart VM Service. class VMService { - VMService._(this.peer, this.httpAddress, this.wsAddress) { + VMService._(this.peer, this.port, this.httpAddress) { _vm = new VM._empty(this); peer.registerMethod('streamNotify', (rpc.Parameters event) { @@ -23,24 +23,21 @@ class VMService { } /// Connect to '127.0.0.1' at [port]. - static Future connect(Uri httpUri) async { - String wsPath = httpUri.path; - if (!wsPath.endsWith('/')) - wsPath += '/'; - wsPath += 'ws'; - Uri wsUri = httpUri.replace(scheme: 'ws', path: wsPath); + static Future connect(int port) async { + Uri uri = new Uri(scheme: 'ws', host: '127.0.0.1', port: port, path: 'ws'); WebSocket ws; try { - ws = await WebSocket.connect(wsUri.toString()); + ws = await WebSocket.connect(uri.toString()); } catch (e) { - return new Future.error('Failed to connect to $wsUri\n $e'); + return new Future.error('Failed to connect to $uri\n $e'); } rpc.Peer peer = new rpc.Peer(new IOWebSocketChannel(ws).cast()); peer.listen(); - return new VMService._(peer, httpUri, wsUri); + Uri httpAddress = new Uri(scheme: 'http', host: '127.0.0.1', port: port); + return new VMService._(peer, port, httpAddress); } final Uri httpAddress; - final Uri wsAddress; + final int port; final rpc.Peer peer; VM _vm; diff --git a/packages/flutter_tools/test/protocol_discovery_test.dart b/packages/flutter_tools/test/protocol_discovery_test.dart index 6d7b3d99bd..6f2343be8e 100644 --- a/packages/flutter_tools/test/protocol_discovery_test.dart +++ b/packages/flutter_tools/test/protocol_discovery_test.dart @@ -17,48 +17,35 @@ void main() { new ProtocolDiscovery(logReader, ProtocolDiscovery.kObservatoryService); // Get next port future. - Future nextUri = discoverer.nextUri(); - expect(nextUri, isNotNull); + Future nextPort = discoverer.nextPort(); + expect(nextPort, isNotNull); // Inject some lines. logReader.addLine('HELLO WORLD'); logReader.addLine('Observatory listening on http://127.0.0.1:9999'); // Await the port. - Uri uri = await nextUri; - expect(uri.port, 9999); - expect('$uri', 'http://127.0.0.1:9999'); + expect(await nextPort, 9999); // Get next port future. - nextUri = discoverer.nextUri(); + nextPort = discoverer.nextPort(); logReader.addLine('Observatory listening on http://127.0.0.1:3333'); - uri = await nextUri; - expect(uri.port, 3333); - expect('$uri', 'http://127.0.0.1:3333'); + expect(await nextPort, 3333); // Get next port future. - nextUri = discoverer.nextUri(); + nextPort = discoverer.nextPort(); // Inject some bad lines. logReader.addLine('Observatory listening on http://127.0.0.1'); logReader.addLine('Observatory listening on http://127.0.0.1:'); logReader.addLine('Observatory listening on http://127.0.0.1:apple'); - Uri timeoutUri = Uri.parse('http://timeout'); - Uri actualUri = await nextUri.timeout( - const Duration(milliseconds: 100), onTimeout: () => timeoutUri); - expect(actualUri, timeoutUri); + int port = await nextPort.timeout( + const Duration(milliseconds: 100), onTimeout: () => 77); + // Expect the timeout port. + expect(port, 77); // Get next port future. - nextUri = discoverer.nextUri(); + nextPort = discoverer.nextPort(); logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:52584'); - uri = await nextUri; - expect(uri.port, 52584); - expect('$uri', 'http://127.0.0.1:52584'); - - // Get next port future. - nextUri = discoverer.nextUri(); - logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/'); - uri = await nextUri; - expect(uri.port, 54804); - expect('$uri', 'http://127.0.0.1:54804/PTwjm8Ii8qg=/'); + expect(await nextPort, 52584); discoverer.cancel(); logReader.dispose();