Skip to content

[tool] When shutting down browser, SocketException: The remote computer refused the network connection. (OS Error: The remote computer refused the network connection. , errno = 1225), address = localhost, port = 59203 #153064

@andrewkolos

Description

@andrewkolos

This is occurring with frightening frequency in 3.24.0 (63.69% of crashes as of 8/7/24).

Looks like the crash happens here when we try to ask Chrome/Chromium to close:

final ChromeTab? tab = await chromeConnection.getTab(
(_) => true, retryFor: const Duration(seconds: 1));

Command: flutter run --machine --start-paused -d chrome --devtools-server-address http://127.0.0.1:9100/ --target {path to project directory}\lib\main.dart

Stack trace:

SocketException: The remote computer refused the network connection.
 (OS Error: The remote computer refused the network connection.
, errno = 1225), address = localhost, port = 59203
at _NativeSocket.startConnect(socket_patch.dart:721)
at _RawSocket.startConnect(socket_patch.dart:1920)
at RawSocket.startConnect(socket_patch.dart:27)
at Socket._startConnect(socket_patch.dart:2144)
at Socket.startConnect(socket.dart:825)
at _ConnectionTarget.connect(http_impl.dart:2491)
at _HttpClient._getConnection.connect(http_impl.dart:2930)
at _HttpClient._getConnection(http_impl.dart:2935)
at _HttpClient._openUrl(http_impl.dart:2790)
at _HttpClient.getUrl(http_impl.dart:2632)
at ChromeConnection.getUrl(webkit_inspection_protocol.dart:108)
at ChromeConnection.getTabs(webkit_inspection_protocol.dart:53)
at ChromeConnection.getTab(webkit_inspection_protocol.dart:90)
at Chromium.close(chrome.dart:510)
at ChromiumDevice.stopApp(web_device.dart:164)
at ResidentWebRunner._cleanup(resident_web_runner.dart:203)
at <asynchronous gap>(async)
at ResidentWebRunner.cleanupAtFinish(resident_web_runner.dart:191)
at <asynchronous gap>(async)
at ResidentRunner.waitForAppToFinish(resident_runner.dart:1482)
at <asynchronous gap>(async)
at RunCommand.runCommand(run.dart:788)
at <asynchronous gap>(async)
at FlutterCommand.run.<anonymous closure>(flutter_command.dart:1408)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:153)
at <asynchronous gap>(async)
at CommandRunner.runCommand(command_runner.dart:212)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand.<anonymous closure>(flutter_command_runner.dart:420)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:153)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand(flutter_command_runner.dart:364)
at <asynchronous gap>(async)
at run.<anonymous closure>.<anonymous closure>(runner.dart:130)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:153)
at <asynchronous gap>(async)
at main(executable.dart:93)
at <asynchronous gap>(async)

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listteam-toolOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions