From 8cb25b857430b57d49b2af0ccfd2efb26d04f544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Sharma?= <737941+loic-sharma@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:34:29 -0800 Subject: [PATCH] Add help guide for SocketException error (#11757) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit macOS Sequoia added a new "Local network" permission. Before Flutter 3.29, `flutter run` crashed if the IDE or terminal didn't have this permission. On Flutter 3.29, `flutter run` provides a helpful error message that tells the user to turn on Local network permissions. However, currently >60% of users are on a Flutter SDK before 3.29. This guide will help these users on an old version of the Flutter SDK resolve the problem. Part of: https://github.com/flutter/flutter/issues/150131 ## Presubmit checklist - [x] This PR is marked as draft with an explanation if not meant to land until a future stable release. - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer. --- src/content/get-started/install/help.md | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/content/get-started/install/help.md b/src/content/get-started/install/help.md index 368754dddc..a7ec0a1f58 100644 --- a/src/content/get-started/install/help.md +++ b/src/content/get-started/install/help.md @@ -130,6 +130,35 @@ If you're not using Android Studio, you can download the tools using the [sdkmanager][] command-line tool. +## macOS setup + +### SocketException: Send failed, OS Error: No route to host, errno = 65 + +__What does this issue look like?__ + +On macOS, the `flutter run` command produces an error like: + +```plaintext +$ flutter run +Launching lib/main.dart in debug mode... +... +Installing and launching... +Oops; flutter has exited unexpectedly: "SocketException: Send failed (OS Error: No route to host, errno = 65), address = 0.0.0.0, port = 5353". +``` + +__Explanation and suggestions__ + +This issue is related to macOS permissions. + +To fix this: + +1. Upgrade your Flutter SDK to the latest version. + +2. Open **System Settings** > **Privacy & Security** > **Local Network**. + Toggle on the permission for all the code editors and terminals you use to + launch Flutter apps. + You might need to restart your code editor, terminal, and physical device. + ## Other problems ### Exit code 69