My Logs:
Flutter crash report.
Please report a bug at https://github.com/flutter/flutter/issues.
## command
flutter run -d 00008140-00063CA81413001C
## exception
SocketException: SocketException: Send failed (OS Error: No route to host, errno = 65), address = 0.0.0.0, port = 5353
#0 _NativeSocket.send (dart:io-patch/socket_patch.dart:1275:34)`
#1 _RawDatagramSocket.send (dart:io-patch/socket_patch.dart:2590:15)
#2 MDnsClient.lookup (package:multicast_dns/multicast_dns.dart:219:22)
#3 MDnsVmServiceDiscovery._pollingVmService (package:flutter_tools/src/mdns_discovery.dart:232:66)
`<asynchronous suspension>
#4 MDnsVmServiceDiscovery.firstMatchingVmService (package:flutter_tools/src/mdns_discovery.dart:188:56)
<asynchronous suspension>
#5 MDnsVmServiceDiscovery.getVMServiceUriForLaunch (package:flutter_tools/src/mdns_discovery.dart:433:50)
<asynchronous suspension>
#6 Future.any.onValue (dart:async/future.dart:628:5)
<asynchronous suspension>
## flutter doctor - No problems
How can I fix this error please help. It only happens on IOS devices and I connect my own phone and others' phones via internet and USB and I still get the same error.
I had the same issue and found out that the problem was related to the Local Network permission. The solution reported here fixed it for me:
"Any app that you use to run the flutter project needs that permission (eg. VS code, Terimal, iTerm, etc). So when macOS ask for that permission, just click Allow. On the other hand, when the permission is disabled from System Settings > Privacy & Security > Local Network, the issue will happen again."