Repository navigation
Failed to start dart tooling daemon when local machine does not have 127.0.0.1 loopback IP address #151375
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consoledependency: dartDart team may need to help usDart team may need to help usteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Steps to reproduce
Just running any app in VSCODE
Actual results
The app fails to run at all, trying to build on both android and the iOS simulator
Logs
Logs
[6:52:46 PM] [General] [Info] /opt/homebrew/opt/openjdk/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.8/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.10/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/sbin
[6:52:46 PM] [General] [Info] /usr/local/bin
[6:52:46 PM] [General] [Info] /usr/bin
[6:52:46 PM] [General] [Info] /bin
[6:52:46 PM] [General] [Info] /usr/sbin
[6:52:46 PM] [General] [Info] /sbin
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker/bin
[6:52:46 PM] [General] [Info] /Library/Apple/usr/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands -> /Library/Frameworks/Mono.framework/Versions/Current/Commands/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/tools
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/tools -> /Users/firassoltani/Library/Android/sdk/tools/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/opt/openjdk/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.8/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.10/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/sbin
[6:52:46 PM] [General] [Info] /usr/local/bin
[6:52:46 PM] [General] [Info] /usr/bin
[6:52:46 PM] [General] [Info] /bin
[6:52:46 PM] [General] [Info] /usr/sbin
[6:52:46 PM] [General] [Info] /sbin
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker/bin
[6:52:46 PM] [General] [Info] /Library/Apple/usr/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands -> /Library/Frameworks/Mono.framework/Versions/Current/Commands/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/emulator
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/emulator -> /Users/firassoltani/Library/Android/sdk/emulator/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/opt/openjdk/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.8/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.10/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/sbin
[6:52:46 PM] [General] [Info] /usr/local/bin
[6:52:46 PM] [General] [Info] /usr/bin
[6:52:46 PM] [General] [Info] /bin
[6:52:46 PM] [General] [Info] /usr/sbin
[6:52:46 PM] [General] [Info] /sbin
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker/bin
[6:52:46 PM] [General] [Info] /Library/Apple/usr/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands -> /Library/Frameworks/Mono.framework/Versions/Current/Commands/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/tools/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/opt/openjdk/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.8/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.10/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/sbin
[6:52:46 PM] [General] [Info] /usr/local/bin
[6:52:46 PM] [General] [Info] /usr/bin
[6:52:46 PM] [General] [Info] /bin
[6:52:46 PM] [General] [Info] /usr/sbin
[6:52:46 PM] [General] [Info] /sbin
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker/bin
[6:52:46 PM] [General] [Info] /Library/Apple/usr/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands -> /Library/Frameworks/Mono.framework/Versions/Current/Commands/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/emulator
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/emulator -> /Users/firassoltani/Library/Android/sdk/emulator/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/opt/openjdk/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.8/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.10/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/sbin
[6:52:46 PM] [General] [Info] /usr/local/bin
[6:52:46 PM] [General] [Info] /usr/bin
[6:52:46 PM] [General] [Info] /bin
[6:52:46 PM] [General] [Info] /usr/sbin
[6:52:46 PM] [General] [Info] /sbin
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker/bin
[6:52:46 PM] [General] [Info] /Library/Apple/usr/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands -> /Library/Frameworks/Mono.framework/Versions/Current/Commands/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/tools
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/tools -> /Users/firassoltani/Library/Android/sdk/tools/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/opt/openjdk/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.8/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.10/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/sbin
[6:52:46 PM] [General] [Info] /usr/local/bin
[6:52:46 PM] [General] [Info] /usr/bin
[6:52:46 PM] [General] [Info] /bin
[6:52:46 PM] [General] [Info] /usr/sbin
[6:52:46 PM] [General] [Info] /sbin
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker/bin
[6:52:46 PM] [General] [Info] /Library/Apple/usr/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands -> /Library/Frameworks/Mono.framework/Versions/Current/Commands/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/emulator
[6:52:46 PM] [General] [Info] /Users/firassoltani/Library/Android/sdk/emulator -> /Users/firassoltani/Library/Android/sdk/emulator/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/opt/openjdk/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.8/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Python.framework/Versions/3.10/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/bin
[6:52:46 PM] [General] [Info] /opt/homebrew/sbin
[6:52:46 PM] [General] [Info] /usr/local/bin
[6:52:46 PM] [General] [Info] /usr/bin
[6:52:46 PM] [General] [Info] /bin
[6:52:46 PM] [General] [Info] /usr/sbin
[6:52:46 PM] [General] [Info] /sbin
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker
[6:52:46 PM] [General] [Info] /Applications/Docker.app/Contents/Resources/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker/bin
[6:52:46 PM] [General] [Info] /Library/Apple/usr/bin
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands
[6:52:46 PM] [General] [Info] /Library/Frameworks/Mono.framework/Versions/Current/Commands -> /Library/Frameworks/Mono.framework/Versions/Current/Commands/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/.spicetify
[6:52:46 PM] [General] [Info] /Users/firassoltani/.spicetify -> /Users/firassoltani/.spicetify/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin/cache/dart-sdk
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin/cache/dart-sdk -> /Users/firassoltani/flutter/bin/cache/dart-sdk/bin
[6:52:46 PM] [General] [Info] Found at:
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin/cache/dart-sdk -> /Users/firassoltani/flutter/bin/cache/dart-sdk/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin/cache/dart-sdk -> /Users/firassoltani/flutter/bin/cache/dart-sdk/bin
[6:52:46 PM] [General] [Info] Candidate paths to be post-filtered:
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin/cache/dart-sdk
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin -> /Users/firassoltani/flutter
[6:52:46 PM] [General] [Info] /Users/firassoltani/flutter/bin/cache/dart-sdk
[6:52:46 PM] [General] [Info] Found at /Users/firassoltani/flutter/bin/cache/dart-sdk
[6:52:46 PM] [General] [Info] Returning SDK path /Users/firassoltani/flutter/bin/cache/dart-sdk for dart
[6:52:46 PM] [General] [Info] Experiment random number is 47 for experiment 'sdkDaps'. Experiment is enabled for <= 100
[6:52:46 PM] [General] [Info] Experiment 'sdkDaps' is activating (not first time)
[6:52:46 PM] [General] [Info] Experiment random number is 47 for experiment 'sdkDaps'. Experiment is enabled for <= 100
[6:52:46 PM] [General] [Info] Experiment 'sdkDaps' is activating (not first time)
[6:52:46 PM] [General] [Info] Experiment random number is 47 for experiment 'sdkDaps'. Experiment is enabled for <= 10
[6:52:46 PM] [General] [Info] Experiment 'sdkDaps' does not apply and will not be activated
[6:52:46 PM] [General] [Info] !! ⚠️ PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING ⚠️ !!
Dart Code extension: 3.92.0
Flutter extension: 3.92.0 (not activated)
App: Visual Studio Code
App Host: desktop
Version: mac 1.91.0
Workspace type: Flutter (LSP)
Dart (3.4.3): /Users/firassoltani/flutter/bin/cache/dart-sdk
Flutter (3.22.2): /Users/firassoltani/flutter (No device)
[6:52:46 PM] [DartToolingDaemon] [Info] Spawning /Users/firassoltani/flutter/bin/cache/dart-sdk/bin/dart with args ["tooling-daemon","--machine"]
[6:52:46 PM] [DartToolingDaemon] [Info] .. with {"toolEnv":{"FLUTTER_HOST":"VSCode","PUB_ENVIRONMENT":"vscode.dart-code","FLUTTER_ROOT":"/Users/firassoltani/flutter"}}
[6:52:46 PM] [DartToolingDaemon] [Info] PID: 79457
[6:52:46 PM] [FlutterDaemon] [Info] Spawning /Users/firassoltani/flutter/bin/flutter with args ["daemon"]
[6:52:46 PM] [FlutterDaemon] [Info] .. in /Users/firassoltani/flutter
[6:52:46 PM] [FlutterDaemon] [Info] .. with {"toolEnv":{"FLUTTER_HOST":"VSCode","PUB_ENVIRONMENT":"vscode.dart-code","FLUTTER_ROOT":"/Users/firassoltani/flutter"}}
[6:52:46 PM] [FlutterDaemon] [Info] PID: 79457
[6:52:46 PM] [General] [Info] Returning cached results for project search
[6:52:46 PM] [General] [Info] Checking 1 projects for supported platforms
[6:52:46 PM] [Analyzer] [Info] Spawning /Users/firassoltani/flutter/bin/cache/dart-sdk/bin/dart with args ["language-server","--protocol=lsp","--client-id=VS-Code","--client-version=3.92.0"]
[6:52:46 PM] [Analyzer] [Info] PID: 79461
[6:52:46 PM] [General] [Info] Returning cached results for project search
[6:52:46 PM] [General] [Info] Activating Flutter extension for Flutter project...
[6:52:46 PM] [General] [Info] Version last used for Pub is 3.4.3 (3.4.0), current is 3.4.3 (3.4.0)
[6:52:46 PM] [General] [Info] Found 0 folders requiring "pub get" or "pub upgrade":
[6:52:46 PM] [Analyzer] [Info] ==> Content-Length: 6465
[6:52:46 PM] [Analyzer] [Info] ==> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":79457,"clientInfo":{"name":"Visual Studio Code","version":"1.91.0"},"locale":"en","rootPath":"/Users/firassoltani/bmoovd_","rootUri":"file:///Users/firassoltani/bmoovd_","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"…
[6:52:47 PM] [General] [Info] Loaded 20000 package names from vscode-userdata:/Users/firassoltani/Library/Application%20Support/Code/User/globalStorage/dart-code.dart-code/package_cache.json
[6:52:47 PM] [General] [Info] !! ⚠️ PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING ⚠️ !!
Dart Code extension: 3.92.0
Flutter extension: 3.92.0 (activated)
App: Visual Studio Code
App Host: desktop
Version: mac 1.91.0
Workspace type: Flutter (LSP)
Dart (3.4.3): /Users/firassoltani/flutter/bin/cache/dart-sdk
Flutter (3.22.2): /Users/firassoltani/flutter (No device)
[6:52:47 PM] [DartToolingDaemon] [Error] [DartDevelopmentServiceException: Failed to create server socket (Can't assign requested address): 127.0.0.1:0, #0 DartToolingDaemon._startService (package:dtd_impl/dart_tooling_daemon.dart:149:7)
<asynchronous suspension>
#1 DartToolingDaemon.startService (package:dtd_impl/dart_tooling_daemon.dart:192:5)
<asynchronous suspension>
#2 main (file:///Volumes/Work/s/w/ir/x/w/sdk/pkg/dtd_impl/bin/dtd.dart:16:3)
<asynchronous suspension>
]
[6:52:47 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.connected","params":{"version":"0.6.1","pid":79460}}]
[6:52:47 PM] [FlutterDaemon] [Info] ==> [{"id":"1","method":"device.enable"}]
[6:52:47 PM] [FlutterDaemon] [Info] ==> [{"id":"2","method":"emulator.getEmulators"}]
[6:52:47 PM] [FlutterDaemon] [Info] ==> [{"id":"3","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"/Users/firassoltani/bmoovd_"}}]
[6:52:47 PM] [DartToolingDaemon] [Info] Process /Users/firassoltani/flutter/bin/cache/dart-sdk/bin/dart terminated! 255, null
[6:52:47 PM] [DartToolingDaemon] [Info] DTD connection closed
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.2, on macOS 13.2 22D49 darwin-arm64 (Rosetta),
locale en-TN)
[✓] Android toolchain - develop for Android devices (Android SDK version
35.0.0-rc3)
[!] Xcode - develop for iOS and macOS (Xcode 14.3.1)
! Flutter recommends a minimum Xcode version of 15.
Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.91.0)
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 1 category.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consoledependency: dartDart team may need to help usDart team may need to help usteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Activity
erkinovalim commentedon Jul 7, 2024
It seems like this is the problem
Try this solution: https://stackoverflow.com/a/61503234/22343394
huycozy commentedon Jul 8, 2024
@firassolt Does this issue only occur on VSCode? Can you try running project on Terminal or Android Studio?
If the issue only appears on VSCode, please check Dart-Code/Dart-Code#4656 (comment) to see if it helps.
firassolt commentedon Jul 14, 2024
Nothing you guys suggested solved the issue, it persisted
huycozy commentedon Jul 15, 2024
What kind of simulator/emulator are you using? Is it
Genymotionsimulator? (related issue #81046) Please provide the output offlutter doctor -v.Can you confirm this as well?
For this error, it seems to be an OSError, it's thrown here I think:
/flutter_master/bin/cache/dart-sdk/lib/_internal/vm/bin/socket_patch.dartfirassolt commentedon Jul 15, 2024
This is the flutter do tor output, and I'm using the iOS Simulator.
Running the project from the terminal works but I'm not able to reload or do anything.
huycozy commentedon Jul 15, 2024
Thanks for the update. I can't reproduce this on my end but will label this for other's input.
Kindly cc: @DanTup for inputs on VSCode side.
10 remaining items
bkonyi commentedon Jul 19, 2024
Actually, it looks like you have two Flutter installations: one at
/Users/firassoltani/flutter/(based on the VSCode output) and one at/Users/firassoltani/Downloads/flutter(based on yourflutter doctoroutput). Is this expected?bkonyi commentedon Jul 19, 2024
One last request: can you also share the output of
ifconfig lo0? I suspect this might be a network configuration issue on your machine if we're failing to bind to127.0.0.1.firassolt commentedon Jul 20, 2024
I resolved the dual installation issue, but it's still the same
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 192.168.1.88 netmask 0xffffffff
nd6 options=201<PERFORMNUD,DAD>
DanTup commentedon Jul 22, 2024
@firassolt
Is it possible you just ran
dart tooling-daemoninstead of/Users/firassoltani/flutter/bin/cache/dart-sdk/bin/dart tooling-daemonand it used your other version of Flutter (fromPATH)? In the log you posted above, the daemon command did work for that version of Dart, so this error looks like you were using an older SDK.I'm not familiar with the output of
ifconfigso I'll let @bkonyi comment on that, but I'll note that if I runifconfig loin a WSL terminal (I'm on Windows), I see an explicit entry for127.0.0.1which you don't have:This makes me wonder what you get if you
ping 127.0.0.1andnslookup localhost? I would've thought more things wouldn't work if you didn't have the IPv4 loopback address, but maybe other tools are just usinglocalhostand using IPv6.firassolt commentedon Jul 22, 2024
I fixed it by doing :
sudo ifconfig lo0 alias 127.0.0.1 up
And then taking the lo0 down and up
Then it worked again.
DanTup commentedon Jul 22, 2024
Great, glad it's sorted!
I've also just landed a fix to the VS Code extension so that if DTD fails to start, it doesn't prevent other functionality that doesn't rely on DTD (like launching a Flutter app) from working.
I don't suppose you have any thoughts about why you didn't already have this IP?
@bkonyi do you think there's value in trying to handle this in DTD differently? Or @andrewkolos a
doctorcheck in the tool that the loopback address exists? (I don't know how uncommon this issue is likely to be). Otherwise, probably this can be closed.bkonyi commentedon Jul 22, 2024
We do have a
--ipv6flag fordart tooling-daemonthat could be used to attempt to start the daemon using the IPv6 loopback. Maybe the IDE could attempt to restart DTD with that flag?I have seen a few issues on StackOverflow related to the IPv4 loopback address not being configured, so this isn't a totally unheard of problem for users to encounter.
DanTup commentedon Jul 23, 2024
Would it be better to do this within DTD (possibly with flags to avoid it if there's a reason we wouldn't always want this behaviour)? That way all IDEs and CLI would get this from one implementation instead of IDEs needing to each implement it and CLI users having to manually re-run with that flag?
[-]Failed to start dart tooling daemon[/-][+]Failed to start dart tooling daemon when local machine does not have 127.0.0.1 loopback IP address[/+]firassolt commentedon Jul 23, 2024
Something about this, is that I tried with Chatgpt and the first solution it gave me was to try and set a host/port when running the app.
Since reload functionality and hot restart weren't working because of the DTD not starting, and the apps just wouldn't load.
There was no proper way to set a host/port for the DTD to start with.
@DanTup I have no idea, honestly, I never noticed that it wasn't in the loopback.
a-siva commentedon Jul 24, 2024
I am going to file an issue against DTD based on the comment from @DanTup above comment-2244670587 and close this issue as fixed.
a-siva commentedon Jul 26, 2024
Created dart-lang/sdk#56324 to track issue against DTD.
Closing this issue.
github-actions commentedon Aug 9, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.